diff options
author | John Newbery <john@johnnewbery.com> | 2017-08-15 11:33:39 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-11-10 16:07:37 -0500 |
commit | 5e0ba8f8cd55a5c2cea4e4e2343d7dcd52aa8fad (patch) | |
tree | ded7c100a7df6cd9d06479e52243e33f93191e2c /src | |
parent | ea0cd24f7d01f23fd5340c2afc644c760ff518a9 (diff) | |
download | bitcoin-5e0ba8f8cd55a5c2cea4e4e2343d7dcd52aa8fad.tar.xz |
[wallet] getreceivedbyaddress should return error if address is not mine
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d4015f6c89..8abb4c9a25 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 |