aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-11-01 16:32:53 -0400
committerPieter Wuille <pieter@wuille.net>2021-11-29 17:58:53 -0500
commit568dd2f83900a11a4dbba1250722791a135bf0a9 (patch)
treeb9091ef5f60075570c9f0e0c487282450e152ec0 /src/test/script_tests.cpp
parent383d350bd5107bfe00e3b90a00cab9a3c1397c72 (diff)
downloadbitcoin-568dd2f83900a11a4dbba1250722791a135bf0a9.tar.xz
Replace MakeSpan helper with Span deduction guide
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r--src/test/script_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index a89eab68e9..73c3a63c08 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -284,7 +284,7 @@ public:
CScript scriptPubKey = script;
if (wm == WitnessMode::PKH) {
uint160 hash;
- CHash160().Write(MakeSpan(script).subspan(1)).Finalize(hash);
+ CHash160().Write(Span{script}.subspan(1)).Finalize(hash);
script = CScript() << OP_DUP << OP_HASH160 << ToByteVector(hash) << OP_EQUALVERIFY << OP_CHECKSIG;
scriptPubKey = CScript() << witnessversion << ToByteVector(hash);
} else if (wm == WitnessMode::SH) {
@@ -1812,7 +1812,7 @@ BOOST_AUTO_TEST_CASE(bip341_keypath_test_vectors)
BOOST_CHECK_EQUAL(HexStr(sighash), input["intermediary"]["sigHash"].get_str());
// To verify the sigmsg, hash the expected sigmsg, and compare it with the (expected) sighash.
- BOOST_CHECK_EQUAL(HexStr((CHashWriter(HASHER_TAPSIGHASH) << MakeSpan(ParseHex(input["intermediary"]["sigMsg"].get_str()))).GetSHA256()), input["intermediary"]["sigHash"].get_str());
+ BOOST_CHECK_EQUAL(HexStr((CHashWriter(HASHER_TAPSIGHASH) << Span{ParseHex(input["intermediary"]["sigMsg"].get_str())}).GetSHA256()), input["intermediary"]["sigHash"].get_str());
}
}