Skip to content

Commit 78e283e

Browse files
committed
[test] move wallet helper functions into test library
1 parent f613e5d commit 78e283e

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

src/Makefile.bench.include

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ bench_bench_bitcoin_SOURCES = \
3939
bench/bech32.cpp \
4040
bench/lockedpool.cpp \
4141
bench/poly1305.cpp \
42-
bench/prevector.cpp \
43-
test/util.h \
44-
test/util.cpp
42+
bench/prevector.cpp
4543

4644
nodist_bench_bench_bitcoin_SOURCES = $(GENERATED_BENCH_FILES)
4745

src/Makefile.test_util.include

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ TEST_UTIL_H = \
1313
test/util/mining.h \
1414
test/util/setup_common.h \
1515
test/util/str.h \
16-
test/util/transaction_utils.h
16+
test/util/transaction_utils.h \
17+
test/util/wallet.h
1718

1819
libtest_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
1920
libtest_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
@@ -24,6 +25,7 @@ libtest_util_a_SOURCES = \
2425
test/util/setup_common.cpp \
2526
test/util/str.cpp \
2627
test/util/transaction_utils.cpp \
28+
test/util/wallet.cpp \
2729
$(TEST_UTIL_H)
2830

2931
LIBTEST_UTIL += $(LIBBITCOIN_SERVER)

src/bench/block_assemble.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#include <bench/bench.h>
66
#include <consensus/validation.h>
77
#include <crypto/sha256.h>
8-
#include <test/util.h>
98
#include <test/util/mining.h>
9+
#include <test/util/wallet.h>
1010
#include <txmempool.h>
1111
#include <validation.h>
1212

src/bench/wallet_balance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include <interfaces/chain.h>
77
#include <node/context.h>
88
#include <optional.h>
9-
#include <test/util.h>
109
#include <test/util/mining.h>
10+
#include <test/util/wallet.h>
1111
#include <validationinterface.h>
1212
#include <wallet/wallet.h>
1313

src/test/util.cpp renamed to src/test/util/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <test/util.h>
5+
#include <test/util/wallet.h>
66

77
#include <key_io.h>
88
#include <outputtype.h>

src/test/util.h renamed to src/test/util/wallet.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#ifndef BITCOIN_TEST_UTIL_H
6-
#define BITCOIN_TEST_UTIL_H
5+
#ifndef BITCOIN_TEST_UTIL_WALLET_H
6+
#define BITCOIN_TEST_UTIL_WALLET_H
77

88
#include <string>
99

@@ -20,4 +20,5 @@ void importaddress(CWallet& wallet, const std::string& address);
2020
/** Returns a new address from the wallet */
2121
std::string getnewaddress(CWallet& w);
2222

23-
#endif // BITCOIN_TEST_UTIL_H
23+
24+
#endif // BITCOIN_TEST_UTIL_WALLET_H

0 commit comments

Comments
 (0)