From 2d10a5d6fd32e04fb121fbb43cbd977d1d160b6a Mon Sep 17 00:00:00 2001 From: ismaelsadeeq Date: Thu, 23 Nov 2023 23:22:08 +0100 Subject: [PATCH] first commit wip --- src/bench/ccoins_caching.cpp | 4 ++-- src/policy/policy.cpp | 35 +++++++++++++++++++++++----------- src/policy/policy.h | 7 ++++++- src/test/script_p2sh_tests.cpp | 6 +++--- src/test/transaction_tests.cpp | 2 +- src/validation.cpp | 6 ++++-- test/functional/p2p_segwit.py | 2 +- 7 files changed, 41 insertions(+), 21 deletions(-) diff --git a/src/bench/ccoins_caching.cpp b/src/bench/ccoins_caching.cpp index 4a3ec67c2b818c..c677fb1c163a59 100644 --- a/src/bench/ccoins_caching.cpp +++ b/src/bench/ccoins_caching.cpp @@ -44,8 +44,8 @@ static void CCoinsCaching(benchmark::Bench& bench) // Benchmark. const CTransaction tx_1(t1); bench.run([&] { - bool success{AreInputsStandard(tx_1, coins)}; - assert(success); + auto result{AreInputsStandard(tx_1, coins)}; + assert(!result.has_value()); }); ECC_Stop(); } diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index d08ec4fb7f75c3..bca28c66646fde 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -18,6 +18,7 @@ #include