Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 1,457 Lines • ▼ Show 20 Lines | for (const CBlockIndex *block : setTips) { | ||||
// This block is part of the currently active chain. | // This block is part of the currently active chain. | ||||
status = "active"; | status = "active"; | ||||
} else if (block->nStatus.isInvalid()) { | } else if (block->nStatus.isInvalid()) { | ||||
// This block or one of its ancestors is invalid. | // This block or one of its ancestors is invalid. | ||||
status = "invalid"; | status = "invalid"; | ||||
} else if (block->nStatus.isOnParkedChain()) { | } else if (block->nStatus.isOnParkedChain()) { | ||||
// This block or one of its ancestors is parked. | // This block or one of its ancestors is parked. | ||||
status = "parked"; | status = "parked"; | ||||
} else if (block->nChainTx == 0) { | } else if (!block->HaveTxsDownloaded()) { | ||||
// This block cannot be connected because full block data for it or | // This block cannot be connected because full block data for it or | ||||
// one of its parents is missing. | // one of its parents is missing. | ||||
status = "headers-only"; | status = "headers-only"; | ||||
} else if (block->IsValid(BlockValidity::SCRIPTS)) { | } else if (block->IsValid(BlockValidity::SCRIPTS)) { | ||||
// This block is fully validated, but no longer part of the active | // This block is fully validated, but no longer part of the active | ||||
// chain. It was probably the active block once, but was | // chain. It was probably the active block once, but was | ||||
// reorganized. | // reorganized. | ||||
status = "valid-fork"; | status = "valid-fork"; | ||||
▲ Show 20 Lines • Show All 1,060 Lines • Show Last 20 Lines |