From dd93362a1d874eb761ed7026956a490b5ed0472b Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Sun, 1 Feb 2026 20:42:58 +0100 Subject: [PATCH 1/2] bench: simplify script verification benchmark, generalize signing Simplify the benchmark with the following changes: - Set the deterministic private key using uint256::ONE, put it in a `FlatSigningProvider` instance for easier signing - Use `GetScriptForDestination` for creating the output script - Use `SignTransaction` to sign, instead of doing it manually (also removes the need to caclulate the public key hash manually) - Pass standard script verification flags instead of combining them manually These steps, in particular the generalized signing, prepare the benchmarking extension for a different script type (P2TR key-path) in the next commit. --- src/bench/verify_script.cpp | 53 +++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp index e740f86ce03..b8a71dd421c 100644 --- a/src/bench/verify_script.cpp +++ b/src/bench/verify_script.cpp @@ -2,9 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include #include -#include #include +#include #include #include #include