Skip to content

Commit 77828e3

Browse files
MariusVanDerWijdenblakehhuynh
authored andcommitted
consensus/beacon: copy td value so we can modify it (ethereum#25230)
* consensus/beacon: copy td value so we can modify it * consensus/beacon: copy td value so we can modify it
1 parent 652ce57 commit 77828e3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

consensus/beacon/consensus.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ func verifyTerminalPoWBlock(chain consensus.ChainHeaderReader, preHeaders []*typ
178178
if td == nil {
179179
return 0, consensus.ErrUnknownAncestor
180180
}
181+
td = new(big.Int).Set(td)
181182
// Check that all blocks before the last one are below the TTD
182183
for i, head := range preHeaders {
183184
if td.Cmp(chain.Config().TerminalTotalDifficulty) >= 0 {

0 commit comments

Comments
 (0)