-
Notifications
You must be signed in to change notification settings - Fork 373
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
fix: In dbKeybase.writeInfo, if replacing a name entry, remove the lookup by the old address #2685
fix: In dbKeybase.writeInfo, if replacing a name entry, remove the lookup by the old address #2685
Conversation
…okup by the old address. See the PR. Signed-off-by: Jeff Thompson <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2685 +/- ##
==========================================
- Coverage 60.22% 60.21% -0.01%
==========================================
Files 562 562
Lines 75038 75048 +10
==========================================
- Hits 45188 45187 -1
- Misses 26476 26482 +6
- Partials 3374 3379 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
The major changes made in the writeMultisigKey
and writeInfo
functions are well covered in the tests. I think this PR can move on to the next step 👍
remove review/triage-pending
flag
This PR fixes the bug demonstrated in #2684 :
dbKeybase.writeInfo
, add anerror
return and propagate this to all callers (writeLocalKey
, etc.) . We needwriteInfo
to do some database integrity checks, so it needs to be able to return an error.dbKeybase.writeInfo
as suggested in #2684 . If an existing name entry is being replaced with newInfo
, then remove the "lookup by address" entry for the existing address.TestKeyManagement
, add a test similar to #2684 , except that after usingCreateAccount
with the same name, expectGetByAddress
to fail for the obsolete address and its (non-existing) public key. (This test passes.)Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description