aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorJohn Newbery <[email protected]>2017-08-15 11:33:39 -0400
committerJohn Newbery <[email protected]>2017-11-10 16:07:37 -0500
commit5e0ba8f8cd55a5c2cea4e4e2343d7dcd52aa8fad (patch)
treeded7c100a7df6cd9d06479e52243e33f93191e2c /src/wallet/rpcwallet.cpp
parent[tests] Tidy up receivedby.py (diff)
downloaddiscoin-5e0ba8f8cd55a5c2cea4e4e2343d7dcd52aa8fad.tar.xz
discoin-5e0ba8f8cd55a5c2cea4e4e2343d7dcd52aa8fad.zip
[wallet] getreceivedbyaddress should return error if address is not mine
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index d4015f6c8..8abb4c9a2 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -654,7 +654,7 @@ UniValue getreceivedbyaddress(const JSONRPCRequest& request)
}
CScript scriptPubKey = GetScriptForDestination(dest);
if (!IsMine(*pwallet, scriptPubKey)) {
- return ValueFromAmount(0);
+ throw JSONRPCError(RPC_WALLET_ERROR, "Address not found in wallet");
}
// Minimum confirmations