mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 15:28:49 +02:00
Merge #15986: Add checksum to getdescriptorinfo
26d3fad109Add unmodified-but-with-checksum to getdescriptorinfo (Pieter Wuille)104b3a5069Factor out checksum checking from descriptor parsing (Pieter Wuille) Pull request description: ACKs for top commit: achow101: Code Review ACK26d3fad109meshcollider: re-Code Review ACK26d3fad109Sjors: ACK26d3fad109Tree-SHA512: b7a7f89b64a184927d6f9a0c183a087609983f0c5d5593f78e12db4714e930a4af655db9da4b0c407ea2e24d3b926cef6e1f2a15de502d0d1290a6e046826b99
This commit is contained in:
@@ -136,6 +136,7 @@ UniValue getdescriptorinfo(const JSONRPCRequest& request)
|
||||
RPCResult{
|
||||
"{\n"
|
||||
" \"descriptor\" : \"desc\", (string) The descriptor in canonical form, without private keys\n"
|
||||
" \"checksum\" : \"chksum\", (string) The checksum for the input descriptor\n"
|
||||
" \"isrange\" : true|false, (boolean) Whether the descriptor is ranged\n"
|
||||
" \"issolvable\" : true|false, (boolean) Whether the descriptor is solvable\n"
|
||||
" \"hasprivatekeys\" : true|false, (boolean) Whether the input descriptor contained at least one private key\n"
|
||||
@@ -156,6 +157,7 @@ UniValue getdescriptorinfo(const JSONRPCRequest& request)
|
||||
|
||||
UniValue result(UniValue::VOBJ);
|
||||
result.pushKV("descriptor", desc->ToString());
|
||||
result.pushKV("checksum", GetDescriptorChecksum(request.params[0].get_str()));
|
||||
result.pushKV("isrange", desc->IsRange());
|
||||
result.pushKV("issolvable", desc->IsSolvable());
|
||||
result.pushKV("hasprivatekeys", provider.keys.size() > 0);
|
||||
|
||||
Reference in New Issue
Block a user