mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-11 09:42:17 +01:00
Fix importmulti bug when importing an already imported key
Github-Pull: #11483
Rebased-From: a44a215177
This commit is contained in:
@@ -960,7 +960,7 @@ UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, const int6
|
||||
pwallet->SetAddressBook(vchAddress, label, "receive");
|
||||
|
||||
if (pwallet->HaveKey(vchAddress)) {
|
||||
return false;
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script");
|
||||
}
|
||||
|
||||
pwallet->mapKeyMetadata[vchAddress].nCreateTime = timestamp;
|
||||
|
||||
Reference in New Issue
Block a user