Skip to content

Commit

Permalink
consensus/beacon: copy td value so we can modify it (#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 Jul 4, 2022
1 parent 2697e44 commit 62470ee
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 62470ee

Please sign in to comment.