remove unused Engine::is_proposal (#10475)
This commit is contained in:
parent
c9db8ea21d
commit
f875175325
@ -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));
|
||||
|
@ -375,10 +375,6 @@ pub trait Engine<M: Machine>: Sync + Send {
|
||||
/// updating consensus state and potentially issuing a new one.
|
||||
fn handle_message(&self, _message: &[u8]) -> Result<(), EngineError> { Err(EngineError::UnexpectedMessage) }
|
||||
|
||||
/// Find out if the block is a proposal block and should not be inserted into the DB.
|
||||
/// Takes a header of a fully verified block.
|
||||
fn is_proposal(&self, _verified_header: &Header) -> bool { false }
|
||||
|
||||
/// Register a component which signs consensus messages.
|
||||
fn set_signer(&self, _signer: Box<EngineSigner>) {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user