-
Notifications
You must be signed in to change notification settings - Fork 12
Derivation wallet flag #324
base: develop
Are you sure you want to change the base?
Conversation
|
||
derivationScheme :: Core.Address -> DerivationScheme |
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 can be removed now as this information is contained in wallet type and in db - will remove
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.
maybe we can have that as an invariant check somewhere 🤔 ?
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.
yes - this could be used in tests at least. Additionally we could throw an exception if (or an error) if that invariant is not satisfied as a "failsafe" if something whent wrong.
|
||
derivationScheme :: Core.Address -> DerivationScheme |
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.
maybe we can have that as an invariant check somewhere 🤔 ?
This commit adds derivation scheme flag to Wallet datatype from V1.Types and stores this flag to db. This flag will be use in future to determine which derivation scheme to use with specific wallet.
9d46e90
to
915a6e1
Compare
45#
Overview
DerivationSchemeVersion
toWallet
to distinguish between sequential and random derivation schemesDerivationScheme
toHdRoot
to store this data to dbI have added a db migration to set all old wallets to random derivation scheme- not needed for 1.6 release
Comments
I am not sure how to test this feature? I can test migration but as this new flag is not fully wired yet I think we will need to postpone the testing until everything is in place. This adds additional flag to the db but doesn't do any logic with the flag yet.
I believe @uroboros work will use this flag. Also work from few of my PRs will also benefit the flag (as testing transaction signer is closer to be working now)
If you have some idea how to test - please sare.