bitcoin core – What is the difference between True and False setting of newkeypool variable on the sethdseed command?

0
15


When I create a new blank wallet and set the seed with both newkeypool as True and False…I do not see a difference in the resulting dumped wallets.

The cli help states:

Arguments:
1. newkeypool    (boolean, optional, default=true) Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it.
                 If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed.
                 If false, addresses (including change addresses if the wallet already had HD Chain Split enabled) from the existing
                 keypool will be used until it has been depleted.

I am using testnet

My process:

bitcoin-cli createwallet "mytestwallet" false true
bitcoin-cli -rpcwallet=mytestwallet sethdseed true c...
bitcoin-cli getnewaddress

Then I delete the wallet rm -R .bitcoin/testnet3/wallets/mytestwallet and recreate with:

bitcoin-cli createwallet "mytestwallet" false true
bitcoin-cli -rpcwallet=mytestwallet sethdseed true c...
bitcoin-cli getnewaddress

The resulting new address is the same regardless of the newkeypool boolean

The dumpwallet looks the same but the keys and addresses are in difference order…

Why with bitcoin-core is the address generated after a sethdseed command is the same m/0’/0’/0′ whether newkeypool is set to True or False?



Source link

Leave a reply