Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Supress TemporaryInvalid verification failures. (#8256)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw authored and andresilva committed Apr 2, 2018
1 parent f1b7d8a commit 5ea4c22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ethcore/src/verification/queue/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -88,6 +88,10 @@ pub mod blocks {
fn create(input: Self::Input, engine: &EthEngine) -> Result<Self::Unverified, Error> {
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)
Expand Down

0 comments on commit 5ea4c22

Please sign in to comment.