Files
nanoreth/bin
Bjerg f65562e2e4 refactor(sync): remove require_tip (#528)
`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.
2022-12-19 22:04:42 +01:00
..