mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +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:
@@ -81,6 +81,7 @@ using interfaces::MakeSignalHandler;
|
||||
using interfaces::Mining;
|
||||
using interfaces::Node;
|
||||
using interfaces::WalletLoader;
|
||||
using kernel::ChainstateRole;
|
||||
using node::BlockAssembler;
|
||||
using node::BlockWaitOptions;
|
||||
using util::Join;
|
||||
@@ -461,7 +462,7 @@ public:
|
||||
{
|
||||
m_notifications->transactionRemovedFromMempool(tx, reason);
|
||||
}
|
||||
void BlockConnected(ChainstateRole role, const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
void BlockConnected(const ChainstateRole& role, const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
{
|
||||
m_notifications->blockConnected(role, kernel::MakeBlockInfo(index, block.get()));
|
||||
}
|
||||
@@ -473,7 +474,8 @@ public:
|
||||
{
|
||||
m_notifications->updatedBlockTip();
|
||||
}
|
||||
void ChainStateFlushed(ChainstateRole role, const CBlockLocator& locator) override {
|
||||
void ChainStateFlushed(const ChainstateRole& role, const CBlockLocator& locator) override
|
||||
{
|
||||
m_notifications->chainStateFlushed(role, locator);
|
||||
}
|
||||
std::shared_ptr<Chain::Notifications> m_notifications;
|
||||
|
||||
Reference in New Issue
Block a user