Skip to content

Commit 8756ccd

Browse files
hodlinatorMarcoFalkeryanofsky
committed
scripted-diff: Replace ParseHex[<std::byte>]("str") -> "str"_hex[_u8]
Ideally all call sites should accept std::byte instead of uint8_t but those transformations are left to future PRs. -BEGIN VERIFY SCRIPT- sed -i --regexp-extended 's/\bParseHex\(("[^"]*")\)/\1_hex_u8/g' $(git grep -l ParseHex -- :src ':(exclude)src/test/util_tests.cpp') sed -i --regexp-extended 's/\bParseHex<std::byte>\(("[^"]*")\)/\1_hex/g' $(git grep -l ParseHex -- :src ':(exclude)src/test/util_tests.cpp') sed -i --regexp-extended 's/\bScriptFromHex\(("[^"]*")\)/ToScript(\1_hex)/g' src/test/script_tests.cpp -END VERIFY SCRIPT- Co-Authored-By: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Co-Authored-By: Ryan Ofsky <ryan@ofsky.org>
1 parent 9cb6873 commit 8756ccd

File tree

8 files changed

+79
-79
lines changed

8 files changed

+79
-79
lines changed

src/bench/index_blockfilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static void BlockFilterIndexSync(benchmark::Bench& bench)
3434

