aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pubkey.h b/src/pubkey.h
index 0f784b86e4..d60520ac44 100644
--- a/src/pubkey.h
+++ b/src/pubkey.h
@@ -170,6 +170,15 @@ public:
/*
* Check syntactic correctness.
*
+ * When setting a pubkey (Set()) or deserializing fails (its header bytes
+ * don't match the length of the data), the size is set to 0. Thus,
+ * by checking size, one can observe whether Set() or deserialization has
+ * failed.
+ *
+ * This does not check for more than that. In particular, it does not verify
+ * that the coordinates correspond to a point on the curve (see IsFullyValid()
+ * for that instead).
+ *
* Note that this is consensus critical as CheckECDSASignature() calls it!
*/
bool IsValid() const
@@ -214,7 +223,7 @@ private:
public:
/** Construct an x-only pubkey from exactly 32 bytes. */
- XOnlyPubKey(Span<const unsigned char> bytes);
+ explicit XOnlyPubKey(Span<const unsigned char> bytes);
/** Verify a Schnorr signature against this public key.
*