mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
validation: pass ChainstateRole for validationinterface calls
This allows consumers to decide how to handle events from background or assumedvalid chainstates.
This commit is contained in:
committed by
James O'Beirne
parent
1e59acdf17
commit
4d8f4dcb45
@@ -434,9 +434,9 @@ public:
|
||||
{
|
||||
m_notifications->transactionRemovedFromMempool(tx, reason);
|
||||
}
|
||||
void BlockConnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
void BlockConnected(ChainstateRole role, const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
{
|
||||
m_notifications->blockConnected(kernel::MakeBlockInfo(index, block.get()));
|
||||
m_notifications->blockConnected(role, kernel::MakeBlockInfo(index, block.get()));
|
||||
}
|
||||
void BlockDisconnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
{
|
||||
@@ -446,7 +446,9 @@ public:
|
||||
{
|
||||
m_notifications->updatedBlockTip();
|
||||
}
|
||||
void ChainStateFlushed(const CBlockLocator& locator) override { m_notifications->chainStateFlushed(locator); }
|
||||
void ChainStateFlushed(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