From 78e283e656bf1643944ffdb76185f3468eb25895 Mon Sep 17 00:00:00 2001 From: Martin Zumsande Date: Mon, 25 Nov 2019 13:57:47 +0100 Subject: [test] move wallet helper functions into test library --- src/Makefile.bench.include | 4 +--- src/Makefile.test_util.include | 4 +++- src/bench/block_assemble.cpp | 2 +- src/bench/wallet_balance.cpp | 2 +- src/test/util.cpp | 40 ---------------------------------------- src/test/util.h | 23 ----------------------- src/test/util/wallet.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ src/test/util/wallet.h | 24 ++++++++++++++++++++++++ 8 files changed, 70 insertions(+), 69 deletions(-) delete mode 100644 src/test/util.cpp delete mode 100644 src/test/util.h create mode 100644 src/test/util/wallet.cpp create mode 100644 src/test/util/wallet.h diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include index 9e70db116b..1c97e22de8 100644 --- a/src/Makefile.bench.include +++ b/src/Makefile.bench.include @@ -39,9 +39,7 @@ bench_bench_bitcoin_SOURCES = \ bench/bech32.cpp \ bench/lockedpool.cpp \ bench/poly1305.cpp \ - bench/prevector.cpp \ - test/util.h \ - test/util.cpp + bench/prevector.cpp nodist_bench_bench_bitcoin_SOURCES = $(GENERATED_BENCH_FILES) diff --git a/src/Makefile.test_util.include b/src/Makefile.test_util.include index 139b709569..505d630b7d 100644 --- a/src/Makefile.test_util.include +++ b/src/Makefile.test_util.include @@ -13,7 +13,8 @@ TEST_UTIL_H = \ test/util/mining.h \ test/util/setup_common.h \ test/util/str.h \ - test/util/transaction_utils.h + test/util/transaction_utils.h \ + test/util/wallet.h libtest_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS) libtest_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) @@ -24,6 +25,7 @@ libtest_util_a_SOURCES = \ test/util/setup_common.cpp \ test/util/str.cpp \ test/util/transaction_utils.cpp \ + test/util/wallet.cpp \ $(TEST_UTIL_H) LIBTEST_UTIL += $(LIBBITCOIN_SERVER) diff --git a/src/bench/block_assemble.cpp b/src/bench/block_assemble.cpp index 2ccae0c667..184367e1e5 100644 --- a/src/bench/block_assemble.cpp +++ b/src/bench/block_assemble.cpp @@ -5,8 +5,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/src/bench/wallet_balance.cpp b/src/bench/wallet_balance.cpp index bd79ddfdd6..f39dcc0b71 100644 --- a/src/bench/wallet_balance.cpp +++ b/src/bench/wallet_balance.cpp @@ -6,8 +6,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/src/test/util.cpp b/src/test/util.cpp deleted file mode 100644 index e775ad323b..0000000000 --- a/src/test/util.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2019 The Bitcoin Core developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include - -#include -#include -#include