Skip to content

Commit b01b14d

Browse files
committed
Remove unused on_verified_proposal in consensus
1 parent 38971d5 commit b01b14d

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

core/src/client/importer.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use super::{BlockChainTrait, Client, ClientConfig};
3030
use crate::block::{enact, IsBlock, LockedBlock};
3131
use crate::blockchain::{BodyProvider, HeaderProvider, ImportRoute};
3232
use crate::consensus::CodeChainEngine;
33-
use crate::encoded;
3433
use crate::error::Error;
3534
use crate::miner::{Miner, MinerService};
3635
use crate::service::ClientIoMessage;
@@ -117,10 +116,6 @@ impl Importer {
117116
continue
118117
}
119118
if let Ok(closed_block) = self.check_and_close_block(&block, client) {
120-
if self.engine.is_proposal(&block.header) {
121-
self.engine.on_verified_proposal(encoded::Block::new(block.bytes.clone()))
122-
}
123-
124119
imported_blocks.push(header.hash());
125120
let route = self.commit_block(&closed_block, &header, &block.bytes, client);
126121
import_results.push(route);

core/src/consensus/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ use crate::account_provider::AccountProvider;
5353
use crate::block::{ExecutedBlock, SealedBlock};
5454
use crate::client::ConsensusClient;
5555
use crate::codechain_machine::CodeChainMachine;
56-
use crate::encoded;
5756
use crate::error::Error;
5857
use crate::transaction::UnverifiedTransaction;
5958
use crate::views::HeaderView;
@@ -242,10 +241,6 @@ pub trait ConsensusEngine: Sync + Send {
242241
false
243242
}
244243

245-
/// Called when proposal block is verified.
246-
/// Consensus many hold the verified proposal block until it should be imported.
247-
fn on_verified_proposal(&self, _verified_block_data: encoded::Block) {}
248-
249244
/// Register an account which signs consensus messages.
250245
fn set_signer(&self, _ap: Arc<AccountProvider>, _address: Address) {}
251246

0 commit comments

Comments
 (0)