mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
`require_tip` could only be determined by the headers stage, and it signalled that we have all of the headers to sync all the way to the chain tip. Some stages may wait to execute until the tip is reached, e.g. the stage that checks the stage root, but there are a few problems: - On initial sync, `reached_tip` would be `true`, but by the time we reach the hashing stage, this would actually no longer be the case: the other stages have spent enough time for us to be "out of sync". This means that the optimization here is lost, and the additional logic is added for nothing. - When we are not doing our initial sync, `reached_tip` would always be `true` for each subsequent block we sync. The same logic applies as above, i.e. the extra logic is there for nothing. In other words, `reached_tip` would *always* be `true` once we leave the header stage, making the extra logic entirely redundant.