From 1b8ae03034feda3eee28401b3a348b4eaf08c306 Mon Sep 17 00:00:00 2001 From: jagdeep sidhu Date: Mon, 7 Oct 2024 15:05:24 -0700 Subject: [PATCH] fix diff check --- consensus/beacon/consensus.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/beacon/consensus.go b/consensus/beacon/consensus.go index 49047d73bf..4e98d624c5 100644 --- a/consensus/beacon/consensus.go +++ b/consensus/beacon/consensus.go @@ -257,7 +257,7 @@ func (beacon *Beacon) verifyHeader(chain consensus.ChainHeaderReader, header, pa } // Verify the block's difficulty to ensure it's the default constant if !chain.Config().IsNexus(header.Number) { - if beaconDifficulty.Cmp(new(big.Int).SetInt64(1)) != 0 { + if beaconDifficulty.Cmp(big.NewInt(1)) != 0 { return fmt.Errorf("invalid difficulty: have %v, want %v", header.Difficulty, new(big.Int).SetInt64(1)) } } else { @@ -515,7 +515,7 @@ func (beacon *Beacon) IsPoSHeader(header *types.Header) bool { panic("IsPoSHeader called with invalid difficulty") } // SYSCOIN - return header.Difficulty.Cmp(beaconDifficulty) <= 1 + return header.Difficulty.Cmp(big.NewInt(1)) <= 0 } // InnerEngine returns the embedded eth1 consensus engine.