aboutsummaryrefslogtreecommitdiff
path: root/src/bench
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/bench
parent2a2182c387f607cd8284f33890bd285a81077b7f (diff)
Make CHash256 and CHash160 consume Spans
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/chacha_poly_aead.cpp2
-rw-r--r--src/bench/verify_script.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bench/chacha_poly_aead.cpp b/src/bench/chacha_poly_aead.cpp
index 30d7851b7f..3b1d3e697a 100644
--- a/src/bench/chacha_poly_aead.cpp
+++ b/src/bench/chacha_poly_aead.cpp
@@ -93,7 +93,7 @@ static void HASH(benchmark::Bench& bench, size_t buffersize)
uint8_t hash[CHash256::OUTPUT_SIZE];
std::vector<uint8_t> in(buffersize,0);
bench.batch(in.size()).unit("byte").run([&] {
- CHash256().Write(in.data(), in.size()).Finalize(hash);
+ CHash256().Write(in).Finalize(hash);
});
}
diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp
index c489bae4f6..217c397e2b 100644
--- a/src/bench/verify_script.cpp
+++ b/src/bench/verify_script.cpp
@@ -34,7 +34,7 @@ static void VerifyScriptBench(benchmark::Bench& bench)
key.Set(vchKey.begin(), vchKey.end(), false);
CPubKey pubkey = key.GetPubKey();
uint160 pubkeyHash;
- CHash160().Write(pubkey.begin(), pubkey.size()).Finalize(pubkeyHash.begin());
+ CHash160().Write(pubkey).Finalize(pubkeyHash.begin());
// Script.
CScript scriptPubKey = CScript() << witnessversion << ToByteVector(pubkeyHash);