Skip to content

Commit

Permalink
server: Remove unnecessary vote ntfn check.
Browse files Browse the repository at this point in the history
This removes the check for whether or not the block height is after the
height of the final checkpoint when deciding whether to send a vote
notification since it is no longer necessary or has any effect.

The reason it no longer has any effect is because there is a check prior
to it that ensures the the chain is considered current and the more
recent headers-first syncing means the chain will not be considered
current until the block associated with the best known header is reached
which is always ahead of any checkpoint.
  • Loading branch information
davecgh committed May 11, 2022
1 parent 21be8a6 commit bc06c8d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2578,7 +2578,6 @@ func (s *server) handleBlockchainNotification(notification *blockchain.Notificat
// voting begins
// - The block that would build on this one would not cause a reorg
// larger than the max reorg notify depth
// - This block is after the final checkpoint height
// - A notification for this block has not already been sent
//
// To help visualize the math here, consider the following two competing
Expand Down Expand Up @@ -2610,7 +2609,6 @@ func (s *server) handleBlockchainNotification(notification *blockchain.Notificat
if s.rpcServer != nil &&
blockHeight >= s.chainParams.StakeValidationHeight-1 &&
reorgDepth < maxReorgDepthNotify &&
blockHeight > s.chainParams.LatestCheckpointHeight() &&
!isOldMainnetBlock &&
!s.notifiedWinningTickets(blockHash) {

Expand Down

0 comments on commit bc06c8d

Please sign in to comment.