From 94cb3b6e0e8574d33813abd9ec1d8408f91996a6 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Wed, 27 Feb 2019 10:08:04 +0100 Subject: [PATCH] fix underflow in pip, closes #10419 (#10423) --- ethcore/light/src/net/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethcore/light/src/net/mod.rs b/ethcore/light/src/net/mod.rs index cffbb0e96..2fd6c340e 100644 --- a/ethcore/light/src/net/mod.rs +++ b/ethcore/light/src/net/mod.rs @@ -533,6 +533,9 @@ impl LightProtocol { // the timer approach will skip 1 (possibly 2) in rare occasions. if peer_info.sent_head == announcement.head_hash || peer_info.status.head_num >= announcement.head_num || + // fix for underflow reported in + // https://github.com/paritytech/parity-ethereum/issues/10419 + now < peer_info.last_update || now - peer_info.last_update < UPDATE_INTERVAL { continue }