mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 02:50:38 +01:00
refactor: Convert ChainstateRole enum to struct
Change ChainstateRole parameter passed to wallets and indexes. Wallets and indexes need to know whether chainstate is historical and whether it is fully validated. They should not be aware of the assumeutxo snapshot validation process.
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
using kernel::ChainstateRole;
|
||||
|
||||
// Taken from validation.cpp
|
||||
static constexpr auto DATABASE_WRITE_INTERVAL_MIN{50min};
|
||||
static constexpr auto DATABASE_WRITE_INTERVAL_MAX{70min};
|
||||
@@ -18,7 +20,7 @@ BOOST_FIXTURE_TEST_CASE(chainstate_write_interval, TestingSetup)
|
||||
{
|
||||
struct TestSubscriber final : CValidationInterface {
|
||||
bool m_did_flush{false};
|
||||
void ChainStateFlushed(ChainstateRole, const CBlockLocator&) override
|
||||
void ChainStateFlushed(const ChainstateRole&, const CBlockLocator&) override
|
||||
{
|
||||
m_did_flush = true;
|
||||
}
|
||||
@@ -55,7 +57,7 @@ BOOST_FIXTURE_TEST_CASE(write_during_multiblock_activation, TestChain100Setup)
|
||||
{
|
||||
const CBlockIndex* m_tip{nullptr};
|
||||
const CBlockIndex* m_flushed_at_block{nullptr};
|
||||
void ChainStateFlushed(ChainstateRole, const CBlockLocator&) override
|
||||
void ChainStateFlushed(const ChainstateRole&, const CBlockLocator&) override
|
||||
{
|
||||
m_flushed_at_block = m_tip;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user