mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-16 15:43:05 +01: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:
@@ -81,6 +81,14 @@ struct Descriptor {
|
||||
*/
|
||||
std::unique_ptr<Descriptor> Parse(const std::string& descriptor, FlatSigningProvider& out, bool require_checksum = false);
|
||||
|
||||
/** Get the checksum for a descriptor.
|
||||
*
|
||||
* If it already has one, and it is correct, return the checksum in the input.
|
||||
* If it already has one that is wrong, return "".
|
||||
* If it does not already have one, return the checksum that would need to be added.
|
||||
*/
|
||||
std::string GetDescriptorChecksum(const std::string& descriptor);
|
||||
|
||||
/** Find a descriptor for the specified script, using information from provider where possible.
|
||||
*
|
||||
* A non-ranged descriptor which only generates the specified script will be returned in all
|
||||
|
||||
Reference in New Issue
Block a user