mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
eth/protocols/eth: validate BlockRangeUpdate messages
This commit is contained in:
parent
d8de9f4dc5
commit
fc0b78e8a9
1 changed files with 3 additions and 0 deletions
|
|
@ -531,6 +531,9 @@ func handleBlockRangeUpdate(backend Backend, msg Decoder, peer *Peer) error {
|
|||
if err := msg.Decode(&update); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := update.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
// We don't do anything with these messages for now, just store them on the peer.
|
||||
peer.lastRange.Store(&update)
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue