diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2018-10-17 14:51:00 +1300 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2018-10-25 09:30:57 +1300 |
commit | 201451b1ca3c6db3b13f9491a81db5b120b864bb (patch) | |
tree | 002f598c2436f44d3f2df652b7722b7f84b937fe /src | |
parent | 1753d217ead7e2de35b3df6cd6573a1c9a068f84 (diff) | |
download | bitcoin-201451b1ca3c6db3b13f9491a81db5b120b864bb.tar.xz |
Make getaddressinfo return solvability
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index df10fb48cc..fb6a97a1fe 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3538,6 +3538,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request) " \"address\" : \"address\", (string) The bitcoin address validated\n" " \"scriptPubKey\" : \"hex\", (string) The hex-encoded scriptPubKey generated by the address\n" " \"ismine\" : true|false, (boolean) If the address is yours or not\n" + " \"solvable\" : true|false, (boolean) If the address is solvable by the wallet\n" " \"iswatchonly\" : true|false, (boolean) If the address is watchonly\n" " \"isscript\" : true|false, (boolean) If the key is a script\n" " \"iswitness\" : true|false, (boolean) If the address is a witness address\n" @@ -3592,6 +3593,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request) isminetype mine = IsMine(*pwallet, dest); ret.pushKV("ismine", bool(mine & ISMINE_SPENDABLE)); ret.pushKV("iswatchonly", bool(mine & ISMINE_WATCH_ONLY)); + ret.pushKV("solvable", IsSolvable(*pwallet, scriptPubKey)); UniValue detail = DescribeWalletAddress(pwallet, dest); ret.pushKVs(detail); if (pwallet->mapAddressBook.count(dest)) { |