pub fn write_blocks_from_channels(
finalized_block_write_receiver: UnboundedReceiver<(CheckpointVerifiedBlock, Sender<Result<Hash, BoxError>>)>,
non_finalized_block_write_receiver: UnboundedReceiver<(SemanticallyVerifiedBlock, Sender<Result<Hash, BoxError>>)>,
finalized_state: FinalizedState,
non_finalized_state: NonFinalizedState,
invalid_block_reset_sender: UnboundedSender<Hash>,
chain_tip_sender: ChainTipSender,
non_finalized_state_sender: Sender<NonFinalizedState>,
)
Expand description
Reads blocks from the channels, writes them to the finalized_state
or non_finalized_state
,
sends any errors on the invalid_block_reset_sender
, then updates the chain_tip_sender
and
non_finalized_state_sender
.