mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-08 22:55:16 +01:00
2f4ad6b7efscripted-diff: rename MarkBlockAs functions (John Newbery)2c45f832e8[net processing] Tidy up MarkBlockAsReceived() (John Newbery)6299350733[net processing] Add IsBlockRequested() function (John Newbery)4e90d2dd0e[net processing] Remove QueuedBlock.hash (John Newbery)156a19ee6ascripted-diff: rename nPeersWithValidatedDownloads (John Newbery)b03de9c753[net processing] Remove CNodeState.nBlocksInFlightValidHeaders (John Newbery)b4e29f2436[net processing] Remove QueuedBlock.fValidatedHeaders (John Newbery)85e058b191[net processing] Remove unnecessary hash arg from MarkBlockAsInFlight() (John Newbery) Pull request description: The QueuedBlock struct contains a `fValidatedHeaders` field that indicates whether we have already validated a header for the requested block. Since headers-first syncing, we only request blocks where the header is already validated, so `fValidatedHeaders` is always true. Remove it and clean up the logic that uses that field. Likewise, QueuedBlock contains a `hash` field that is set to the block hash. Since headers-first syncing, we always have a CBlockIndex, which contains the block hash, so remove the redundant `hash` field. Tidy up the logic and rename functions to better indicate what they're doing. ACKs for top commit: mjdietzx: crACK2f4ad6b7efsipa: utACK2f4ad6b7efMarcoFalke: review ACK2f4ad6b7ef📊 Tree-SHA512: 3d31d2bcb4d35d0fdb7c1da624c2878203218026445e8f76c4a2df68cc7183ce0e7d0c47c7c0a3242e55efaca7c9f5532b683cf6ec7c03d23fa83764fdb82fd2