-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After importing a previously deleted key, be able to delete it again. #4653
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably "correcter", but a bit riskier, to instead catch the problem described in #4621 at the "import" stage, by deleting any trash-prefixed files for the newly imported private key.
It's always scary to be deleting private key files, though, so maybe not?
ceb7b9d
to
a02d0be
Compare
I think there is no harm to keep the trash-key there? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but someone else should weigh in on:
It's probably "correcter", but a bit riskier, to instead catch the problem described in #4621 at the "import" stage, by deleting any trash-prefixed files for the newly imported private key.
It's always scary to be deleting private key files, though, so maybe not?
a02d0be
to
ddaa566
Compare
Might also fix #4306? |
When the key is imported again, perhaps the trash-key should be deleted, which does no harm, but it is also unnecessary.when trash-key and wallet-key exist at the same time, how do we understand this situation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we wouldn't overwrite the old key, even if it's basically guaranteed to be the same data
I'd:
- Change
Put(..)
toput(name, info, retries)
- If retries > 0, append -%d to the name we use for checking
- If it's an existing trash key, call
put
with retries+1
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
ddaa566
to
260ddac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fixes #4621