pub fn add_block(
block: &VerifiedBlockInformation,
tables: &mut impl TablesMut,
) -> DbResult<()>Expand description
Add a VerifiedBlockInformation to the database.
This extracts all the data from the input block and maps/adds them to the appropriate database tables.
§Errors
This function returns cuprate_database::RuntimeError::KeyNotFound if the input (if applicable) doesn’t exist or other RuntimeError’s on database errors.
§Panics
This function will panic if:
block.height > u32::MAX(not normally possible)block.heightis !=chain_height