| 186 | LogPrint(BCLog::VALIDATION, fmt "\n", __VA_ARGS__) |
| 187 | |
| 188 | void CMainSignals::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) { |
| 189 | // Dependencies exist that require UpdatedBlockTip events to be delivered in the order in which |
| 190 | // the chain actually updates. One way to ensure this is for the caller to invoke this signal |
| 191 | // in the same critical section where the chain is updated |
| 192 | |
| 193 | auto event = [pindexNew, pindexFork, fInitialDownload, this] { |
| 194 | m_internals->Iterate([&](CValidationInterface& callbacks) { callbacks.UpdatedBlockTip(pindexNew, pindexFork, fInitialDownload); }); |
| 195 | }; |
| 196 | ENQUEUE_AND_LOG_EVENT(event, "%s: new block hash=%s fork block hash=%s (in IBD=%s)", __func__, |
| 197 | pindexNew->GetBlockHash().ToString(), |
| 198 | pindexFork ? pindexFork->GetBlockHash().ToString() : "null", |
| 199 | fInitialDownload); |
| 200 | } |
| 201 | |
| 202 | void CMainSignals::TransactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) { |
| 203 | auto event = [tx, mempool_sequence, this] { |
nothing calls this directly
no test coverage detected