MCPcopy Create free account
hub / github.com/ElementsProject/elements / BlockDisconnected

Method BlockDisconnected

src/net_processing.cpp:1539–1551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1537}
1538
1539void PeerManagerImpl::BlockDisconnected(const std::shared_ptr<const CBlock> &block, const CBlockIndex* pindex)
1540{
1541 // To avoid relay problems with transactions that were previously
1542 // confirmed, clear our filter of recently confirmed transactions whenever
1543 // there's a reorg.
1544 // This means that in a 1-block reorg (where 1 block is disconnected and
1545 // then another block reconnected), our filter will drop to having only one
1546 // block's worth of transactions in it, but that should be fine, since
1547 // presumably the most common case of relaying a confirmed transaction
1548 // should be just after a new block containing it is found.
1549 LOCK(m_recent_confirmed_transactions_mutex);
1550 m_recent_confirmed_transactions.reset();
1551}
1552
1553// All of the following cache a recent block, and are protected by cs_most_recent_block
1554static RecursiveMutex cs_most_recent_block;

Callers 1

DisconnectTipMethod · 0.45

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected