mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
p2p: remove vestigial READ_STATUS_CHECKBLOCK_FAILED
This commit is contained in:
@@ -3381,23 +3381,7 @@ void PeerManagerImpl::ProcessCompactBlockTxns(CNode& pfrom, Peer& peer, const Bl
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// Block is either okay, or possibly we received
|
||||
// READ_STATUS_CHECKBLOCK_FAILED.
|
||||
// Note that CheckBlock can only fail for one of a few reasons:
|
||||
// 1. bad-proof-of-work (impossible here, because we've already
|
||||
// accepted the header)
|
||||
// 2. merkleroot doesn't match the transactions given (already
|
||||
// caught in FillBlock with READ_STATUS_FAILED, so
|
||||
// impossible here)
|
||||
// 3. the block is otherwise invalid (eg invalid coinbase,
|
||||
// block is too big, too many legacy sigops, etc).
|
||||
// So if CheckBlock failed, #3 is the only possibility.
|
||||
// Under BIP 152, we don't discourage the peer unless proof of work is
|
||||
// invalid (we don't require all the stateless checks to have
|
||||
// been run). This is handled below, so just treat this as
|
||||
// though the block was successfully read, and rely on the
|
||||
// handling in ProcessNewBlock to ensure the block index is
|
||||
// updated, etc.
|
||||
// Block is okay for further processing
|
||||
RemoveBlockRequest(block_transactions.blockhash, pfrom.GetId()); // it is now an empty pointer
|
||||
fBlockRead = true;
|
||||
// mapBlockSource is used for potentially punishing peers and
|
||||
|
||||
Reference in New Issue
Block a user