mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
[validation] Remove NotifyEntryRemoved callback from ConnectTrace
ConnectTrace used to subscribe to the mempool's NotifyEntryRemoved callback to be notified of transactions removed for conflict. Since PerBlockConnectTrace no longer tracks conflicted transactions, ConnectTrace no longer requires these notifications.
This commit is contained in:
parent
5613f9842b
commit
969b65f3f5
@ -2518,12 +2518,9 @@ class ConnectTrace {
|
||||
private:
|
||||
std::vector<PerBlockConnectTrace> blocksConnected;
|
||||
CTxMemPool &pool;
|
||||
boost::signals2::scoped_connection m_connNotifyEntryRemoved;
|
||||
|
||||
public:
|
||||
explicit ConnectTrace(CTxMemPool &_pool) : blocksConnected(1), pool(_pool) {
|
||||
m_connNotifyEntryRemoved = pool.NotifyEntryRemoved.connect(std::bind(&ConnectTrace::NotifyEntryRemoved, this, std::placeholders::_1, std::placeholders::_2));
|
||||
}
|
||||
explicit ConnectTrace(CTxMemPool &_pool) : blocksConnected(1), pool(_pool) {}
|
||||
|
||||
void BlockConnected(CBlockIndex* pindex, std::shared_ptr<const CBlock> pblock) {
|
||||
assert(!blocksConnected.back().pindex);
|
||||
@ -2544,10 +2541,6 @@ public:
|
||||
blocksConnected.pop_back();
|
||||
return blocksConnected;
|
||||
}
|
||||
|
||||
void NotifyEntryRemoved(CTransactionRef txRemoved, MemPoolRemovalReason reason) {
|
||||
assert(!blocksConnected.back().pindex);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user