mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
[wallet] getreceivedbyaddress should return error if address is not mine
This commit is contained in:
parent
ea0cd24f7d
commit
5e0ba8f8cd
2 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue