Skip to content

Commit 7ab679a

Browse files
committed
Remove unused on_verified_proposal in consensus
1 parent 115a749 commit 7ab679a

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
@@ -56,7 +56,6 @@ use crate::account_provider::AccountProvider;
5656
use crate::block::{ExecutedBlock, SealedBlock};
5757
use crate::client::ConsensusClient;
5858
use crate::codechain_machine::CodeChainMachine;
59-
use crate::encoded;
6059
use crate::error::Error;
6160
use crate::transaction::UnverifiedTransaction;
6261
use crate::views::HeaderView;
@@ -245,10 +244,6 @@ pub trait ConsensusEngine: Sync + Send {
245244
false
246245
}
247246

248-
/// Called when proposal block is verified.
249-
/// Consensus many hold the verified proposal block until it should be imported.
250-
fn on_verified_proposal(&self, _verified_block_data: encoded::Block) {}
251-
252247
/// Register an account which signs consensus messages.
253248
fn set_signer(&self, _ap: Arc<AccountProvider>, _address: Address) {}
254249

0 commit comments

Comments
 (0)