We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 250b4bc + 1f12844 commit 6586bc3Copy full SHA for 6586bc3
src/rpcdump.cpp
@@ -116,9 +116,14 @@ Value importprivkey(const Array& params, bool fHelp)
116
if (pwalletMain->HaveKey(vchAddress))
117
return Value::null;
118
119
+ pwalletMain->mapKeyMetadata[vchAddress].nCreateTime = 1;
120
+
121
if (!pwalletMain->AddKeyPubKey(key, pubkey))
122
throw JSONRPCError(RPC_WALLET_ERROR, "Error adding key to wallet");
123
124
+ // whenever a key is imported, we need to scan the whole chain
125
+ pwalletMain->nTimeFirstKey = 1; // 0 would be considered 'no value'
126
127
if (fRescan) {
128
pwalletMain->ScanForWalletTransactions(chainActive.Genesis(), true);
129
pwalletMain->ReacceptWalletTransactions();
0 commit comments