diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2019-02-12 18:56:53 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2019-02-15 22:36:05 -0800 |
commit | be62903c417293f6217e124669e62fd2172a18f1 (patch) | |
tree | c2d6f7b222060e5a466fe933d18fd07f8ea4083b /src | |
parent | b52cb6368869c9f6dd2cd8f309b3000de514d439 (diff) |
Make descriptor checksums mandatory in deriveaddresses and importmulti
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc/misc.cpp | 4 | ||||
-rw-r--r-- | src/wallet/rpcdump.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index bfb86aa12b..999a307e2b 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -207,7 +207,7 @@ UniValue deriveaddresses(const JSONRPCRequest& request) }, RPCExamples{ "First three native segwit receive addresses\n" + - HelpExampleCli("deriveaddresses", "\"wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)\" 0 2") + HelpExampleCli("deriveaddresses", "\"wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#trd0mf0l\" 0 2") }}.ToString() ); } @@ -233,7 +233,7 @@ UniValue deriveaddresses(const JSONRPCRequest& request) } FlatSigningProvider provider; - auto desc = Parse(desc_str, provider); + auto desc = Parse(desc_str, provider, /* require_checksum = */ true); if (!desc) { throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Invalid descriptor")); } diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 930274f8a1..66a52c1270 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -1117,7 +1117,7 @@ static UniValue ProcessImportDescriptor(ImportData& import_data, std::map<CKeyID const std::string& descriptor = data["desc"].get_str(); FlatSigningProvider keys; - auto parsed_desc = Parse(descriptor, keys); + auto parsed_desc = Parse(descriptor, keys, /* require_checksum = */ true); if (!parsed_desc) { throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Descriptor is invalid"); } |