3535
// Create more blocks
3636
int CHAIN_SIZE = 600;
37-
CPubKey pubkey{ParseHex("02ed26169896db86ced4cbb7b3ecef9859b5952825adbeab998fb5b307e54949c9")};
37+
CPubKey pubkey{"02ed26169896db86ced4cbb7b3ecef9859b5952825adbeab998fb5b307e54949c9"_hex_u8};
3838
CScript script = GetScriptForDestination(WitnessV0KeyHash(pubkey));
3939
std::vector<CMutableTransaction> noTxns;
4040
for (int i = 0; i < CHAIN_SIZE - 100; i++) {

src/test/bloom_tests.cpp

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,42 +36,42 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
3636
{
3737
CBloomFilter filter(3, 0.01, 0, BLOOM_UPDATE_ALL);
3838

39-
BOOST_CHECK_MESSAGE( !filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter should be empty!");
40-
filter.insert(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8"));
41-
BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter doesn't contain just-inserted object!");
39+
BOOST_CHECK_MESSAGE( !filter.contains("99108ad8ed9bb6274d3980bab5a85c048f0950c8"_hex_u8), "Bloom filter should be empty!");
40+
filter.insert("99108ad8ed9bb6274d3980bab5a85c048f0950c8"_hex_u8);
41+
BOOST_CHECK_MESSAGE( filter.contains("99108ad8ed9bb6274d3980bab5a85c048f0950c8"_hex_u8), "Bloom filter doesn't contain just-inserted object!");
4242
// One bit different in first byte
43-
BOOST_CHECK_MESSAGE(!filter.contains(ParseHex("19108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter contains something it shouldn't!");
43+
BOOST_CHECK_MESSAGE(!filter.contains("19108ad8ed9bb6274d3980bab5a85c048f0950c8"_hex_u8), "Bloom filter contains something it shouldn't!");
4444

45-
filter.insert(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee"));
46-
BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee")), "Bloom filter doesn't contain just-inserted object (2)!");
45+
filter.insert("b5a2c786d9ef4658287ced5914b37a1b4aa32eee"_hex_u8);
46+
BOOST_CHECK_MESSAGE(filter.contains("b5a2c786d9ef4658287ced5914b37a1b4aa32eee"_hex_u8), "Bloom filter doesn't contain just-inserted object (2)!");
4747

48-
filter.insert(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5"));
49-
BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5")), "Bloom filter doesn't contain just-inserted object (3)!");
48+
filter.insert("b9300670b4c5366e95b2699e8b18bc75e5f729c5"_hex_u8);
49+
BOOST_CHECK_MESSAGE(filter.contains("b9300670b4c5366e95b2699e8b18bc75e5f729c5"_hex_u8), "Bloom filter doesn't contain just-inserted object (3)!");
5050

5151
DataStream stream{};
5252
stream << filter;
5353

5454
constexpr auto expected{"03614e9b050000000000000001"_hex};
5555
BOOST_CHECK_EQUAL_COLLECTIONS(stream.begin(), stream.end(), expected.begin(), expected.end());
5656

57-
BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter doesn't contain just-inserted object!");
57+
BOOST_CHECK_MESSAGE( filter.contains("99108ad8ed9bb6274d3980bab5a85c048f0950c8"_hex_u8), "Bloom filter doesn't contain just-inserted object!");
5858
}
5959

6060
BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)
6161
{
6262
// Same test as bloom_create_insert_serialize, but we add a nTweak of 100
6363
CBloomFilter filter(3, 0.01, 2147483649UL, BLOOM_UPDATE_ALL);
6464

65-
filter.insert(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8"));
66-
BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter doesn't contain just-inserted object!");
65+
filter.insert("99108ad8ed9bb6274d3980bab5a85c048f0950c8"_hex_u8);
66+
BOOST_CHECK_MESSAGE( filter.contains("99108ad8ed9bb6274d3980bab5a85c048f0950c8"_hex_u8), "Bloom filter doesn't contain just-inserted object!");
6767
// One bit different in first byte
68-
BOOST_CHECK_MESSAGE(!filter.contains(ParseHex("19108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter contains something it shouldn't!");
68+
BOOST_CHECK_MESSAGE(!filter.contains("19108ad8ed9bb6274d3980bab5a85c048f0950c8"_hex_u8), "Bloom filter contains something it shouldn't!");
6969

70-
filter.insert(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee"));
71-
BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee")), "Bloom filter doesn't contain just-inserted object (2)!");
70+
filter.insert("b5a2c786d9ef4658287ced5914b37a1b4aa32eee"_hex_u8);
71+
BOOST_CHECK_MESSAGE(filter.contains("b5a2c786d9ef4658287ced5914b37a1b4aa32eee"_hex_u8), "Bloom filter doesn't contain just-inserted object (2)!");
7272

73-
filter.insert(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5"));
74-
BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5")), "Bloom filter doesn't contain just-inserted object (3)!");
73+
filter.insert("b9300670b4c5366e95b2699e8b18bc75e5f729c5"_hex_u8);
74+
BOOST_CHECK_MESSAGE(filter.contains("b9300670b4c5366e95b2699e8b18bc75e5f729c5"_hex_u8), "Bloom filter doesn't contain just-inserted object (3)!");
7575

7676
DataStream stream{};
7777
stream << filter;
@@ -119,24 +119,24 @@ BOOST_AUTO_TEST_CASE(bloom_match)
119119

120120
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
121121
// byte-reversed tx hash
122-
filter.insert(ParseHex("6bff7fcd4f8565ef406dd5d63d4ff94f318fe82027fd4dc451b04474019f74b4"));
122+
filter.insert("6bff7fcd4f8565ef406dd5d63d4ff94f318fe82027fd4dc451b04474019f74b4"_hex_u8);
123123
BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match manually serialized tx hash");
124124

125125
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
126-
filter.insert(ParseHex("30450220070aca44506c5cef3a16ed519d7c3c39f8aab192c4e1c90d065f37b8a4af6141022100a8e160b856c2d43d27d8fba71e5aef6405b8643ac4cb7cb3c462aced7f14711a01"));
126+
filter.insert("30450220070aca44506c5cef3a16ed519d7c3c39f8aab192c4e1c90d065f37b8a4af6141022100a8e160b856c2d43d27d8fba71e5aef6405b8643ac4cb7cb3c462aced7f14711a01"_hex_u8);
127127
BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match input signature");
128128

129129
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
130-
filter.insert(ParseHex("046d11fee51b0e60666d5049a9101a72741df480b96ee26488a4d3466b95c9a40ac5eeef87e10a5cd336c19a84565f80fa6c547957b7700ff4dfbdefe76036c339"));
130+
filter.insert("046d11fee51b0e60666d5049a9101a72741df480b96ee26488a4d3466b95c9a40ac5eeef87e10a5cd336c19a84565f80fa6c547957b7700ff4dfbdefe76036c339"_hex_u8);
131131
BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match input pub key");
132132

133133
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
134-
filter.insert(ParseHex("04943fdd508053c75000106d3bc6e2754dbcff19"));
134+
filter.insert("04943fdd508053c75000106d3bc6e2754dbcff19"_hex_u8);
135135
BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match output address");
136136
BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(spendingTx), "Simple Bloom filter didn't add output");
137137

138138
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
139-
filter.insert(ParseHex("a266436d2965547608b9e15d9032a7b9d64fa431"));
139+
filter.insert("a266436d2965547608b9e15d9032a7b9d64fa431"_hex_u8);
140140
BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match output address");
141141

142142
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
@@ -158,7 +158,7 @@ BOOST_AUTO_TEST_CASE(bloom_match)
158158
BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx), "Simple Bloom filter matched random tx hash");
159159

160160
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
161-
filter.insert(ParseHex("0000006d2965547608b9e15d9032a7b9d64fa431"));
161+
filter.insert("0000006d2965547608b9e15d9032a7b9d64fa431"_hex_u8);
162162
BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx), "Simple Bloom filter matched random address");
163163

164164
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
@@ -244,7 +244,7 @@ BOOST_AUTO_TEST_CASE(merkle_block_2)
244244
// Match an output from the second transaction (the pubkey for address 1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5)
245245
// This should match the third transaction because it spends the output matched
246246
// It also matches the fourth transaction, which spends to the pubkey again
247-
filter.insert(ParseHex("044a656f065871a353f216ca26cef8dde2f03e8c16202d2e8ad769f02032cb86a5eb5e56842e92e19141d60a01928f8dd2c875a390f67c1f6c94cfc617c0ea45af"));
247+
filter.insert("044a656f065871a353f216ca26cef8dde2f03e8c16202d2e8ad769f02032cb86a5eb5e56842e92e19141d60a01928f8dd2c875a390f67c1f6c94cfc617c0ea45af"_hex_u8);
248248

249249
merkleBlock = CMerkleBlock(block, filter);
250250
BOOST_CHECK(merkleBlock.header.GetHash() == block.GetHash());
@@ -301,7 +301,7 @@ BOOST_AUTO_TEST_CASE(merkle_block_2_with_update_none)
301301
// Match an output from the second transaction (the pubkey for address 1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5)
302302
// This should not match the third transaction though it spends the output matched
303303
// It will match the fourth transaction, which has another pay-to-pubkey output to the same address
304-
filter.insert(ParseHex("044a656f065871a353f216ca26cef8dde2f03e8c16202d2e8ad769f02032cb86a5eb5e56842e92e19141d60a01928f8dd2c875a390f67c1f6c94cfc617c0ea45af"));
304+
filter.insert("044a656f065871a353f216ca26cef8dde2f03e8c16202d2e8ad769f02032cb86a5eb5e56842e92e19141d60a01928f8dd2c875a390f67c1f6c94cfc617c0ea45af"_hex_u8);
305305

306306
merkleBlock = CMerkleBlock(block, filter);
307307
BOOST_CHECK(merkleBlock.header.GetHash() == block.GetHash());
@@ -418,9 +418,9 @@ BOOST_AUTO_TEST_CASE(merkle_block_4_test_p2pubkey_only)
418418

419419
CBloomFilter filter(10, 0.000001, 0, BLOOM_UPDATE_P2PUBKEY_ONLY);
420420
// Match the generation pubkey
421-
filter.insert(ParseHex("04eaafc2314def4ca98ac970241bcab022b9c1e1f4ea423a20f134c876f2c01ec0f0dd5b2e86e7168cefe0d81113c3807420ce13ad1357231a2252247d97a46a91"));
421+
filter.insert("04eaafc2314def4ca98ac970241bcab022b9c1e1f4ea423a20f134c876f2c01ec0f0dd5b2e86e7168cefe0d81113c3807420ce13ad1357231a2252247d97a46a91"_hex_u8);
422422
// ...and the output address of the 4th transaction
423-
filter.insert(ParseHex("b6efd80d99179f4f4ff6f4dd0a007d018c385d21"));
423+
filter.insert("b6efd80d99179f4f4ff6f4dd0a007d018c385d21"_hex_u8);
424424

425425
CMerkleBlock merkleBlock(block, filter);
426426
BOOST_CHECK(merkleBlock.header.GetHash() == block.GetHash());
@@ -443,9 +443,9 @@ BOOST_AUTO_TEST_CASE(merkle_block_4_test_update_none)
443443

444444
CBloomFilter filter(10, 0.000001, 0, BLOOM_UPDATE_NONE);
445445
// Match the generation pubkey
446-
filter.insert(ParseHex("04eaafc2314def4ca98ac970241bcab022b9c1e1f4ea423a20f134c876f2c01ec0f0dd5b2e86e7168cefe0d81113c3807420ce13ad1357231a2252247d97a46a91"));
446+
filter.insert("04eaafc2314def4ca98ac970241bcab022b9c1e1f4ea423a20f134c876f2c01ec0f0dd5b2e86e7168cefe0d81113c3807420ce13ad1357231a2252247d97a46a91"_hex_u8);
447447
// ...and the output address of the 4th transaction
448-
filter.insert(ParseHex("b6efd80d99179f4f4ff6f4dd0a007d018c385d21"));
448+
filter.insert("b6efd80d99179f4f4ff6f4dd0a007d018c385d21"_hex_u8);
449449

450450
CMerkleBlock merkleBlock(block, filter);
451451
BOOST_CHECK(merkleBlock.header.GetHash() == block.GetHash());

src/test/coins_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ BOOST_AUTO_TEST_CASE(ccoins_serialization)
519519
BOOST_CHECK_EQUAL(cc1.fCoinBase, false);
520520
BOOST_CHECK_EQUAL(cc1.nHeight, 203998U);
521521
BOOST_CHECK_EQUAL(cc1.out.nValue, CAmount{60000000000});
522-
BOOST_CHECK_EQUAL(HexStr(cc1.out.scriptPubKey), HexStr(GetScriptForDestination(PKHash(uint160(ParseHex("816115944e077fe7c803cfa57f29b36bf87c1d35"))))));
522+
BOOST_CHECK_EQUAL(HexStr(cc1.out.scriptPubKey), HexStr(GetScriptForDestination(PKHash(uint160("816115944e077fe7c803cfa57f29b36bf87c1d35"_hex_u8)))));
523523

524524
// Good example
525525
DataStream ss2{"8ddf77bbd123008c988f1a4a4de2161e0f50aac7f17e7f9555caa4"_hex};
@@ -528,7 +528,7 @@ BOOST_AUTO_TEST_CASE(ccoins_serialization)
528528
BOOST_CHECK_EQUAL(cc2.fCoinBase, true);
529529
BOOST_CHECK_EQUAL(cc2.nHeight, 120891U);
530530
BOOST_CHECK_EQUAL(cc2.out.nValue, 110397);
531-
BOOST_CHECK_EQUAL(HexStr(cc2.out.scriptPubKey), HexStr(GetScriptForDestination(PKHash(uint160(ParseHex("8c988f1a4a4de2161e0f50aac7f17e7f9555caa4"))))));
531+
BOOST_CHECK_EQUAL(HexStr(cc2.out.scriptPubKey), HexStr(GetScriptForDestination(PKHash(uint160("8c988f1a4a4de2161e0f50aac7f17e7f9555caa4"_hex_u8)))));
532532

533533
// Smallest possible example
534534
DataStream ss3{"000006"_hex};

src/test/crypto_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ BOOST_AUTO_TEST_CASE(chacha20_testvector)
832832

833833
BOOST_AUTO_TEST_CASE(chacha20_midblock)
834834
{
835-
auto key = ParseHex<std::byte>("0000000000000000000000000000000000000000000000000000000000000000");
835+
auto key = "0000000000000000000000000000000000000000000000000000000000000000"_hex;
836836
ChaCha20 c20{key};
837837
// get one block of keystream
838838
std::byte block[64];
@@ -928,7 +928,7 @@ BOOST_AUTO_TEST_CASE(poly1305_testvector)
928928
{
929929
// mac of the macs of messages of length 0 to 256, where the key and messages have all
930930
// their values set to the length.
931-
auto total_key = ParseHex<std::byte>("01020304050607fffefdfcfbfaf9ffffffffffffffffffffffffffff00000000");
931+
auto total_key = "01020304050607fffefdfcfbfaf9ffffffffffffffffffffffffffff00000000"_hex;
932932
Poly1305 total_ctx(total_key);
933933
for (unsigned i = 0; i < 256; ++i) {
934934
std::vector<std::byte> key(32, std::byte{uint8_t(i)});

src/test/miniscript_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,11 @@ BOOST_AUTO_TEST_CASE(fixed_tests)
598598
// - no pubkey before the CHECKSIG
599599
constexpr KeyConverter tap_converter{miniscript::MiniscriptContext::TAPSCRIPT};
600600
constexpr KeyConverter wsh_converter{miniscript::MiniscriptContext::P2WSH};
601-
const auto no_pubkey{ParseHex("ac519c")};
601+
const auto no_pubkey{"ac519c"_hex_u8};
602602
BOOST_CHECK(miniscript::FromScript({no_pubkey.begin(), no_pubkey.end()}, tap_converter) == nullptr);
603-
const auto incomplete_multi_a{ParseHex("ba20c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5ba519c")};
603+
const auto incomplete_multi_a{"ba20c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5ba519c"_hex_u8};
604604
BOOST_CHECK(miniscript::FromScript({incomplete_multi_a.begin(), incomplete_multi_a.end()}, tap_converter) == nullptr);
605-
const auto incomplete_multi_a_2{ParseHex("ac2079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac20c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5ba519c")};
605+
const auto incomplete_multi_a_2{"ac2079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac20c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5ba519c"_hex_u8};
606606
BOOST_CHECK(miniscript::FromScript({incomplete_multi_a_2.begin(), incomplete_multi_a_2.end()}, tap_converter) == nullptr);
607607
// Can use multi_a under Tapscript but not P2WSH.
608608
Test("and_v(v:multi_a(2,03d01115d548e7561b15c38f004d734633687cf4419620095bc5b0f47070afe85a,025601570cb47f238d2b0286db4a990fa0f3ba28d1a319f5e7cf55c2a2444da7cc),after(1231488000))", "?", "20d01115d548e7561b15c38f004d734633687cf4419620095bc5b0f47070afe85aac205601570cb47f238d2b0286db4a990fa0f3ba28d1a319f5e7cf55c2a2444da7ccba529d0400046749b1", TESTMODE_VALID | TESTMODE_NONMAL | TESTMODE_NEEDSIG | TESTMODE_P2WSH_INVALID, 4, 2, {}, {}, 3);

src/test/script_standard_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ BOOST_AUTO_TEST_CASE(script_standard_taproot_builder)
389389
BOOST_CHECK_EQUAL(TaprootBuilder::ValidDepths({128,128,127,126,125,124,123,122,121,120,119,118,117,116,115,114,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}), true);
390390
BOOST_CHECK_EQUAL(TaprootBuilder::ValidDepths({129,129,128,127,126,125,124,123,122,121,120,119,118,117,116,115,114,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,98,97,96,95,94,93,92,91,90,89,88,87,86,85,84,83,82,81,80,79,78,77,76,75,74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}), false);
391391

392-
XOnlyPubKey key_inner{ParseHex("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")};
393-
XOnlyPubKey key_1{ParseHex("c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5")};
394-
XOnlyPubKey key_2{ParseHex("f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9")};
392+
XOnlyPubKey key_inner{"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"_hex_u8};
393+
XOnlyPubKey key_1{"c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5"_hex_u8};
394+
XOnlyPubKey key_2{"f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9"_hex_u8};
395395
CScript script_1 = CScript() << ToByteVector(key_1) << OP_CHECKSIG;
396396
CScript script_2 = CScript() << ToByteVector(key_2) << OP_CHECKSIG;
397397
constexpr uint256 hash_3{"31fe7061656bea2a36aa60a2f7ef940578049273746935d296426dc0afd86b68"};

0 commit comments

Comments
 (0)