removed evaluation.rs (#11766)

* removed evaluation.rs

* no need for parent_hash

* fix
This commit is contained in:
Sergej Sakac
2022-07-17 00:38:38 +03:00
committed by GitHub
parent f514bc3892
commit a0a806ac78
3 changed files with 1 additions and 86 deletions
@@ -34,9 +34,7 @@ use sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_INFO};
use sc_transaction_pool_api::{InPoolTransaction, TransactionPool};
use sp_api::{ApiExt, ProvideRuntimeApi};
use sp_blockchain::{ApplyExtrinsicFailed::Validity, Error::ApplyExtrinsicFailed, HeaderBackend};
use sp_consensus::{
evaluation, DisableProofRecording, EnableProofRecording, ProofRecording, Proposal,
};
use sp_consensus::{DisableProofRecording, EnableProofRecording, ProofRecording, Proposal};
use sp_core::traits::SpawnNamed;
use sp_inherents::InherentData;
use sp_runtime::{
@@ -205,7 +203,6 @@ where
let proposer = Proposer::<_, _, _, _, PR> {
spawn_handle: self.spawn_handle.clone(),
client: self.client.clone(),
parent_hash,
parent_id: id,
parent_number: *parent_header.number(),
transaction_pool: self.transaction_pool.clone(),
@@ -250,7 +247,6 @@ where
pub struct Proposer<B, Block: BlockT, C, A: TransactionPool, PR> {
spawn_handle: Box<dyn SpawnNamed>,
client: Arc<C>,
parent_hash: <Block as BlockT>::Hash,
parent_id: BlockId<Block>,
parent_number: <<Block as BlockT>::Header as HeaderT>::Number,
transaction_pool: Arc<A>,
@@ -536,12 +532,6 @@ where
"hash" => ?<Block as BlockT>::Hash::from(block.header().hash()),
);
if let Err(err) =
evaluation::evaluate_initial(&block, &self.parent_hash, self.parent_number)
{
error!("Failed to evaluate authored block: {:?}", err);
}
let proof =
PR::into_proof(proof).map_err(|e| sp_blockchain::Error::Application(Box::new(e)))?;