aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-12-22 15:45:33 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-01-16 10:58:57 +0100
commit999962d68d47e1e630d689aca880f41635c004cb (patch)
tree118dc14b7ad2276b55091031c4ecc63c0e48b368 /src/pubkey.h
parent2ac2821a74efdd0f61f091b0fc774cc386930c95 (diff)
downloadbitcoin-999962d68d47e1e630d689aca880f41635c004cb.tar.xz
Add missing XOnlyPubKey::data() to get mutable data
This is needed for consistency, and also to allow std::span construction from XOnlyPubKey.
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pubkey.h b/src/pubkey.h
index 2b655c3f73..15d7e7bc07 100644
--- a/src/pubkey.h
+++ b/src/pubkey.h
@@ -285,10 +285,11 @@ public:
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(); }
+ const unsigned char* data() const { return m_keydata.begin(); }
const unsigned char* begin() const { return m_keydata.begin(); }
const unsigned char* end() const { return m_keydata.end(); }
+ unsigned char* data() { return m_keydata.begin(); }
unsigned char* begin() { return m_keydata.begin(); }
unsigned char* end() { return m_keydata.end(); }
bool operator==(const XOnlyPubKey& other) const { return m_keydata == other.m_keydata; }