Skip to content

Commit

Permalink
feat: add forkid filtering (#339)
Browse files Browse the repository at this point in the history
* add forkid filtering

* update error
  • Loading branch information
minhd-vu authored Aug 12, 2024
1 parent 657fd65 commit 523df56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion p2p/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ func (c *conn) readStatus(packet *eth.StatusPacket) error {
}

if status.Genesis != packet.Genesis {
return fmt.Errorf("genesis mismatch: %d (!= %d)", status.Genesis, packet.Genesis)
return fmt.Errorf("genesis mismatch: %v (!= %v)", status.Genesis, packet.Genesis)
}

if status.ForkID.Hash != packet.ForkID.Hash {
return fmt.Errorf("fork ID mismatch: %v (!= %v)", status.ForkID, packet.ForkID)
}

c.logger.Info().
Expand Down

0 comments on commit 523df56

Please sign in to comment.