Skip to content

Commit 1ed52fb

Browse files
committed
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.
1 parent b1810a1 commit 1ed52fb

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3972,10 +3972,6 @@ UniValue sethdseed(const JSONRPCRequest& request)
39723972

39733973
LegacyScriptPubKeyMan& spk_man = EnsureLegacyScriptPubKeyMan(*pwallet, true);
39743974

3975-
if (pwallet->chain().isInitialBlockDownload()) {
3976-
throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Cannot set a new HD seed while still in Initial Block Download");
3977-
}
3978-
39793975
if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
39803976
throw JSONRPCError(RPC_WALLET_ERROR, "Cannot set a HD seed to a wallet with private keys disabled");
39813977
}

0 commit comments

Comments
 (0)