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 blakehhuynh committed Oct 7, 2022
1 parent 3820d81 commit 9a053ef
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 9a053ef

Please sign in to comment.