Move ::nPruneTarget into BlockManager

This commit is contained in:
MarcoFalke
2023-01-03 13:12:45 +01:00
parent 460e394625
commit fa721f1cab
13 changed files with 109 additions and 36 deletions

View File

@@ -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();