mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-13 14:30:15 +00:00
[sentry] Enforce max protocol version as well as min protocol version (#2525)
* Print data * E Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This commit is contained in:
parent
39e066a121
commit
1135e2b4fb
@ -194,6 +194,9 @@ func handShake(
|
||||
if uint(reply.ProtocolVersion) < minVersion {
|
||||
return fmt.Errorf("version is less than allowed minimum: theirs %d, min %d", reply.ProtocolVersion, minVersion)
|
||||
}
|
||||
if uint(reply.ProtocolVersion) > version {
|
||||
return fmt.Errorf("version is more than what this senty supports: theirs %d, max %d", reply.ProtocolVersion, version)
|
||||
}
|
||||
if reply.Genesis != genesisHash {
|
||||
return fmt.Errorf("genesis hash does not match: theirs %x, ours %x", reply.Genesis, genesisHash)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user