Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Manual seal delayed finalize #13999

Merged
merged 14 commits into from
May 2, 2023
Prev Previous commit
Next Next commit
up
shunsukew committed Apr 24, 2023
commit c36b9bce35a0997c5b3acf0bb9f4b11871f34bba
3 changes: 2 additions & 1 deletion client/consensus/manual-seal/src/lib.rs
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ use sc_consensus::{
block_import::{BlockImport, BlockImportParams, ForkChoiceStrategy},
import_queue::{BasicQueue, BoxBlockImport, Verifier},
};
use sc_service::SpawnTaskHandle;
use sp_blockchain::HeaderBackend;
use sp_consensus::{Environment, Proposer, SelectChain};
use sp_inherents::CreateInherentDataProviders;
@@ -144,7 +145,7 @@ pub struct DelayedFinalizeParams<B: BlockT, C: ProvideRuntimeApi<B>> {
/// Block import instance for well. importing blocks.
pub client: Arc<C>,

pub spawn_handle: sc_service::SpawnTaskHandle,
pub spawn_handle: SpawnTaskHandle,

/// The delay in seconds before a block is finalized.
pub delay_sec: u64,
7 changes: 4 additions & 3 deletions client/consensus/manual-seal/src/rpc.rs
Original file line number Diff line number Diff line change
@@ -160,10 +160,11 @@ pub fn send_result<T: std::fmt::Debug>(
}
}
} else {
// instant seal doesn't report errors over rpc, simply log them.
// Sealing/Finalization with no RPC sender such as instant seal or delayed finalize doesn't
// report errors over rpc, simply log them.
match result {
Ok(r) => log::info!("Instant Seal success: {:?}", r),
Err(e) => log::error!("Instant Seal encountered an error: {}", e),
Ok(r) => log::info!("Instant Seal Consensus success: {:?}", r),
Err(e) => log::error!("Instant Seal Consensus encountered an error: {}", e),
}
}
}