Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 2,317 Lines • ▼ Show 20 Lines | |||||
private: | private: | ||||
std::vector<PerBlockConnectTrace> blocksConnected; | std::vector<PerBlockConnectTrace> blocksConnected; | ||||
CTxMemPool &pool; | CTxMemPool &pool; | ||||
boost::signals2::scoped_connection m_connNotifyEntryRemoved; | boost::signals2::scoped_connection m_connNotifyEntryRemoved; | ||||
public: | public: | ||||
explicit ConnectTrace(CTxMemPool &_pool) : blocksConnected(1), pool(_pool) { | explicit ConnectTrace(CTxMemPool &_pool) : blocksConnected(1), pool(_pool) { | ||||
m_connNotifyEntryRemoved = pool.NotifyEntryRemoved.connect( | m_connNotifyEntryRemoved = pool.NotifyEntryRemoved.connect( | ||||
boost::bind(&ConnectTrace::NotifyEntryRemoved, this, _1, _2)); | std::bind(&ConnectTrace::NotifyEntryRemoved, this, | ||||
std::placeholders::_1, std::placeholders::_2)); | |||||
} | } | ||||
void BlockConnected(CBlockIndex *pindex, | void BlockConnected(CBlockIndex *pindex, | ||||
std::shared_ptr<const CBlock> pblock) { | std::shared_ptr<const CBlock> pblock) { | ||||
assert(!blocksConnected.back().pindex); | assert(!blocksConnected.back().pindex); | ||||
assert(pindex); | assert(pindex); | ||||
assert(pblock); | assert(pblock); | ||||
blocksConnected.back().pindex = pindex; | blocksConnected.back().pindex = pindex; | ||||
▲ Show 20 Lines • Show All 3,404 Lines • Show Last 20 Lines |