aboutsummaryrefslogtreecommitdiff
path: root/src/test/script_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-06-18 16:32:32 -0700
committerPieter Wuille <pieter@wuille.net>2020-07-30 13:57:53 -0700
commite549bf8a9afae42fcda805e216a1cde62df195a6 (patch)
tree2d00e10ead84a3162f7ddc74300dcfbd340853a4 /src/test/script_tests.cpp
parent2a2182c387f607cd8284f33890bd285a81077b7f (diff)
downloadbitcoin-e549bf8a9afae42fcda805e216a1cde62df195a6.tar.xz
Make CHash256 and CHash160 consume Spans
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r--src/test/script_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index cb3ae290d1..4985f1a213 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -282,7 +282,7 @@ public:
CScript scriptPubKey = script;
if (wm == WitnessMode::PKH) {
uint160 hash;
- CHash160().Write(&script[1], script.size() - 1).Finalize(hash.begin());
+ CHash160().Write(MakeSpan(script).subspan(1)).Finalize(hash.begin());
script = CScript() << OP_DUP << OP_HASH160 << ToByteVector(hash) << OP_EQUALVERIFY << OP_CHECKSIG;
scriptPubKey = CScript() << witnessversion << ToByteVector(hash);
} else if (wm == WitnessMode::SH) {