Merge #15788: test: Unify testing setups for fuzz, bench, and unit tests

faf400077d scripted-diff: Bump copyright headers in test, bench (MarcoFalke)
fa821904bf scripted-diff: Rename test_bitcoin to test/setup_common (MarcoFalke)
fa8685d49e test: Use test_bitcoin setup in bench, Add test utils (MarcoFalke)
666696b673 test: Have segwit always active in (Basic)TestingSetup (MarcoFalke)

Pull request description:

  Now that the fuzz tests can use the BasicTestingSetup [1], do the same for bench.

  Also move some duplicate code to a common "test/util" module.

  [1]:  fuzz: Link BasicTestingSetup (shared with unit tests) #15504

ACKs for commit faf400:
  jonatack:
    ACK https://github.com/bitcoin/bitcoin/pull/15788/commits/faf400077d0144363c2dd24187431d958fb149a9

Tree-SHA512: 8ac5692e72cf50e460958f291643ae6b8bb04d5c1331ed50dce9eb4e9457e5a925144c532c42b360a26707e11eeece74aab27db8c76ab9a429b9dd7167e7cdc4
This commit is contained in:
MarcoFalke committed 2019-04-15 11:28:25 -04:00
commit 78295e97b8
94 files changed
+317 -298

No files matched your search

