validate_block_data

Function validate_block_data 

Source
pub fn validate_block_data(
    blocks: &RecordBatch,
    transactions: &RecordBatch,
    logs: &RecordBatch,
    traces: &RecordBatch,
) -> Result<()>
Expand description

Checks that:

  • Everything is ordered by (block_number, tx_index/log_index)

  • No gaps in (block_number, tx_index/log_index)

  • block_hash/tx_hash matches with block_number/(block_number, tx_index)

  • parent hash matches with previous block’s hash