/// Block payloads are loaded separately on demand.
Block payloads are loaded separately on demand.
Block payloads are loaded separately on demand .
fn load_block_payload(
    db_env: Arc<Environment>,
    artifacts: Database,
    payload_key: &IdKey,
    log: &ReplicaLogger,
) -> lmdb::Result<BlockPayload> {
    let tx = db_env.begin_ro_txn()?;
    let bytes = tx.get(artifacts, &payload_key)?;
    bincode::deserialize::<BlockPayload>(bytes).map_err(|err| {
        error!(log, "Error deserializing block payload: {:?}", err);
        lmdb::Error::Panic
    })
}
fn load_block_payload ( db_env : Arc < Environment > , artifacts : Database , payload_key : & IdKey , log : & ReplicaLogger , ) -> lmdb :: Result < BlockPayload > { let tx = db_env . begin_ro_txn ( ) ? ; let bytes = tx . get ( artifacts , & payload_key ) ? ; bincode :: deserialize :: < BlockPayload > ( bytes ) . map_err ( | err | { error ! ( log " " err ) ; lmdb :: Error :: Panic } ) }
Block payloads are loaded separately on demand.
Block payloads are loaded separately on demand .
db_env
Arc<Environment>
artifacts
Database
payload_key
&IdKey
log
&ReplicaLogger