@@ -491,7 +491,8 @@ class PeerManagerImpl final : public PeerManager
491
491
492
492
void ProcessGetData (CNode& pfrom, Peer& peer, const std::atomic<bool >& interruptMsgProc) EXCLUSIVE_LOCKS_REQUIRED(peer.m_getdata_requests_mutex) LOCKS_EXCLUDED(::cs_main);
493
493
494
- void ProcessBlock (CNode& pfrom, const std::shared_ptr<const CBlock>& pblock, bool fForceProcessing );
494
+ /* * Process a new block. Perform any post-processing housekeeping */
495
+ void ProcessBlock (CNode& node, const std::shared_ptr<const CBlock>& block, bool force_processing);
495
496
496
497
/* * Relay map (txid or wtxid -> CTransactionRef) */
497
498
typedef std::map<uint256, CTransactionRef> MapRelay;
@@ -2384,15 +2385,15 @@ void PeerManagerImpl::ProcessGetCFCheckPt(CNode& peer, CDataStream& vRecv)
2384
2385
m_connman.PushMessage (&peer, std::move (msg));
2385
2386
}
2386
2387
2387
- void PeerManagerImpl::ProcessBlock (CNode& pfrom , const std::shared_ptr<const CBlock>& pblock , bool fForceProcessing )
2388
+ void PeerManagerImpl::ProcessBlock (CNode& node , const std::shared_ptr<const CBlock>& block , bool force_processing )
2388
2389
{
2389
- bool fNewBlock = false ;
2390
- m_chainman.ProcessNewBlock (m_chainparams, pblock, fForceProcessing , &fNewBlock );
2391
- if (fNewBlock ) {
2392
- pfrom .nLastBlockTime = GetTime ();
2390
+ bool new_block{ false } ;
2391
+ m_chainman.ProcessNewBlock (m_chainparams, block, force_processing , &new_block );
2392
+ if (new_block ) {
2393
+ node .nLastBlockTime = GetTime ();
2393
2394
} else {
2394
2395
LOCK (cs_main);
2395
- mapBlockSource.erase (pblock ->GetHash ());
2396
+ mapBlockSource.erase (block ->GetHash ());
2396
2397
}
2397
2398
}
2398
2399
@@ -3475,7 +3476,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
3475
3476
LOCK (cs_main);
3476
3477
mapBlockSource.emplace (pblock->GetHash (), std::make_pair (pfrom.GetId (), false ));
3477
3478
}
3478
- // Setting fForceProcessing to true means that we bypass some of
3479
+ // Setting force_processing to true means that we bypass some of
3479
3480
// our anti-DoS protections in AcceptBlock, which filters
3480
3481
// unrequested blocks that might be trying to waste our resources
3481
3482
// (eg disk space). Because we only try to reconstruct blocks when
@@ -3484,7 +3485,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
3484
3485
// we have a chain with at least nMinimumChainWork), and we ignore
3485
3486
// compact blocks with less work than our tip, it is safe to treat
3486
3487
// reconstructed compact blocks as having been requested.
3487
- ProcessBlock (pfrom, pblock, /* fForceProcessing =*/ true );
3488
+ ProcessBlock (pfrom, pblock, /* force_processing =*/ true );
3488
3489
LOCK (cs_main); // hold cs_main for CBlockIndex::IsValid()
3489
3490
if (pindex->IsValid (BLOCK_VALID_TRANSACTIONS)) {
3490
3491
// Clear download state for this block, which is in
@@ -3567,7 +3568,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
3567
3568
// disk-space attacks), but this should be safe due to the
3568
3569
// protections in the compact block handler -- see related comment
3569
3570
// in compact block optimistic reconstruction handling.
3570
- ProcessBlock (pfrom, pblock, /* fForceProcessing =*/ true );
3571
+ ProcessBlock (pfrom, pblock, /* force_processing =*/ true );
3571
3572
}
3572
3573
return ;
3573
3574
}
0 commit comments