aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorPedro Branco <branco@uphold.com>2017-10-11 11:12:59 +0100
committerPedro Branco <branco@uphold.com>2017-10-11 17:20:42 +0100
commita44a215177ab55b4a3b36a7980c313e908e2dd18 (patch)
treea40bc2574db7c70cb36e6cc9d9cb1dfd66bfb686 /src/wallet
parent364da2c52942ebfe92d1d1495a309a8a9dd18ef3 (diff)
Fix importmulti bug when importing an already imported key
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcdump.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index d6ea2a9db7..3ec4a5efb4 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -961,7 +961,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;