From 5ea4c22868b5c894be9cf0296906e1727ff06964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 2 Apr 2018 12:30:26 +0200 Subject: [PATCH] Supress TemporaryInvalid verification failures. (#8256) --- ethcore/src/verification/queue/kind.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ethcore/src/verification/queue/kind.rs b/ethcore/src/verification/queue/kind.rs index b437dba7a..898435eb2 100644 --- a/ethcore/src/verification/queue/kind.rs +++ b/ethcore/src/verification/queue/kind.rs @@ -69,7 +69,7 @@ pub mod blocks { use super::{Kind, BlockLike}; use engines::EthEngine; - use error::Error; + use error::{Error, BlockError}; use header::Header; use verification::{PreverifiedBlock, verify_block_basic, verify_block_unordered}; @@ -88,6 +88,10 @@ pub mod blocks { fn create(input: Self::Input, engine: &EthEngine) -> Result { match verify_block_basic(&input.header, &input.bytes, engine) { Ok(()) => Ok(input), + Err(Error::Block(BlockError::TemporarilyInvalid(oob))) => { + debug!(target: "client", "Block received too early {}: {:?}", input.hash(), oob); + Err(BlockError::TemporarilyInvalid(oob).into()) + }, Err(e) => { warn!(target: "client", "Stage 1 block verification failed for {}: {:?}", input.hash(), e); Err(e)