Module write

Source
Expand description

Writing blocks to the finalized and non-finalized states.

Constants§

PARENT_ERROR_MAP_LIMIT 🔒
The maximum size of the parent error map.

Functions§

log_if_mined_by_zebra 🔒
Log a message if this block was mined by Zebra.
update_latest_chain_channels 🔒
Update the LatestChainTip, ChainTipChange, and non_finalized_state_sender channels with the latest non-finalized ChainTipBlock and Chain.
validate_and_commit_non_finalized 🔒
Run contextual validation on the prepared block and add it to the non-finalized state if it is contextually valid.
write_blocks_from_channels
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.