aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey.cpp')
-rw-r--r--src/pubkey.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/pubkey.cpp b/src/pubkey.cpp
index 13e3c2dbe0..0849d2a266 100644
--- a/src/pubkey.cpp
+++ b/src/pubkey.cpp
@@ -18,6 +18,8 @@
#include <algorithm>
#include <cassert>
+using namespace util::hex_literals;
+
namespace {
struct Secp256k1SelfTester
@@ -190,14 +192,7 @@ int ecdsa_signature_parse_der_lax(secp256k1_ecdsa_signature* sig, const unsigned
* For an example script for calculating H, refer to the unit tests in
* ./test/functional/test_framework/crypto/secp256k1.py
*/
-static const std::vector<unsigned char> NUMS_H_DATA{ParseHex("50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0")};
-const XOnlyPubKey XOnlyPubKey::NUMS_H{NUMS_H_DATA};
-
-XOnlyPubKey::XOnlyPubKey(Span<const unsigned char> bytes)
-{
- assert(bytes.size() == 32);
- std::copy(bytes.begin(), bytes.end(), m_keydata.begin());
-}
+constexpr XOnlyPubKey XOnlyPubKey::NUMS_H{"50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0"_hex_u8};
std::vector<CKeyID> XOnlyPubKey::GetKeyIDs() const
{