aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-10-20 15:26:29 -0700
committerPieter Wuille <pieter@wuille.net>2020-11-26 14:56:25 -0800
commit6040de9a46725826330cd63cdf76e2121a18e728 (patch)
treeb746553e7011821b44e651d50dd9963941bd69f7 /src/pubkey.h
parent8dbb7de67ce0a71f5fc54289c0ff048ac8dd0acc (diff)
downloadbitcoin-6040de9a46725826330cd63cdf76e2121a18e728.tar.xz
Add comments on CPubKey::IsValid
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pubkey.h b/src/pubkey.h
index 0f784b86e4..80d0c18540 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