| 3453 | } |
| 3454 | |
| 3455 | void PeerManagerImpl::ProcessBlock(CNode& node, const std::shared_ptr<const CBlock>& block, bool force_processing, bool min_pow_checked) |
| 3456 | { |
| 3457 | bool new_block{false}; |
| 3458 | m_chainman.ProcessNewBlock(block, force_processing, min_pow_checked, &new_block); |
| 3459 | if (new_block) { |
| 3460 | node.m_last_block_time = GetTime<std::chrono::seconds>(); |
| 3461 | // In case this block came from a different peer than we requested |
| 3462 | // from, we can erase the block request now anyway (as we just stored |
| 3463 | // this block to disk). |
| 3464 | LOCK(cs_main); |
| 3465 | RemoveBlockRequest(block->GetHash(), std::nullopt); |
| 3466 | } else { |
| 3467 | LOCK(cs_main); |
| 3468 | mapBlockSource.erase(block->GetHash()); |
| 3469 | } |
| 3470 | } |
| 3471 | |
| 3472 | void PeerManagerImpl::ProcessCompactBlockTxns(CNode& pfrom, Peer& peer, const BlockTransactions& block_transactions) |
| 3473 | { |
nothing calls this directly
no test coverage detected