mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
refactor: Rename Chain::Notifications methods to be consistent with other interfaces methods
This also simplifies #10102 removing overrides needed to deal with inconsistent case convention
This commit is contained in:
@@ -166,25 +166,25 @@ public:
|
||||
}
|
||||
void TransactionAddedToMempool(const CTransactionRef& tx) override
|
||||
{
|
||||
m_notifications->TransactionAddedToMempool(tx);
|
||||
m_notifications->transactionAddedToMempool(tx);
|
||||
}
|
||||
void TransactionRemovedFromMempool(const CTransactionRef& tx) override
|
||||
{
|
||||
m_notifications->TransactionRemovedFromMempool(tx);
|
||||
m_notifications->transactionRemovedFromMempool(tx);
|
||||
}
|
||||
void BlockConnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
{
|
||||
m_notifications->BlockConnected(*block, index->nHeight);
|
||||
m_notifications->blockConnected(*block, index->nHeight);
|
||||
}
|
||||
void BlockDisconnected(const std::shared_ptr<const CBlock>& block, const CBlockIndex* index) override
|
||||
{
|
||||
m_notifications->BlockDisconnected(*block, index->nHeight);
|
||||
m_notifications->blockDisconnected(*block, index->nHeight);
|
||||
}
|
||||
void UpdatedBlockTip(const CBlockIndex* index, const CBlockIndex* fork_index, bool is_ibd) override
|
||||
{
|
||||
m_notifications->UpdatedBlockTip();
|
||||
m_notifications->updatedBlockTip();
|
||||
}
|
||||
void ChainStateFlushed(const CBlockLocator& locator) override { m_notifications->ChainStateFlushed(locator); }
|
||||
void ChainStateFlushed(const CBlockLocator& locator) override { m_notifications->chainStateFlushed(locator); }
|
||||
Chain& m_chain;
|
||||
Chain::Notifications* m_notifications;
|
||||
};
|
||||
@@ -366,7 +366,7 @@ public:
|
||||
{
|
||||
LOCK2(::cs_main, ::mempool.cs);
|
||||
for (const CTxMemPoolEntry& entry : ::mempool.mapTx) {
|
||||
notifications.TransactionAddedToMempool(entry.GetSharedTx());
|
||||
notifications.transactionAddedToMempool(entry.GetSharedTx());
|
||||
}
|
||||
}
|
||||
NodeContext& m_node;
|
||||
|
||||
@@ -217,12 +217,12 @@ public:
|
||||
{
|
||||
public:
|
||||
virtual ~Notifications() {}
|
||||
virtual void TransactionAddedToMempool(const CTransactionRef& tx) {}
|
||||
virtual void TransactionRemovedFromMempool(const CTransactionRef& ptx) {}
|
||||
virtual void BlockConnected(const CBlock& block, int height) {}
|
||||
virtual void BlockDisconnected(const CBlock& block, int height) {}
|
||||
virtual void UpdatedBlockTip() {}
|
||||
virtual void ChainStateFlushed(const CBlockLocator& locator) {}
|
||||
virtual void transactionAddedToMempool(const CTransactionRef& tx) {}
|
||||
virtual void transactionRemovedFromMempool(const CTransactionRef& ptx) {}
|
||||
virtual void blockConnected(const CBlock& block, int height) {}
|
||||
virtual void blockDisconnected(const CBlock& block, int height) {}
|
||||
virtual void updatedBlockTip() {}
|
||||
virtual void chainStateFlushed(const CBlockLocator& locator) {}
|
||||
};
|
||||
|
||||
//! Register handler for notifications.
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
//! Current RPC serialization flags.
|
||||
virtual int rpcSerializationFlags() = 0;
|
||||
|
||||
//! Synchronously send TransactionAddedToMempool notifications about all
|
||||
//! Synchronously send transactionAddedToMempool notifications about all
|
||||
//! current mempool transactions to the specified handler and return after
|
||||
//! the last one is sent. These notifications aren't coordinated with async
|
||||
//! notifications sent by handleNotifications, so out of date async
|
||||
|
||||
Reference in New Issue
Block a user