Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
My basic idea was to have two nodes running with the same keys, if one fails, I can just rescan the blockchain on the other one and failover to it seamlessly.
I made a wallet on Node1, generated a few thousands addresses, saved the dumpwallet. Now I want to import the same keys to Node2, but I want it to be an HD wallet from the same seed, to avoid the headache of sendtoaddress, when out of spare keys, creating a new change privkey that will not be backed up anywhere. With the hdseed those “new” change addresses should still be accessible to whomever owns the hdseed (right?)
This doesn’t seem to work so well as importwallet on Node2 seems to get it rid of the hdseed I set to be the same as on Node1.
I don’t know if the resulting state of Node2 means that it still has an HD wallet. Doesn’t look so from the dumpwallet ouput. Importwallet seems to overwrite hdseed, making it just a regular privkey, no longer being hdseed.
Not sure this is working as intended.
Expected behaviour
Expected behaviour: Node2 keeps its hdseed
Steps to reproduce
Node1: has a wallet with hdseed=X Node1: dumpwallet, grab the hdseed privkey from the output
Node2: createwallet “test” false true Node2: sethdseed to the above-obtained hdseed privkey X Node2: importwallet from the above dump Node2: dumpwallet. Result does not contain an hdseed=1 line. It does contain the private key, but just with a “label=” Node2: sethdseed again to the hdseed privkey fails with the message “either already has an hdseed or it’s a loose private key”
Relevant log output
No response
How did you obtain Bitcoin Core
Pre-built binaries
What version of Bitcoin Core are you using?
v22.0
Operating system and version
Debian 12
Machine specifications
No response