Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 4,850 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::BLOCKTXN) { | ||||
// READ_STATUS_CHECKBLOCK_FAILED. | // READ_STATUS_CHECKBLOCK_FAILED. | ||||
// Note that CheckBlock can only fail for one of a few reasons: | // Note that CheckBlock can only fail for one of a few reasons: | ||||
// 1. bad-proof-of-work (impossible here, because we've already | // 1. bad-proof-of-work (impossible here, because we've already | ||||
// accepted the header) | // accepted the header) | ||||
// 2. merkleroot doesn't match the transactions given (already | // 2. merkleroot doesn't match the transactions given (already | ||||
// caught in FillBlock with READ_STATUS_FAILED, so | // caught in FillBlock with READ_STATUS_FAILED, so | ||||
// impossible here) | // impossible here) | ||||
// 3. the block is otherwise invalid (eg invalid coinbase, | // 3. the block is otherwise invalid (eg invalid coinbase, | ||||
// block is too big, too many legacy sigops, etc). | // block is too big, too many sigChecks, etc). | ||||
// So if CheckBlock failed, #3 is the only possibility. | // So if CheckBlock failed, #3 is the only possibility. | ||||
// Under BIP 152, we don't DoS-ban unless proof of work is | // Under BIP 152, we don't DoS-ban unless proof of work is | ||||
// invalid (we don't require all the stateless checks to have | // invalid (we don't require all the stateless checks to have | ||||
// been run). This is handled below, so just treat this as | // been run). This is handled below, so just treat this as | ||||
// though the block was successfully read, and rely on the | // though the block was successfully read, and rely on the | ||||
// handling in ProcessNewBlock to ensure the block index is | // handling in ProcessNewBlock to ensure the block index is | ||||
// updated, etc. | // updated, etc. | ||||
▲ Show 20 Lines • Show All 2,361 Lines • Show Last 20 Lines |