aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-14 11:00:56 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-14 11:01:01 +0100
commiteec9366f7dd60e522ab339d69a0052a57598829a (patch)
tree8c11d4f94d26f416f4abb0c896740a45e20da72a /depends
parent096bd374da28904014ceb3a7245c5ee0de54bd6f (diff)
parentf6360088de8ca02f9d198da2f8cca4ea8d64c992 (diff)
downloadbitcoin-eec9366f7dd60e522ab339d69a0052a57598829a.tar.xz
Merge #20624: net processing: Remove nStartingHeight check from block relay
f6360088de8ca02f9d198da2f8cca4ea8d64c992 [net processing] Clarify UpdatedBlockTip() (John Newbery) 94d2cc35be98d3b20db88b2a3745322e5b0aa9d4 [net processing] Remove unnecesary nNewHeight variable in UpdatedBlockTip() (John Newbery) 8b57013473c44fc87c9f1c4611224a89187c289a [net processing] Remove nStartingHeight check from block relay (John Newbery) Pull request description: nStartingHeight was introduced in commit 7a47324c7 (Bitcoin version 0.2.9, P2P version 209) with the comment "better prevention of inventory relaying during initial download". At that time, there was no function to determine whether the node was still in Initial Block Download, so to prevent syncing nodes from relaying old blocks to their peers, a check was added to never relay a block to a peer where the height was lower than 2000 less than the peer's best block. That check was updated several times in later commits to ensure that we weren't relaying blocks before the latest checkpoint if the peer didn't provide a startingheight. The checkpoint comparison was changed to compare with an estimate of the highest block in commit eae82d8e. In commit 202e0194, all block relay was gated on being out of Initial Block Download. In commit 0278fb5f, the comparison to nBlockEstimate was removed since "we already checked IsIBD()". We can remove the check against nStartingHeight entirely. If the node is out of Initial Block Download, then its tip height must have been within 24 hours of current time, so should not be more than ~144 blocks behind the most work tip. This simplifies moving block inventory state into the `Peer` object (#19829). ACKs for top commit: Sjors: utACK f636008 jonatack: ACK f6360088de8ca02f9d198da2f8cca4ea8d64c992 MarcoFalke: ACK f6360088de8ca02f9d198da2f8cca4ea8d64c992 💽 ariard: Code Review ACK f636008 Tree-SHA512: 4959cf35f1dcde46f34bffec1375729a157e1b2a1fd8a8ca33da9771c3c89a6c43e7050cdeeab8d90bb507b0795703db8c8bc304a1a5065ef00aae7a6992ca4f
Diffstat (limited to 'depends')
0 files changed, 0 insertions, 0 deletions