mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-07 14:18:18 +02:00
refactor: Remove useless CBlock::GetBlockHeader
There is no need for a function to convert a CBlock to a CBlockHeader, as it's a child class of it.
This commit is contained in:
committed by
Daniela Brozzoni
parent
4568652222
commit
ca0243e3a6
@@ -4666,7 +4666,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
mapBlockSource.emplace(hash, std::make_pair(pfrom.GetId(), true));
|
||||
|
||||
// Check claimed work on this block against our anti-dos thresholds.
|
||||
if (prev_block && prev_block->nChainWork + GetBlockProof(pblock->GetBlockHeader()) >= GetAntiDoSWorkThreshold()) {
|
||||
if (prev_block && prev_block->nChainWork + GetBlockProof(*pblock) >= GetAntiDoSWorkThreshold()) {
|
||||
min_pow_checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user