Bitcoin Core 28.99.0
P2P Digital Currency
|
#include <chainparams.h>
#include <consensus/validation.h>
#include <kernel/disconnected_transactions.h>
#include <node/chainstatemanager_args.h>
#include <node/kernel_notifications.h>
#include <node/utxo_snapshot.h>
#include <random.h>
#include <rpc/blockchain.h>
#include <sync.h>
#include <test/util/chainstate.h>
#include <test/util/logging.h>
#include <test/util/random.h>
#include <test/util/setup_common.h>
#include <test/util/validation.h>
#include <uint256.h>
#include <util/result.h>
#include <util/vector.h>
#include <validation.h>
#include <validationinterface.h>
#include <tinyformat.h>
#include <vector>
#include <boost/test/unit_test.hpp>
Go to the source code of this file.
Classes | |
struct | SnapshotTestSetup |
Functions | |
BOOST_FIXTURE_TEST_CASE (chainstatemanager, TestChain100Setup) | |
Basic tests for ChainstateManager. More... | |
BOOST_FIXTURE_TEST_CASE (chainstatemanager_rebalance_caches, TestChain100Setup) | |
Test rebalancing the caches associated with each chainstate. More... | |
BOOST_FIXTURE_TEST_CASE (chainstatemanager_activate_snapshot, SnapshotTestSetup) | |
Test basic snapshot activation. More... | |
BOOST_FIXTURE_TEST_CASE (chainstatemanager_loadblockindex, TestChain100Setup) | |
Test LoadBlockIndex behavior when multiple chainstates are in use. More... | |
BOOST_FIXTURE_TEST_CASE (chainstatemanager_snapshot_init, SnapshotTestSetup) | |
Ensure that snapshot chainstates initialize properly when found on disk. More... | |
BOOST_FIXTURE_TEST_CASE (chainstatemanager_snapshot_completion, SnapshotTestSetup) | |
BOOST_FIXTURE_TEST_CASE (chainstatemanager_snapshot_completion_hash_mismatch, SnapshotTestSetup) | |
template<typename Options > | |
util::Result< Options > | SetOptsFromArgs (ArgsManager &args_man, Options opts, const std::vector< const char * > &args) |
Helper function to parse args into args_man and return the result of applying them to opts. More... | |
BOOST_FIXTURE_TEST_CASE (chainstatemanager_args, BasicTestingSetup) | |
BOOST_FIXTURE_TEST_CASE | ( | chainstatemanager | , |
TestChain100Setup | |||
) |
Basic tests for ChainstateManager.
First create a legacy (IBD) chainstate, then create a snapshot chainstate.
Definition at line 40 of file validation_chainstatemanager_tests.cpp.
BOOST_FIXTURE_TEST_CASE | ( | chainstatemanager_activate_snapshot | , |
SnapshotTestSetup | |||
) |
Test basic snapshot activation.
Definition at line 407 of file validation_chainstatemanager_tests.cpp.
BOOST_FIXTURE_TEST_CASE | ( | chainstatemanager_args | , |
BasicTestingSetup | |||
) |
Try to apply the provided args to a ChainstateManager::Options
Like get_opts, but requires the provided args to be valid and unwraps the result
Definition at line 790 of file validation_chainstatemanager_tests.cpp.
BOOST_FIXTURE_TEST_CASE | ( | chainstatemanager_loadblockindex | , |
TestChain100Setup | |||
) |
Test LoadBlockIndex behavior when multiple chainstates are in use.
Definition at line 422 of file validation_chainstatemanager_tests.cpp.
BOOST_FIXTURE_TEST_CASE | ( | chainstatemanager_rebalance_caches | , |
TestChain100Setup | |||
) |
Test rebalancing the caches associated with each chainstate.
Definition at line 112 of file validation_chainstatemanager_tests.cpp.
BOOST_FIXTURE_TEST_CASE | ( | chainstatemanager_snapshot_completion | , |
SnapshotTestSetup | |||
) |
Definition at line 625 of file validation_chainstatemanager_tests.cpp.
BOOST_FIXTURE_TEST_CASE | ( | chainstatemanager_snapshot_completion_hash_mismatch | , |
SnapshotTestSetup | |||
) |
Definition at line 708 of file validation_chainstatemanager_tests.cpp.
BOOST_FIXTURE_TEST_CASE | ( | chainstatemanager_snapshot_init | , |
SnapshotTestSetup | |||
) |
Ensure that snapshot chainstates initialize properly when found on disk.
Definition at line 556 of file validation_chainstatemanager_tests.cpp.
util::Result< Options > SetOptsFromArgs | ( | ArgsManager & | args_man, |
Options | opts, | ||
const std::vector< const char * > & | args | ||
) |
Helper function to parse args into args_man and return the result of applying them to opts.
Definition at line 777 of file validation_chainstatemanager_tests.cpp.