Changeset View
Changeset View
Standalone View
Standalone View
src/blockencodings.cpp
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | ReadStatus PartiallyDownloadedBlock::FillBlock( | ||||
header.SetNull(); | header.SetNull(); | ||||
txns_available.clear(); | txns_available.clear(); | ||||
if (vtx_missing.size() != tx_missing_offset) { | if (vtx_missing.size() != tx_missing_offset) { | ||||
return READ_STATUS_INVALID; | return READ_STATUS_INVALID; | ||||
} | } | ||||
CValidationState state; | CValidationState state; | ||||
if (!CheckBlock(*config, block, state)) { | if (!CheckBlock(*config, block, state, BlockValidationOptions(*config))) { | ||||
// TODO: We really want to just check merkle tree manually here, but | // TODO: We really want to just check merkle tree manually here, but | ||||
// that is expensive, and CheckBlock caches a block's "checked-status" | // that is expensive, and CheckBlock caches a block's "checked-status" | ||||
// (in the CBlock?). CBlock should be able to check its own merkle root | // (in the CBlock?). CBlock should be able to check its own merkle root | ||||
// and cache that check. | // and cache that check. | ||||
if (state.CorruptionPossible()) { | if (state.CorruptionPossible()) { | ||||
// Possible Short ID collision. | // Possible Short ID collision. | ||||
return READ_STATUS_FAILED; | return READ_STATUS_FAILED; | ||||
} | } | ||||
Show All 19 Lines |