diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 84bcddfd6db..30cb35b8b9f 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -1389,7 +1389,7 @@ impl ImportBlock for Client { bail!(BlockImportErrorKind::Import(ImportErrorKind::AlreadyInChain)); } let status = self.block_status(BlockId::Hash(unverified.parent_hash())); - if status == BlockStatus::Unknown || status == BlockStatus::Pending { + if status == BlockStatus::Unknown { bail!(BlockImportErrorKind::Block(BlockError::UnknownParent(unverified.parent_hash()))); } @@ -2080,7 +2080,7 @@ impl IoClient for Client { let is_parent_pending = self.queued_ancient_blocks.read().0.contains(&parent_hash); if !is_parent_pending { let status = self.block_status(BlockId::Hash(parent_hash)); - if status == BlockStatus::Unknown || status == BlockStatus::Pending { + if status == BlockStatus::Unknown { bail!(BlockImportErrorKind::Block(BlockError::UnknownParent(parent_hash))); } } diff --git a/ethcore/sync/src/block_sync.rs b/ethcore/sync/src/block_sync.rs index 4c229cd87ae..2096b76e849 100644 --- a/ethcore/sync/src/block_sync.rs +++ b/ethcore/sync/src/block_sync.rs @@ -266,7 +266,7 @@ impl BlockDownloader { BlockStatus::Bad => { return Err(BlockDownloaderImportError::Invalid); }, - BlockStatus::Unknown | BlockStatus::Pending => { + BlockStatus::Unknown => { headers.push(info); hashes.push(hash); } diff --git a/ethcore/sync/src/chain/handler.rs b/ethcore/sync/src/chain/handler.rs index 8547be7b3ff..554d32ef8d5 100644 --- a/ethcore/sync/src/chain/handler.rs +++ b/ethcore/sync/src/chain/handler.rs @@ -261,7 +261,7 @@ impl SyncHandler { BlockStatus::Queued => { trace!(target: "sync", "New hash block already queued {:?}", hash); }, - BlockStatus::Unknown | BlockStatus::Pending => { + BlockStatus::Unknown => { new_hashes.push(hash.clone()); if number > max_height { trace!(target: "sync", "New unknown block hash {:?}", hash); diff --git a/ethcore/types/src/block_status.rs b/ethcore/types/src/block_status.rs index 5455f1d40f2..460fdc29772 100644 --- a/ethcore/types/src/block_status.rs +++ b/ethcore/types/src/block_status.rs @@ -23,8 +23,6 @@ pub enum BlockStatus { Queued, /// Known as bad. Bad, - /// Pending block. - Pending, /// Unknown. Unknown, }