mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
Remove IBD check in sethdseed
It is no longer necessary to wait for IBD to be complete before setting a HD seed. This check was originally to ensure that restoring an old seed on an out of sync node would scan the entire blockchain and thus not miss transactions that involved keys that were not in the keypool. This was necessary as once the seed was changed, no further keys would be derived from the old seed(s). As we are now topping up inactive seeds as we find those keys to be used, this check is no longer necessary. During IBD, each time we find a used key belonging to an inactive hd seed, we will still generate more keys from that inactive seed.
This commit is contained in:
parent
b1810a145a
commit
1ed52fbb4d
1 changed files with 0 additions and 4 deletions
|
@ -3972,10 +3972,6 @@ UniValue sethdseed(const JSONRPCRequest& request)
|
|||
|
||||
LegacyScriptPubKeyMan& spk_man = EnsureLegacyScriptPubKeyMan(*pwallet, true);
|
||||
|
||||
if (pwallet->chain().isInitialBlockDownload()) {
|
||||
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Cannot set a new HD seed while still in Initial Block Download");
|
||||
}
|
||||
|
||||
if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Cannot set a HD seed to a wallet with private keys disabled");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue