-
Notifications
You must be signed in to change notification settings - Fork 316
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
refactor: replace kv-store backend in pxe, key store and wallet #12087
Conversation
f2d3ac8
to
2f9b570
Compare
621a013
to
3791f62
Compare
auto code = call_lmdb_func_with_return(mdb_put, tx.underlying(), db.underlying(), &dbKey, &dbVal, flags); | ||
if (code == MDB_KEYEXIST && duplicatesPermitted) { | ||
return; | ||
} |
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.
Pointing out this change since I encountered instances in this refactor where the same key/value entry was being added to a dupSort database.
This change makes the C++ module swallow the error making it behave more like the previous wrapper.
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! At least on the ts side 😅
|
||
private static instance: WalletDB; | ||
|
||
private aliasCache = new Map<string, string>(); |
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.
This cache is necessary because the parsers for custom Commander options need to by synchronous.
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.
Looks ok to me but should probably ask @Thunkar to take a look.
Hah, looks like he already did! |
Fix #11658