From b07bc5818cde424778c3b6ac4ec3e000f46682cd Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 29 Feb 2020 03:22:58 +0700 Subject: [PATCH] Merge #18173: refactor: test/bench: deduplicate SetupDummyInputs() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7bf4ce4f644bb7dac9b63172c656b5d599eedea3 refactor: test/bench: dedup SetupDummyInputs() (Sebastian Falbesoner) Pull request description: The only difference between `SetupDummyInputs()` in `test/transaction_tests.cpp` and the one in `bench/ccoins_caching.cpp` was the nValue amounts of the outputs, so we allow to pass those in an extra (fixed-size) array parameter. ACKs for top commit: MarcoFalke: re-ACK 7bf4ce4f64, only change is schuffling includes 🚶 Empact: ACK https://github.com/bitcoin/bitcoin/pull/18173/commits/7bf4ce4f644bb7dac9b63172c656b5d599eedea3 Tree-SHA512: e13643b2470f6b6ab429da0c0a8eebd4cb41e2ff2e421ef36f85fa4847bf4ea8aab88d59a01e94cac4c4eb85edb561463f02215b174c50b573ac6bbcc2bf98a3 --- src/bench/ccoins_caching.cpp | 42 ++------------------------- src/test/transaction_tests.cpp | 45 ++++------------------------- src/test/util/transaction_utils.cpp | 32 ++++++++++++++++++++ src/test/util/transaction_utils.h | 10 +++++++ 4 files changed, 50 insertions(+), 79 deletions(-) diff --git a/src/bench/ccoins_caching.cpp b/src/bench/ccoins_caching.cpp index 1e914c6a19..0b4687725a 100644 --- a/src/bench/ccoins_caching.cpp +++ b/src/bench/ccoins_caching.cpp @@ -6,47 +6,10 @@ #include #include #include