File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,12 @@ class XOnlyPubKey
222
222
uint256 m_keydata;
223
223
224
224
public:
225
+ /* * Construct an empty x-only pubkey. */
226
+ XOnlyPubKey () = default ;
227
+
228
+ XOnlyPubKey (const XOnlyPubKey&) = default ;
229
+ XOnlyPubKey& operator =(const XOnlyPubKey&) = default ;
230
+
225
231
/* * Construct an x-only pubkey from exactly 32 bytes. */
226
232
explicit XOnlyPubKey (Span<const unsigned char > bytes);
227
233
@@ -234,7 +240,14 @@ class XOnlyPubKey
234
240
235
241
const unsigned char & operator [](int pos) const { return *(m_keydata.begin () + pos); }
236
242
const unsigned char * data () const { return m_keydata.begin (); }
237
- size_t size () const { return m_keydata.size (); }
243
+ static constexpr size_t size () { return decltype (m_keydata)::size (); }
244
+ const unsigned char * begin () const { return m_keydata.begin (); }
245
+ const unsigned char * end () const { return m_keydata.end (); }
246
+ unsigned char * begin () { return m_keydata.begin (); }
247
+ unsigned char * end () { return m_keydata.end (); }
248
+ bool operator ==(const XOnlyPubKey& other) const { return m_keydata == other.m_keydata ; }
249
+ bool operator !=(const XOnlyPubKey& other) const { return m_keydata != other.m_keydata ; }
250
+ bool operator <(const XOnlyPubKey& other) const { return m_keydata < other.m_keydata ; }
238
251
};
239
252
240
253
struct CExtPubKey {
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ class base_blob
75
75
return &m_data[WIDTH];
76
76
}
77
77
78
- unsigned int size () const
78
+ static constexpr unsigned int size ()
79
79
{
80
80
return sizeof (m_data);
81
81
}
You can’t perform that action at this time.
0 commit comments