remove unused Engine::is_proposal (#10475)

This commit is contained in:
Marek Kotewicz
2019-03-14 13:40:59 +01:00
committed by Andrew Jones
parent c9db8ea21d
commit f875175325
2 changed files with 5 additions and 17 deletions

View File

@@ -298,19 +298,11 @@ impl Importer {
match self.check_and_lock_block(&bytes, block, client) {
Ok((closed_block, pending)) => {
if self.engine.is_proposal(&header) {
self.block_queue.mark_as_good(&[hash]);
proposed_blocks.push(bytes);
} else {
imported_blocks.push(hash);
let transactions_len = closed_block.transactions().len();
let route = self.commit_block(closed_block, &header, encoded::Block::new(bytes), pending, client);
import_results.push(route);
client.report.write().accrue_block(&header, transactions_len);
}
imported_blocks.push(hash);
let transactions_len = closed_block.transactions().len();
let route = self.commit_block(closed_block, &header, encoded::Block::new(bytes), pending, client);
import_results.push(route);
client.report.write().accrue_block(&header, transactions_len);
},
Err(err) => {
self.bad_blocks.report(bytes, format!("{:?}", err));