ava-labs / avalanchego

Go implementation of an Avalanche node.
https://avax.network
BSD 3-Clause "New" or "Revised" License
2.09k stars 646 forks source link

Remove .Status() from .IsPreferred() #3111

Closed StephenButtolph closed 2 weeks ago

StephenButtolph commented 2 weeks ago

Why this should be merged

This PR is part of the work to remove calls to .Status() in the consensus code.

How this works

The purposes to query for these blocks are:

  1. to immediately start disseminating them.
  2. to support pushing the block to disseminate even faster.

If the blocks are deeper than the last accepted block, this node shouldn't need to quickly disseminate them (as they are already sufficiently disseminated to be accepted).

How this was tested