diff options
author | Antoine Poinsot <darosior@protonmail.com> | 2023-02-14 10:31:32 +0100 |
---|---|---|
committer | Antoine Poinsot <darosior@protonmail.com> | 2023-10-08 02:43:19 +0200 |
commit | fcb6f13f442d6a3f27689a87e3ed2bb9b431a332 (patch) | |
tree | 643b4e10ed9108d579fcae63cde68b851d9cb8b2 /src/pubkey.h | |
parent | ce8845f5dda403461178c08e7363978fda423999 (diff) | |
download | bitcoin-fcb6f13f442d6a3f27689a87e3ed2bb9b431a332.tar.xz |
pubkey: introduce a GetEvenCorrespondingCPubKey helper
We'll need to get a compressed key out of an x-only one in other places.
Avoid duplicating the code.
Diffstat (limited to 'src/pubkey.h')
-rw-r--r-- | src/pubkey.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pubkey.h b/src/pubkey.h index 4b34fd829b..2b655c3f73 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -282,6 +282,8 @@ public: */ std::vector<CKeyID> GetKeyIDs() const; + CPubKey GetEvenCorrespondingCPubKey() const; + const unsigned char& operator[](int pos) const { return *(m_keydata.begin() + pos); } const unsigned char* data() const { return m_keydata.begin(); } static constexpr size_t size() { return decltype(m_keydata)::size(); } |