mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Move ::nPruneTarget into BlockManager
This commit is contained in:
@@ -381,7 +381,7 @@ struct SnapshotTestSetup : TestChain100Setup {
|
||||
// For robustness, ensure the old manager is destroyed before creating a
|
||||
// new one.
|
||||
m_node.chainman.reset();
|
||||
m_node.chainman.reset(new ChainstateManager(chainman_opts));
|
||||
m_node.chainman = std::make_unique<ChainstateManager>(chainman_opts, node::BlockManager::Options{});
|
||||
}
|
||||
return *Assert(m_node.chainman);
|
||||
}
|
||||
@@ -588,7 +588,7 @@ BOOST_FIXTURE_TEST_CASE(chainstatemanager_snapshot_completion, SnapshotTestSetup
|
||||
// chainstate_snapshot should still exist.
|
||||
BOOST_CHECK(fs::exists(snapshot_chainstate_dir));
|
||||
|
||||
// Test that simulating a shutdown (reseting ChainstateManager) and then performing
|
||||
// Test that simulating a shutdown (resetting ChainstateManager) and then performing
|
||||
// chainstate reinitializing successfully cleans up the background-validation
|
||||
// chainstate data, and we end up with a single chainstate that is at tip.
|
||||
ChainstateManager& chainman_restarted = this->SimulateNodeRestart();
|
||||
@@ -660,7 +660,7 @@ BOOST_FIXTURE_TEST_CASE(chainstatemanager_snapshot_completion_hash_mismatch, Sna
|
||||
fs::path snapshot_invalid_dir = gArgs.GetDataDirNet() / "chainstate_snapshot_INVALID";
|
||||
BOOST_CHECK(fs::exists(snapshot_invalid_dir));
|
||||
|
||||
// Test that simulating a shutdown (reseting ChainstateManager) and then performing
|
||||
// Test that simulating a shutdown (resetting ChainstateManager) and then performing
|
||||
// chainstate reinitializing successfully loads only the fully-validated
|
||||
// chainstate data, and we end up with a single chainstate that is at tip.
|
||||
ChainstateManager& chainman_restarted = this->SimulateNodeRestart();
|
||||
|
||||
Reference in New Issue
Block a user