@@ -20,6 +20,10 @@
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\src\test\util.h" />
<ClCompile Include="..\..\src\test\util.cpp" />
<ClCompile Include="..\..\src\test\setup_common.h" />
<ClCompile Include="..\..\src\test\setup_common.cpp" />
<ClCompile Include="..\..\src\bench\base58.cpp" /> <ClCompile Include="..\..\src\bench\base58.cpp" />
<ClCompile Include="..\..\src\bench\bech32.cpp" /> <ClCompile Include="..\..\src\bench\bech32.cpp" />
<ClCompile Include="..\..\src\bench\bench.cpp" /> <ClCompile Include="..\..\src\bench\bench.cpp" />
+1 -1
View File
@@ -24,7 +24,7 @@
<ClCompile Include="..\..\src\test\*_properties.cpp" /> <ClCompile Include="..\..\src\test\*_properties.cpp" />
<ClCompile Include="..\..\src\test\gen\*_gen.cpp" /> <ClCompile Include="..\..\src\test\gen\*_gen.cpp" />
<ClCompile Include="..\..\src\wallet\test\*_tests.cpp" /> <ClCompile Include="..\..\src\wallet\test\*_tests.cpp" />
<ClCompile Include="..\..\src\test\test_bitcoin.cpp" /> <ClCompile Include="..\..\src\test\setup_common.cpp" />
<ClCompile Include="..\..\src\test\main.cpp" /> <ClCompile Include="..\..\src\test\main.cpp" />
<ClCompile Include="..\..\src\wallet\test\*_fixture.cpp" /> <ClCompile Include="..\..\src\wallet\test\*_fixture.cpp" />
</ItemGroup> </ItemGroup>
+5 -1
View File
@@ -32,7 +32,11 @@ bench_bench_bitcoin_SOURCES = \
bench/bech32.cpp \ bench/bech32.cpp \
bench/lockedpool.cpp \ bench/lockedpool.cpp \
bench/poly1305.cpp \ bench/poly1305.cpp \
bench/prevector.cpp bench/prevector.cpp \
test/setup_common.h \
test/setup_common.cpp \
test/util.h \
test/util.cpp
nodist_bench_bench_bitcoin_SOURCES = $(GENERATED_BENCH_FILES) nodist_bench_bench_bitcoin_SOURCES = $(GENERATED_BENCH_FILES)
+2 -2
View File
@@ -33,10 +33,10 @@ TEST_QT_H = \
qt/test/wallettests.h qt/test/wallettests.h
TEST_BITCOIN_CPP = \ TEST_BITCOIN_CPP = \
test/test_bitcoin.cpp test/setup_common.cpp
TEST_BITCOIN_H = \ TEST_BITCOIN_H = \
test/test_bitcoin.h test/setup_common.h
qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \ qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
+4 -4
View File
@@ -52,12 +52,12 @@ GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.r
BITCOIN_TEST_SUITE = \ BITCOIN_TEST_SUITE = \
test/main.cpp \ test/main.cpp \
test/test_bitcoin.h \ test/setup_common.h \
test/test_bitcoin.cpp test/setup_common.cpp
FUZZ_SUITE = \ FUZZ_SUITE = \
test/test_bitcoin.h \ test/setup_common.h \
test/test_bitcoin.cpp \ test/setup_common.cpp \
test/fuzz/fuzz.cpp \ test/fuzz/fuzz.cpp \
test/fuzz/fuzz.h test/fuzz/fuzz.h
+16 -5
View File
@@ -1,15 +1,19 @@
// Copyright (c) 2015-2018 The Bitcoin Core developers // Copyright (c) 2015-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <bench/bench.h> #include <bench/bench.h>
#include <assert.h> #include <chainparams.h>
#include <iostream> #include <test/setup_common.h>
#include <iomanip> #include <validation.h>
#include <algorithm> #include <algorithm>
#include <regex> #include <assert.h>
#include <iomanip>
#include <iostream>
#include <numeric> #include <numeric>
#include <regex>
void benchmark::ConsolePrinter::header() void benchmark::ConsolePrinter::header()
{ {
@@ -108,6 +112,13 @@ void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double
printer.header(); printer.header();
for (const auto& p : benchmarks()) { for (const auto& p : benchmarks()) {
TestingSetup test{CBaseChainParams::REGTEST};
{
assert(::chainActive.Height() == 0);
const bool witness_enabled{IsWitnessEnabled(::chainActive.Tip(), Params().GetConsensus())};
assert(witness_enabled);
}
if (!std::regex_match(p.first, baseMatch, reFilter)) { if (!std::regex_match(p.first, baseMatch, reFilter)) {
continue; continue;
} }
+2 -24
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2018 The Bitcoin Core developers // Copyright (c) 2015-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,14 +6,11 @@
#include <crypto/sha256.h> #include <crypto/sha256.h>
#include <key.h> #include <key.h>
#include <util/system.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <validation.h> #include <util/system.h>
#include <memory> #include <memory>
const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
static const int64_t DEFAULT_BENCH_EVALUATIONS = 5; static const int64_t DEFAULT_BENCH_EVALUATIONS = 5;
static const char* DEFAULT_BENCH_FILTER = ".*"; static const char* DEFAULT_BENCH_FILTER = ".*";
static const char* DEFAULT_BENCH_SCALING = "1.0"; static const char* DEFAULT_BENCH_SCALING = "1.0";
@@ -36,14 +33,6 @@ static void SetupBenchArgs()
gArgs.AddArg("-plot-height=<x>", strprintf("Plot height in pixel (default: %u)", DEFAULT_PLOT_HEIGHT), false, OptionsCategory::OPTIONS); gArgs.AddArg("-plot-height=<x>", strprintf("Plot height in pixel (default: %u)", DEFAULT_PLOT_HEIGHT), false, OptionsCategory::OPTIONS);
} }
static fs::path SetDataDir()
{
fs::path ret = fs::temp_directory_path() / "bench_bitcoin" / fs::unique_path();
fs::create_directories(ret);
gArgs.ForceSetArg("-datadir", ret.string());
return ret;
}
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
SetupBenchArgs(); SetupBenchArgs();
@@ -59,13 +48,6 @@ int main(int argc, char** argv)
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
// Set the datadir after parsing the bench options
const fs::path bench_datadir{SetDataDir()};
SHA256AutoDetect();
ECC_Start();
SetupEnvironment();
int64_t evaluations = gArgs.GetArg("-evals", DEFAULT_BENCH_EVALUATIONS); int64_t evaluations = gArgs.GetArg("-evals", DEFAULT_BENCH_EVALUATIONS);
std::string regex_filter = gArgs.GetArg("-filter", DEFAULT_BENCH_FILTER); std::string regex_filter = gArgs.GetArg("-filter", DEFAULT_BENCH_FILTER);
std::string scaling_str = gArgs.GetArg("-scaling", DEFAULT_BENCH_SCALING); std::string scaling_str = gArgs.GetArg("-scaling", DEFAULT_BENCH_SCALING);
@@ -88,9 +70,5 @@ int main(int argc, char** argv)
benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, regex_filter, is_list_only); benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, regex_filter, is_list_only);
fs::remove_all(bench_datadir);
ECC_Stop();
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
+2 -73
View File
@@ -1,58 +1,18 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <bench/bench.h> #include <bench/bench.h>
#include <chainparams.h>
#include <coins.h>
#include <consensus/merkle.h>
#include <consensus/validation.h> #include <consensus/validation.h>
#include <crypto/sha256.h> #include <crypto/sha256.h>
#include <miner.h> #include <test/util.h>
#include <policy/policy.h>
#include <pow.h>
#include <scheduler.h>
#include <txdb.h>
#include <txmempool.h> #include <txmempool.h>
#include <util/time.h>
#include <validation.h> #include <validation.h>
#include <validationinterface.h>
#include <boost/thread.hpp>
#include <list> #include <list>
#include <vector> #include <vector>
static std::shared_ptr<CBlock> PrepareBlock(const CScript& coinbase_scriptPubKey)
{
auto block = std::make_shared<CBlock>(
BlockAssembler{Params()}
.CreateNewBlock(coinbase_scriptPubKey)
->block);
block->nTime = ::chainActive.Tip()->GetMedianTimePast() + 1;
block->hashMerkleRoot = BlockMerkleRoot(*block);
return block;
}
static CTxIn MineBlock(const CScript& coinbase_scriptPubKey)
{
auto block = PrepareBlock(coinbase_scriptPubKey);
while (!CheckProofOfWork(block->GetHash(), block->nBits, Params().GetConsensus())) {
++block->nNonce;
assert(block->nNonce);
}
bool processed{ProcessNewBlock(Params(), block, true, nullptr)};
assert(processed);
return CTxIn{block->vtx[0]->GetHash(), 0};
}
static void AssembleBlock(benchmark::State& state) static void AssembleBlock(benchmark::State& state)
{ {
const std::vector<unsigned char> op_true{OP_TRUE}; const std::vector<unsigned char> op_true{OP_TRUE};
@@ -64,32 +24,6 @@ static void AssembleBlock(benchmark::State& state)
const CScript SCRIPT_PUB{CScript(OP_0) << std::vector<unsigned char>{witness_program.begin(), witness_program.end()}}; const CScript SCRIPT_PUB{CScript(OP_0) << std::vector<unsigned char>{witness_program.begin(), witness_program.end()}};
// Switch to regtest so we can mine faster
// Also segwit is active, so we can include witness transactions
SelectParams(CBaseChainParams::REGTEST);
InitScriptExecutionCache();
boost::thread_group thread_group;
CScheduler scheduler;
{
LOCK(cs_main);
::pblocktree.reset(new CBlockTreeDB(1 << 20, true));
::pcoinsdbview.reset(new CCoinsViewDB(1 << 23, true));
::pcoinsTip.reset(new CCoinsViewCache(pcoinsdbview.get()));
}
{
const CChainParams& chainparams = Params();
thread_group.create_thread(std::bind(&CScheduler::serviceQueue, &scheduler));
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);
LoadGenesisBlock(chainparams);
CValidationState state;
ActivateBestChain(state, chainparams);
assert(::chainActive.Tip() != nullptr);
const bool witness_enabled{IsWitnessEnabled(::chainActive.Tip(), chainparams.GetConsensus())};
assert(witness_enabled);
}
// Collect some loose transactions that spend the coinbases of our mined blocks // Collect some loose transactions that spend the coinbases of our mined blocks
constexpr size_t NUM_BLOCKS{200}; constexpr size_t NUM_BLOCKS{200};
std::array<CTransactionRef, NUM_BLOCKS - COINBASE_MATURITY + 1> txs; std::array<CTransactionRef, NUM_BLOCKS - COINBASE_MATURITY + 1> txs;
@@ -114,11 +48,6 @@ static void AssembleBlock(benchmark::State& state)
while (state.KeepRunning()) { while (state.KeepRunning()) {
PrepareBlock(SCRIPT_PUB); PrepareBlock(SCRIPT_PUB);
} }
thread_group.interrupt_all();
thread_group.join_all();
GetMainSignals().FlushBackgroundCallbacks();
GetMainSignals().UnregisterBackgroundSignalScheduler();
} }
BENCHMARK(AssembleBlock, 700); BENCHMARK(AssembleBlock, 700);
+2 -35
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,15 +10,11 @@
#include <miner.h> #include <miner.h>
#include <policy/policy.h> #include <policy/policy.h>
#include <pow.h> #include <pow.h>
#include <scheduler.h> #include <test/util.h>
#include <txdb.h>
#include <txmempool.h> #include <txmempool.h>
#include <util/time.h>
#include <validation.h> #include <validation.h>
#include <validationinterface.h> #include <validationinterface.h>
#include <boost/thread.hpp>
#include <list> #include <list>
#include <vector> #include <vector>
@@ -27,31 +23,7 @@ static void DuplicateInputs(benchmark::State& state)
{ {
const CScript SCRIPT_PUB{CScript(OP_TRUE)}; const CScript SCRIPT_PUB{CScript(OP_TRUE)};
// Switch to regtest so we can mine faster
// Also segwit is active, so we can include witness transactions
SelectParams(CBaseChainParams::REGTEST);
InitScriptExecutionCache();
boost::thread_group thread_group;
CScheduler scheduler;
const CChainParams& chainparams = Params(); const CChainParams& chainparams = Params();
{
LOCK(cs_main);
::pblocktree.reset(new CBlockTreeDB(1 << 20, true));
::pcoinsdbview.reset(new CCoinsViewDB(1 << 23, true));
::pcoinsTip.reset(new CCoinsViewCache(pcoinsdbview.get()));
}
{
thread_group.create_thread(std::bind(&CScheduler::serviceQueue, &scheduler));
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);
LoadGenesisBlock(chainparams);
CValidationState cvstate;
ActivateBestChain(cvstate, chainparams);
assert(::chainActive.Tip() != nullptr);
const bool witness_enabled{IsWitnessEnabled(::chainActive.Tip(), chainparams.GetConsensus())};
assert(witness_enabled);
}
CBlock block{}; CBlock block{};
CMutableTransaction coinbaseTx{}; CMutableTransaction coinbaseTx{};
@@ -92,11 +64,6 @@ static void DuplicateInputs(benchmark::State& state)
assert(!CheckBlock(block, cvstate, chainparams.GetConsensus(), false, false)); assert(!CheckBlock(block, cvstate, chainparams.GetConsensus(), false, false));
assert(cvstate.GetRejectReason() == "bad-txns-inputs-duplicate"); assert(cvstate.GetRejectReason() == "bad-txns-inputs-duplicate");
} }
thread_group.interrupt_all();
thread_group.join_all();
GetMainSignals().FlushBackgroundCallbacks();
GetMainSignals().UnregisterBackgroundSignalScheduler();
} }
BENCHMARK(DuplicateInputs, 10); BENCHMARK(DuplicateInputs, 10);
+1 -1
View File
@@ -1,6 +1,6 @@
#include <qt/test/addressbooktests.h> #include <qt/test/addressbooktests.h>
#include <qt/test/util.h> #include <qt/test/util.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <interfaces/chain.h> #include <interfaces/chain.h>
#include <interfaces/node.h> #include <interfaces/node.h>
+1 -1
View File
@@ -12,7 +12,7 @@
#include <rpc/register.h> #include <rpc/register.h>
#include <rpc/server.h> #include <rpc/server.h>
#include <qt/rpcconsole.h> #include <qt/rpcconsole.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <univalue.h> #include <univalue.h>
#include <util/system.h> #include <util/system.h>
+1 -1
View File
@@ -15,7 +15,7 @@
#include <qt/transactionview.h> #include <qt/transactionview.h>
#include <qt/walletmodel.h> #include <qt/walletmodel.h>
#include <key_io.h> #include <key_io.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <validation.h> #include <validation.h>
#include <wallet/wallet.h> #include <wallet/wallet.h>
#include <qt/overviewpage.h> #include <qt/overviewpage.h>
+1 -1
View File
@@ -42,7 +42,7 @@ unit tests as possible).
The build system is setup to compile an executable called `test_bitcoin` The build system is setup to compile an executable called `test_bitcoin`
that runs all of the unit tests. The main source file is called that runs all of the unit tests. The main source file is called
test_bitcoin.cpp. To add a new unit test file to our test suite you need setup_common.cpp. To add a new unit test file to our test suite you need
to add the file to `src/Makefile.test.include`. The pattern is to create to add the file to `src/Makefile.test.include`. The pattern is to create
one test file for each class or source file for which you want to create one test file for each class or source file for which you want to create
unit tests. The file naming convention is `<source_filename>_tests.cpp` unit tests. The file naming convention is `<source_filename>_tests.cpp`
+2 -2
View File
@@ -1,8 +1,8 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <addrman.h> #include <addrman.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <string> #include <string>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <util/system.h> #include <util/system.h>
#include <support/allocators/secure.h> #include <support/allocators/secure.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <memory> #include <memory>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2016-2018 The Bitcoin Core developers // Copyright (c) 2016-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <amount.h> #include <amount.h>
#include <policy/feerate.h> #include <policy/feerate.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,7 +12,7 @@
#include <arith_uint256.h> #include <arith_uint256.h>
#include <string> #include <string>
#include <version.h> #include <version.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
BOOST_FIXTURE_TEST_SUITE(arith_uint256_tests, BasicTestingSetup) BOOST_FIXTURE_TEST_SUITE(arith_uint256_tests, BasicTestingSetup)
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/data/base58_encode_decode.json.h> #include <test/data/base58_encode_decode.json.h>
#include <base58.h> #include <base58.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <univalue.h> #include <univalue.h>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+1 -1
View File
@@ -3,7 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <bech32.h> #include <bech32.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2013-2018 The Bitcoin Core developers // Copyright (c) 2013-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
#include <uint256.h> #include <uint256.h>
#include <util/system.h> #include <util/system.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <string> #include <string>
#include <vector> #include <vector>
+1 -1
View File
@@ -3,7 +3,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <rpc/blockchain.h> #include <rpc/blockchain.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
/* Equality between doubles is imprecise. Comparison should be done /* Equality between doubles is imprecise. Comparison should be done
* with a small threshold of tolerance, rather than exact equality. * with a small threshold of tolerance, rather than exact equality.
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,7 +8,7 @@
#include <pow.h> #include <pow.h>
#include <random.h> #include <random.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2018 The Bitcoin Core developers // Copyright (c) 2018-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/data/blockfilters.json.h> #include <test/data/blockfilters.json.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <blockfilter.h> #include <blockfilter.h>
#include <core_io.h> #include <core_io.h>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -15,7 +15,7 @@
#include <uint256.h> #include <uint256.h>
#include <util/system.h> #include <util/system.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2016-2018 The Bitcoin Core developers // Copyright (c) 2016-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <compat/byteswap.h> #include <compat/byteswap.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,7 +6,7 @@
#include <util/time.h> #include <util/time.h>
#include <validation.h> #include <validation.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <checkqueue.h> #include <checkqueue.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 The Bitcoin Core developers // Copyright (c) 2014-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,7 +6,7 @@
#include <coins.h> #include <coins.h>
#include <consensus/validation.h> #include <consensus/validation.h>
#include <script/standard.h> #include <script/standard.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <uint256.h> #include <uint256.h>
#include <undo.h> #include <undo.h>
#include <util/strencodings.h> #include <util/strencodings.h>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <compressor.h> #include <compressor.h>
#include <util/system.h> #include <util/system.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <stdint.h> #include <stdint.h>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 The Bitcoin Core developers // Copyright (c) 2014-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -13,7 +13,7 @@
#include <crypto/hmac_sha512.h> #include <crypto/hmac_sha512.h>
#include <random.h> #include <random.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <cuckoocache.h> #include <cuckoocache.h>
#include <script/sigcache.h> #include <script/sigcache.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <random.h> #include <random.h>
#include <thread> #include <thread>
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <dbwrapper.h> #include <dbwrapper.h>
#include <uint256.h> #include <uint256.h>
#include <random.h> #include <random.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <memory> #include <memory>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -15,7 +15,7 @@
#include <util/system.h> #include <util/system.h>
#include <validation.h> #include <validation.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <stdint.h> #include <stdint.h>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2018 The Bitcoin Core developers // Copyright (c) 2018-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,7 +6,7 @@
#include <string> #include <string>
#include <script/sign.h> #include <script/sign.h>
#include <script/standard.h> #include <script/standard.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <script/descriptor.h> #include <script/descriptor.h>
#include <util/strencodings.h> #include <util/strencodings.h>
+1 -1
View File
@@ -3,7 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <flatfile.h> #include <flatfile.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
// //
#include <fs.h> #include <fs.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2009-2018 The Bitcoin Core developers // Copyright (c) 2009-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <util/strencodings.h> #include <util/strencodings.h>
#include <util/system.h> #include <util/system.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <string> #include <string>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright (c) 2013-2018 The Bitcoin Core developers // Copyright (c) 2013-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <crypto/siphash.h> #include <crypto/siphash.h>
#include <hash.h> #include <hash.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
#include <key_io.h> #include <key_io.h>
#include <script/script.h> #include <script/script.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2018 The Bitcoin Core developers // Copyright (c) 2018-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <key.h> #include <key.h>
@@ -8,7 +8,7 @@
#include <uint256.h> #include <uint256.h>
#include <util/system.h> #include <util/system.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <string> #include <string>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
#include <uint256.h> #include <uint256.h>
#include <util/system.h> #include <util/system.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <string> #include <string>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <limitedmap.h> #include <limitedmap.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,7 +6,7 @@
#include <txmempool.h> #include <txmempool.h>
#include <util/system.h> #include <util/system.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <list> #include <list>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2015-2018 The Bitcoin Core developers // Copyright (c) 2015-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <consensus/merkle.h> #include <consensus/merkle.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <merkleblock.h> #include <merkleblock.h>
#include <uint256.h> #include <uint256.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -18,7 +18,7 @@
#include <util/system.h> #include <util/system.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <memory> #include <memory>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,7 +11,7 @@
#include <script/sign.h> #include <script/sign.h>
#include <script/ismine.h> #include <script/ismine.h>
#include <uint256.h> #include <uint256.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,8 +1,8 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <addrman.h> #include <addrman.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <string> #include <string>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <hash.h> #include <hash.h>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <netbase.h> #include <netbase.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <string> #include <string>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
#include <uint256.h> #include <uint256.h>
#include <arith_uint256.h> #include <arith_uint256.h>
#include <version.h> #include <version.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,7 +8,7 @@
#include <uint256.h> #include <uint256.h>
#include <util/system.h> #include <util/system.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2018 The Bitcoin Core developers // Copyright (c) 2015-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -7,7 +7,7 @@
#include <pow.h> #include <pow.h>
#include <random.h> #include <random.h>
#include <util/system.h> #include <util/system.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2015-2018 The Bitcoin Core developers // Copyright (c) 2015-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
#include <serialize.h> #include <serialize.h>
#include <streams.h> #include <streams.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2016-2018 The Bitcoin Core developers // Copyright (c) 2016-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,7 +12,7 @@
#include <support/events.h> #include <support/events.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2017-2018 The Bitcoin Core developers // Copyright (c) 2017-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <random.h> #include <random.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2015-2018 The Bitcoin Core developers // Copyright (c) 2015-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <reverselock.h> #include <reverselock.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,7 +12,7 @@
#include <key_io.h> #include <key_io.h>
#include <netbase.h> #include <netbase.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <compat/sanity.h> #include <compat/sanity.h>
#include <key.h> #include <key.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <random.h> #include <random.h>
#include <scheduler.h> #include <scheduler.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -13,7 +13,7 @@
#include <policy/settings.h> #include <policy/settings.h>
#include <script/sign.h> #include <script/sign.h>
#include <script/ismine.h> #include <script/ismine.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2017-2018 The Bitcoin Core developers // Copyright (c) 2017-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,7 +8,7 @@
#include <script/script.h> #include <script/script.h>
#include <script/script_error.h> #include <script/script_error.h>
#include <script/standard.h> #include <script/standard.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,7 +12,7 @@
#include <script/sign.h> #include <script/sign.h>
#include <util/system.h> #include <util/system.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <rpc/util.h> #include <rpc/util.h>
#if defined(HAVE_CONSENSUS_LIB) #if defined(HAVE_CONSENSUS_LIB)
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/scriptnum10.h> #include <test/scriptnum10.h>
#include <script/script.h> #include <script/script.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <limits.h> #include <limits.h>
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <serialize.h> #include <serialize.h>
#include <streams.h> #include <streams.h>
#include <hash.h> #include <hash.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <stdint.h> #include <stdint.h>
@@ -1,8 +1,8 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <banman.h> #include <banman.h>
#include <chainparams.h> #include <chainparams.h>
@@ -33,7 +33,7 @@ std::ostream& operator<<(std::ostream& os, const uint256& num)
} }
BasicTestingSetup::BasicTestingSetup(const std::string& chainName) BasicTestingSetup::BasicTestingSetup(const std::string& chainName)
: m_path_root(fs::temp_directory_path() / "test_bitcoin" / strprintf("%lu_%i", (unsigned long)GetTime(), (int)(InsecureRandRange(1 << 30)))) : m_path_root(fs::temp_directory_path() / "test_common_" PACKAGE_NAME / strprintf("%lu_%i", (unsigned long)GetTime(), (int)(InsecureRandRange(1 << 30))))
{ {
SHA256AutoDetect(); SHA256AutoDetect();
ECC_Start(); ECC_Start();
@@ -42,9 +42,6 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName)
InitSignatureCache(); InitSignatureCache();
InitScriptExecutionCache(); InitScriptExecutionCache();
fCheckBlockIndex = true; fCheckBlockIndex = true;
// CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
// TODO: fix the code to support SegWit blocks.
gArgs.ForceSetArg("-vbparams", strprintf("segwit:0:%d", (int64_t)Consensus::BIP9Deployment::NO_TIMEOUT));
SelectParams(chainName); SelectParams(chainName);
noui_connect(); noui_connect();
} }
@@ -115,6 +112,11 @@ TestingSetup::~TestingSetup()
TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST) TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST)
{ {
// CreateAndProcessBlock() does not support building SegWit blocks, so don't activate in these tests.
// TODO: fix the code to support SegWit blocks.
gArgs.ForceSetArg("-vbparams", strprintf("segwit:0:%d", (int64_t)Consensus::BIP9Deployment::NO_TIMEOUT));
SelectParams(CBaseChainParams::REGTEST);
// Generate a 100-block chain: // Generate a 100-block chain:
coinbaseKey.MakeNewKey(true); coinbaseKey.MakeNewKey(true);
CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG; CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;
@@ -1,9 +1,9 @@
// Copyright (c) 2015-2018 The Bitcoin Core developers // Copyright (c) 2015-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_TEST_TEST_BITCOIN_H #ifndef BITCOIN_TEST_SETUP_COMMON_H
#define BITCOIN_TEST_TEST_BITCOIN_H #define BITCOIN_TEST_SETUP_COMMON_H
#include <chainparamsbase.h> #include <chainparamsbase.h>
#include <fs.h> #include <fs.h>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2013-2018 The Bitcoin Core developers // Copyright (c) 2013-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,7 +10,7 @@
#include <script/script.h> #include <script/script.h>
#include <serialize.h> #include <serialize.h>
#include <streams.h> #include <streams.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <util/system.h> #include <util/system.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <version.h> #include <version.h>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
#include <script/script.h> #include <script/script.h>
#include <script/standard.h> #include <script/standard.h>
#include <uint256.h> #include <uint256.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2014-2018 The Bitcoin Core developers // Copyright (c) 2014-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chain.h> #include <chain.h>
#include <util/system.h> #include <util/system.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2012-2018 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <streams.h> #include <streams.h>
#include <support/allocators/zeroafterfree.h> #include <support/allocators/zeroafterfree.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2012-2017 The Bitcoin Core developers // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <sync.h> #include <sync.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,9 +1,9 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
// //
#include <timedata.h> #include <timedata.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+1 -1
View File
@@ -2,7 +2,7 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
// //
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <torcontrol.h> #include <torcontrol.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/data/tx_invalid.json.h> #include <test/data/tx_invalid.json.h>
#include <test/data/tx_valid.json.h> #include <test/data/tx_valid.json.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <clientversion.h> #include <clientversion.h>
#include <checkqueue.h> #include <checkqueue.h>
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright (c) 2017-2018 The Bitcoin Core developers // Copyright (c) 2017-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chainparams.h> #include <chainparams.h>
#include <index/txindex.h> #include <index/txindex.h>
#include <script/standard.h> #include <script/standard.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <util/system.h> #include <util/system.h>
#include <util/time.h> #include <util/time.h>
#include <validation.h> #include <validation.h>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2017-2018 The Bitcoin Core developers // Copyright (c) 2017-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,7 +8,7 @@
#include <consensus/validation.h> #include <consensus/validation.h>
#include <primitives/transaction.h> #include <primitives/transaction.h>
#include <script/script.h> #include <script/script.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,7 +11,7 @@
#include <random.h> #include <random.h>
#include <script/standard.h> #include <script/standard.h>
#include <script/sign.h> #include <script/sign.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <util/time.h> #include <util/time.h>
#include <core_io.h> #include <core_io.h>
#include <keystore.h> #include <keystore.h>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <arith_uint256.h> #include <arith_uint256.h>
#include <uint256.h> #include <uint256.h>
#include <version.h> #include <version.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <stdint.h> #include <stdint.h>
+90
View File
@@ -0,0 +1,90 @@
// 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 <test/util.h>
#include <chainparams.h>
#include <consensus/merkle.h>
#include <consensus/validation.h>
#include <key_io.h>
#include <miner.h>
#include <outputtype.h>
#include <pow.h>
#include <scheduler.h>
#include <script/standard.h>
#include <txdb.h>
#include <validation.h>
#include <validationinterface.h>
#ifdef ENABLE_WALLET
#include <wallet/wallet.h>
#endif
#include <boost/thread.hpp>
#ifdef ENABLE_WALLET
std::string getnewaddress(CWallet& w)
{
constexpr auto output_type = OutputType::BECH32;
CPubKey new_key;
if (!w.GetKeyFromPool(new_key)) assert(false);
w.LearnRelatedScripts(new_key, output_type);
const auto dest = GetDestinationForKey(new_key, output_type);
w.SetAddressBook(dest, /* label */ "", "receive");
return EncodeDestination(dest);
}
void importaddress(CWallet& wallet, const std::string& address)
{
LOCK(wallet.cs_wallet);
const auto dest = DecodeDestination(address);
assert(IsValidDestination(dest));
const auto script = GetScriptForDestination(dest);
wallet.MarkDirty();
assert(!wallet.HaveWatchOnly(script));
if (!wallet.AddWatchOnly(script, 0 /* nCreateTime */)) assert(false);
wallet.SetAddressBook(dest, /* label */ "", "receive");
}
#endif // ENABLE_WALLET
CTxIn generatetoaddress(const std::string& address)
{
const auto dest = DecodeDestination(address);
assert(IsValidDestination(dest));
const auto coinbase_script = GetScriptForDestination(dest);
return MineBlock(coinbase_script);
}
CTxIn MineBlock(const CScript& coinbase_scriptPubKey)
{
auto block = PrepareBlock(coinbase_scriptPubKey);
while (!CheckProofOfWork(block->GetHash(), block->nBits, Params().GetConsensus())) {
++block->nNonce;
assert(block->nNonce);
}
bool processed{ProcessNewBlock(Params(), block, true, nullptr)};
assert(processed);
return CTxIn{block->vtx[0]->GetHash(), 0};
}
std::shared_ptr<CBlock> PrepareBlock(const CScript& coinbase_scriptPubKey)
{
auto block = std::make_shared<CBlock>(
BlockAssembler{Params()}
.CreateNewBlock(coinbase_scriptPubKey)
->block);
block->nTime = ::chainActive.Tip()->GetMedianTimePast() + 1;
block->hashMerkleRoot = BlockMerkleRoot(*block);
return block;
}
+34
View File
@@ -0,0 +1,34 @@
// 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.
#ifndef BITCOIN_TEST_UTIL_H
#define BITCOIN_TEST_UTIL_H
#include <memory>
#include <string>
class CBlock;
class CScript;
class CTxIn;
class CWallet;
// Lower-level utils //
/** Returns the generated coin */
CTxIn MineBlock(const CScript& coinbase_scriptPubKey);
/** Prepare a block to be mined */
std::shared_ptr<CBlock> PrepareBlock(const CScript& coinbase_scriptPubKey);
// RPC-like //
/** Import the address to the wallet */
void importaddress(CWallet& wallet, const std::string& address);
/** Returns a new address from the wallet */
std::string getnewaddress(CWallet& w);
/** Returns the generated coin */
CTxIn generatetoaddress(const std::string& address);
#endif // BITCOIN_TEST_UTIL_H
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018 The Bitcoin Core developers // Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
#include <sync.h> #include <sync.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <util/moneystr.h> #include <util/moneystr.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <stdint.h> #include <stdint.h>
#include <vector> #include <vector>
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2018 The Bitcoin Core developers // Copyright (c) 2018-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,7 +10,7 @@
#include <miner.h> #include <miner.h>
#include <pow.h> #include <pow.h>
#include <random.h> #include <random.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <validation.h> #include <validation.h>
#include <validationinterface.h> #include <validationinterface.h>
+1 -1
View File
@@ -6,7 +6,7 @@
#include <net.h> #include <net.h>
#include <validation.h> #include <validation.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <boost/signals2/signal.hpp> #include <boost/signals2/signal.hpp>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+2 -2
View File
@@ -1,10 +1,10 @@
// Copyright (c) 2014-2018 The Bitcoin Core developers // Copyright (c) 2014-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chain.h> #include <chain.h>
#include <versionbits.h> #include <versionbits.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <chainparams.h> #include <chainparams.h>
#include <validation.h> #include <validation.h>
#include <consensus/params.h> #include <consensus/params.h>
+1 -1
View File
@@ -8,7 +8,7 @@
#include <amount.h> #include <amount.h>
#include <primitives/transaction.h> #include <primitives/transaction.h>
#include <random.h> #include <random.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <wallet/test/wallet_test_fixture.h> #include <wallet/test/wallet_test_fixture.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
+1 -1
View File
@@ -7,7 +7,7 @@
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <fs.h> #include <fs.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <wallet/db.h> #include <wallet/db.h>
+1 -1
View File
@@ -6,7 +6,7 @@
#define BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H #define BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H
#include <interfaces/chain.h> #include <interfaces/chain.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
struct InitWalletDirTestingSetup: public BasicTestingSetup { struct InitWalletDirTestingSetup: public BasicTestingSetup {
+1 -1
View File
@@ -4,7 +4,7 @@
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <wallet/test/init_test_fixture.h> #include <wallet/test/init_test_fixture.h>
#include <init.h> #include <init.h>
+1 -1
View File
@@ -12,7 +12,7 @@
#include <univalue.h> #include <univalue.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <wallet/test/wallet_test_fixture.h> #include <wallet/test/wallet_test_fixture.h>
BOOST_FIXTURE_TEST_SUITE(psbt_wallet_tests, WalletTestingSetup) BOOST_FIXTURE_TEST_SUITE(psbt_wallet_tests, WalletTestingSetup)
+1 -1
View File
@@ -2,7 +2,7 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <util/strencodings.h> #include <util/strencodings.h>
#include <wallet/crypter.h> #include <wallet/crypter.h>
+1 -1
View File
@@ -5,7 +5,7 @@
#ifndef BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H #ifndef BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H
#define BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H #define BITCOIN_WALLET_TEST_WALLET_TEST_FIXTURE_H
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <interfaces/chain.h> #include <interfaces/chain.h>
#include <interfaces/wallet.h> #include <interfaces/wallet.h>
+1 -1
View File
@@ -13,7 +13,7 @@
#include <consensus/validation.h> #include <consensus/validation.h>
#include <interfaces/chain.h> #include <interfaces/chain.h>
#include <rpc/server.h> #include <rpc/server.h>
#include <test/test_bitcoin.h> #include <test/setup_common.h>
#include <validation.h> #include <validation.h>
#include <wallet/coincontrol.h> #include <wallet/coincontrol.h>
#include <wallet/test/wallet_test_fixture.h> #include <wallet/test/wallet_test_fixture.h>