Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 4,655 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
HelpExampleCli("sethdseed", "true \"wifkey\"") + | HelpExampleCli("sethdseed", "true \"wifkey\"") + | ||||
HelpExampleRpc("sethdseed", "true, \"wifkey\"")}, | HelpExampleRpc("sethdseed", "true, \"wifkey\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
LegacyScriptPubKeyMan &spk_man = | LegacyScriptPubKeyMan &spk_man = | ||||
EnsureLegacyScriptPubKeyMan(*pwallet, true); | 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)) { | if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
RPC_WALLET_ERROR, | RPC_WALLET_ERROR, | ||||
"Cannot set a HD seed to a wallet with private keys disabled"); | "Cannot set a HD seed to a wallet with private keys disabled"); | ||||
} | } | ||||
LOCK2(pwallet->cs_wallet, spk_man.cs_KeyStore); | LOCK2(pwallet->cs_wallet, spk_man.cs_KeyStore); | ||||
▲ Show 20 Lines • Show All 413 Lines • Show Last 20 Lines |