mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-11 17:52:48 +01:00
test: Use clang-tidy named args for create_chainman
https://github.com/bitcoin/bitcoin/pull/30595#discussion_r2653846863
This commit is contained in:
@@ -792,7 +792,9 @@ void chainman_reindex_test(TestDirectory& test_directory)
|
||||
{
|
||||
auto notifications{std::make_shared<TestKernelNotifications>()};
|
||||
auto context{create_context(notifications, ChainType::MAINNET)};
|
||||
auto chainman{create_chainman(test_directory, true, false, false, false, context)};
|
||||
auto chainman{create_chainman(
|
||||
test_directory, /*reindex=*/true, /*wipe_chainstate=*/false,
|
||||
/*block_tree_db_in_memory=*/false, /*chainstate_db_in_memory=*/false, context)};
|
||||
|
||||
std::vector<std::string> import_files;
|
||||
BOOST_CHECK(chainman->ImportBlocks(import_files));
|
||||
@@ -835,7 +837,9 @@ void chainman_reindex_chainstate_test(TestDirectory& test_directory)
|
||||
{
|
||||
auto notifications{std::make_shared<TestKernelNotifications>()};
|
||||
auto context{create_context(notifications, ChainType::MAINNET)};
|
||||
auto chainman{create_chainman(test_directory, false, true, false, false, context)};
|
||||
auto chainman{create_chainman(
|
||||
test_directory, /*reindex=*/false, /*wipe_chainstate=*/true,
|
||||
/*block_tree_db_in_memory=*/false, /*chainstate_db_in_memory=*/false, context)};
|
||||
|
||||
std::vector<std::string> import_files;
|
||||
import_files.push_back((test_directory.m_directory / "blocks" / "blk00000.dat").string());
|
||||
@@ -847,7 +851,9 @@ void chainman_mainnet_validation_test(TestDirectory& test_directory)
|
||||
auto notifications{std::make_shared<TestKernelNotifications>()};
|
||||
auto validation_interface{std::make_shared<TestValidationInterface>()};
|
||||
auto context{create_context(notifications, ChainType::MAINNET, validation_interface)};
|
||||
auto chainman{create_chainman(test_directory, false, false, false, false, context)};
|
||||
auto chainman{create_chainman(
|
||||
test_directory, /*reindex=*/false, /*wipe_chainstate=*/false,
|
||||
/*block_tree_db_in_memory=*/false, /*chainstate_db_in_memory=*/false, context)};
|
||||
|
||||
// mainnet block 1
|
||||
auto raw_block = hex_string_to_byte_vec("010000006fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1cdb606e857233e0e61bc6649ffff001d01e362990101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000");
|
||||
@@ -975,7 +981,9 @@ BOOST_AUTO_TEST_CASE(btck_chainman_in_memory_tests)
|
||||
|
||||
auto notifications{std::make_shared<TestKernelNotifications>()};
|
||||
auto context{create_context(notifications, ChainType::REGTEST)};
|
||||
auto chainman{create_chainman(in_memory_test_directory, false, false, true, true, context)};
|
||||
auto chainman{create_chainman(
|
||||
in_memory_test_directory, /*reindex=*/false, /*wipe_chainstate=*/false,
|
||||
/*block_tree_db_in_memory=*/true, /*chainstate_db_in_memory=*/true, context)};
|
||||
|
||||
for (auto& raw_block : REGTEST_BLOCK_DATA) {
|
||||
Block block{hex_string_to_byte_vec(raw_block)};
|
||||
@@ -999,7 +1007,9 @@ BOOST_AUTO_TEST_CASE(btck_chainman_regtest_tests)
|
||||
auto context{create_context(notifications, ChainType::REGTEST)};
|
||||
|
||||
{
|
||||
auto chainman{create_chainman(test_directory, false, false, false, false, context)};
|
||||
auto chainman{create_chainman(
|
||||
test_directory, /*reindex=*/false, /*wipe_chainstate=*/false,
|
||||
/*block_tree_db_in_memory=*/false, /*chainstate_db_in_memory=*/false, context)};
|
||||
for (const auto& data : REGTEST_BLOCK_DATA) {
|
||||
Block block{hex_string_to_byte_vec(data)};
|
||||
BlockHeader header = block.GetHeader();
|
||||
@@ -1021,7 +1031,9 @@ BOOST_AUTO_TEST_CASE(btck_chainman_regtest_tests)
|
||||
const size_t mid{REGTEST_BLOCK_DATA.size() / 2};
|
||||
|
||||
{
|
||||
auto chainman{create_chainman(test_directory, false, false, false, false, context)};
|
||||
auto chainman{create_chainman(
|
||||
test_directory, /*reindex=*/false, /*wipe_chainstate=*/false,
|
||||
/*block_tree_db_in_memory=*/false, /*chainstate_db_in_memory=*/false, context)};
|
||||
for (size_t i{0}; i < mid; i++) {
|
||||
Block block{hex_string_to_byte_vec(REGTEST_BLOCK_DATA[i])};
|
||||
bool new_block{false};
|
||||
@@ -1030,7 +1042,9 @@ BOOST_AUTO_TEST_CASE(btck_chainman_regtest_tests)
|
||||
}
|
||||
}
|
||||
|
||||
auto chainman{create_chainman(test_directory, false, false, false, false, context)};
|
||||
auto chainman{create_chainman(
|
||||
test_directory, /*reindex=*/false, /*wipe_chainstate=*/false,
|
||||
/*block_tree_db_in_memory=*/false, /*chainstate_db_in_memory=*/false, context)};
|
||||
|
||||
for (size_t i{mid}; i < REGTEST_BLOCK_DATA.size(); i++) {
|
||||
Block block{hex_string_to_byte_vec(REGTEST_BLOCK_DATA[i])};
|
||||
|
||||
Reference in New Issue
Block a user