aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-03-03 15:02:56 -0800
committerPieter Wuille <pieter@wuille.net>2021-06-12 12:25:28 -0700
commitdbb0ce9fbff01ffe4dd29da465f43ecaddc2854c (patch)
tree6fa9f24f53c40dfc157525532a16131339cc1c5f /src/pubkey.h
parentb0e5fbf6fad854ad03ce092ff5f1582166e5b24e (diff)
Add TaprootSpendData data structure, equivalent to script map for P2[W]SH
This data structures stores all information necessary for spending a taproot output (the internal key, the Merkle root, and the control blocks for every script leaf). It is added to signing providers, and populated by the tr() descriptor.
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pubkey.h b/src/pubkey.h
index 152a48dd18..194705c38f 100644
--- a/src/pubkey.h
+++ b/src/pubkey.h
@@ -234,6 +234,10 @@ public:
* fail. */
bool IsFullyValid() const;
+ /** Test whether this is the 0 key (the result of default construction). This implies
+ * !IsFullyValid(). */
+ bool IsNull() const { return m_keydata.IsNull(); }
+
/** Construct an x-only pubkey from exactly 32 bytes. */
explicit XOnlyPubKey(Span<const unsigned char> bytes);