Skip to content

Commit

Permalink
consensus/beacon: copy td value so we can modify it (ethereum#25230)
Browse files Browse the repository at this point in the history
* consensus/beacon: copy td value so we can modify it

* consensus/beacon: copy td value so we can modify it
  • Loading branch information
MariusVanDerWijden authored and jagdeep sidhu committed Jul 4, 2022
1 parent 8446f03 commit 48b7cca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions consensus/beacon/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ func verifyTerminalPoWBlock(chain consensus.ChainHeaderReader, preHeaders []*typ
if td == nil {
return 0, consensus.ErrUnknownAncestor
}
td = new(big.Int).Set(td)
// Check that all blocks before the last one are below the TTD
for i, head := range preHeaders {
if td.Cmp(chain.Config().TerminalTotalDifficulty) >= 0 {
Expand Down

0 comments on commit 48b7cca

Please sign in to comment.