From 7afddfa8cefd01249ad59cf2370e7cec90b34f6f Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Wed, 7 Nov 2018 11:24:34 -0500 Subject: importmulti: Don't add internal addresses to address book --- src/wallet/rpcdump.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/wallet') diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 2a4cf0147e..a3bb273230 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -994,8 +994,9 @@ static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, con throw JSONRPCError(RPC_WALLET_ERROR, "Error adding scriptPubKey script to wallet"); } - // add to address book or update label - if (IsValidDestination(scriptpubkey_dest)) { + // if not internal add to address book or update label + if (!internal) { + assert(IsValidDestination(scriptpubkey_dest)); pwallet->SetAddressBook(scriptpubkey_dest, label, "receive"); } @@ -1087,7 +1088,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) " \"witnessscript\": \"