diff options
author | Andrew Chow <achow101-github@achow101.com> | 2019-12-05 16:52:18 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-05-15 18:00:10 -0400 |
commit | 1ed52fbb4d81f7b7634fd4fb6d1d00e1478129dc (patch) | |
tree | 81c7714f9a7f2f0d6afacd089c748e7549718746 | |
parent | b1810a145a601a8064e4094350cfb6ddafbdb4d8 (diff) |
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.
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 91162d575d..913503ea2c 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -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"); } |