Skip to content

Commit

Permalink
Fix chains where the difficulty has risen above the 100 bitlength (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimthematrix authored and Brindrajsinh-Chauhan committed Nov 28, 2023
1 parent cdc6af9 commit 5dc61f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/protocols/eth/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (p *Peer) Handshake(network uint64, td *big.Int, head common.Hash, genesis

// TD at mainnet block #7753254 is 76 bits. If it becomes 100 million times
// larger, it will still fit within 100 bits
if tdlen := p.td.BitLen(); tdlen > 100 {
if tdlen := p.td.BitLen(); tdlen > 200 {
return fmt.Errorf("too large total difficulty: bitlen %d", tdlen)
}
return nil
Expand Down

0 comments on commit 5dc61f3

Please sign in to comment.