remove unused Engine::maximum_uncle_age (#10476)

This commit is contained in:
Marek Kotewicz
2019-03-14 21:34:26 +01:00
committed by soc1c
parent f875175325
commit d83143d0ba
3 changed files with 9 additions and 10 deletions

View File

@@ -61,7 +61,7 @@ use client::{
IoClient, BadBlocks,
};
use client::bad_blocks;
use engines::{EthEngine, EpochTransition, ForkChoice, EngineError};
use engines::{MAX_UNCLE_AGE, EthEngine, EpochTransition, ForkChoice, EngineError};
use engines::epoch::PendingTransition;
use error::{
ImportErrorKind, ExecutionError, CallError, BlockError,
@@ -1918,7 +1918,7 @@ impl BlockChainClient for Client {
}
fn find_uncles(&self, hash: &H256) -> Option<Vec<H256>> {
self.chain.read().find_uncle_hashes(hash, self.engine.maximum_uncle_age())
self.chain.read().find_uncle_hashes(hash, MAX_UNCLE_AGE)
}
fn state_data(&self, hash: &H256) -> Option<Bytes> {
@@ -2282,7 +2282,7 @@ impl ReopenBlock for Client {
let h = chain.best_block_hash();
// Add new uncles
let uncles = chain
.find_uncle_hashes(&h, engine.maximum_uncle_age())
.find_uncle_hashes(&h, MAX_UNCLE_AGE)
.unwrap_or_else(Vec::new);
for h in uncles {
@@ -2326,7 +2326,7 @@ impl PrepareOpenBlock for Client {
// Add uncles
chain
.find_uncle_headers(&h, engine.maximum_uncle_age())
.find_uncle_headers(&h, MAX_UNCLE_AGE)
.unwrap_or_else(Vec::new)
.into_iter()
.take(engine.maximum_uncle_count(open_block.header().number()))