From 338ff01b46c78a9347e55adb7082ba74af68ee94 Mon Sep 17 00:00:00 2001 From: Konstantin <355847+Frozen@users.noreply.github.com> Date: Mon, 27 May 2024 00:28:15 -0400 Subject: [PATCH] Removed threshold 10 epochs. (#4671) --- node/node_newblock.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/node/node_newblock.go b/node/node_newblock.go index 05157e0237..657d847114 100644 --- a/node/node_newblock.go +++ b/node/node_newblock.go @@ -1,7 +1,6 @@ package node import ( - "math/big" "sort" "strings" "time" @@ -228,18 +227,11 @@ func (node *Node) ProposeNewBlock(commitSigs chan []byte) (*types.Block, error) utils.AnalysisStart("proposeNewBlockVerifyCrossLinks") // Prepare cross links and slashing messages var crossLinksToPropose types.CrossLinks - ten := big.NewInt(10) - crossLinkEpochThreshold := new(big.Int).Sub(currentHeader.Epoch(), ten) if isBeaconchainInCrossLinkEra { allPending, err := node.Blockchain().ReadPendingCrossLinks() invalidToDelete := []types.CrossLink{} if err == nil { for _, pending := range allPending { - // if pending crosslink is older than 10 epochs, delete it and continue. this logic is also applied when the node starts - if pending.EpochF.Cmp(crossLinkEpochThreshold) <= 0 { - invalidToDelete = append(invalidToDelete, pending) - continue - } // ReadCrossLink beacon chain usage. exist, err := node.Blockchain().ReadCrossLink(pending.ShardID(), pending.BlockNum()) if err == nil || exist != nil {