diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2024-08-14 09:39:31 -0400 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2024-08-26 11:22:20 +0200 |
commit | 948238a683b6c99f4e91114aa75680c6c2d73714 (patch) | |
tree | dbb699329bc54480ac468e67ab8b4e761bcdab72 /src/bench | |
parent | fa0fe08eca48064b2a42789571fea017e455d820 (diff) |
test: Remove FastRandomContext global
Drop g_insecure_rand_ctx
Diffstat (limited to 'src/bench')
-rw-r--r-- | src/bench/sign_transaction.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bench/sign_transaction.cpp b/src/bench/sign_transaction.cpp index 6f28f581af..9599284f99 100644 --- a/src/bench/sign_transaction.cpp +++ b/src/bench/sign_transaction.cpp @@ -69,12 +69,13 @@ static void SignTransactionSchnorr(benchmark::Bench& bench) { SignTransactionSin static void SignSchnorrTapTweakBenchmark(benchmark::Bench& bench, bool use_null_merkle_root) { + FastRandomContext rng; ECC_Context ecc_context{}; auto key = GenerateRandomKey(); - auto msg = InsecureRand256(); - auto merkle_root = use_null_merkle_root ? uint256() : InsecureRand256(); - auto aux = InsecureRand256(); + auto msg = rng.rand256(); + auto merkle_root = use_null_merkle_root ? uint256() : rng.rand256(); + auto aux = rng.rand256(); std::vector<unsigned char> sig(64); bench.minEpochIterations(100).run([&] { |