-
Notifications
You must be signed in to change notification settings - Fork 17
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 btc wallet restore #332
Conversation
2eb6cc2
to
97a4cb8
Compare
Reason to NOT mix the connectors scripts in the same main account script? We still know which is which by database no? |
connectors must not be spent during a certain period of time so having two accounts makes the coin selection simpler. another way to solve would be to use p2tr scope for connector instead of p2wpkh : this way the connector account index will be 0 and should be restored |
Care to elaborate here?
This is important, and assigning a bip44 account to each makes sense, but we could have those information in database worst case. |
Only the "default" account for each scope is restored. Today we are using the same scope for the connector and the main account (the p2wkh one). It means that one is the default account and the other a custom account. If we move one of the accounts to p2tr scope instead of p2wkh, we could use "default" for all accounts and thus make the restoration work. TL;DR if connector account = default p2tr account, it will remove the need for custom account |
Co-authored-by: Pietralberto Mazza <[email protected]> Signed-off-by: Louis Singer <[email protected]>
This PR is a draft, waiting for btcsuite/btcwallet#957
TL;DR
It fixes the restore process for the main account, but the connectors account (with index = 1) is not restored (see btcwallet issue).