referrerpolicy=no-referrer-when-downgrade

Function sc_consensus_grandpa::block_import

source ·
pub fn block_import<BE, Block: BlockT, Client, SC>(
    client: Arc<Client>,
    justification_import_period: u32,
    genesis_authorities_provider: &dyn GenesisAuthoritySetProvider<Block>,
    select_chain: SC,
    telemetry: Option<TelemetryHandle>,
) -> Result<(GrandpaBlockImport<BE, Block, Client, SC>, LinkHalf<Block, Client, SC>), Error>
where SC: SelectChain<Block>, BE: Backend<Block> + 'static, Client: ClientForGrandpa<Block, BE> + 'static,
Expand description

Make block importer and link half necessary to tie the background voter to it.

The justification_import_period sets the minimum period on which justifications will be imported. When importing a block, if it includes a justification it will only be processed if it fits within this period, otherwise it will be ignored (and won’t be validated). This is to avoid slowing down sync by a peer serving us unnecessary justifications which aren’t trivial to validate.