Trait storage_interface::DbWriter[][src]

pub trait DbWriter: Send + Sync {
    fn save_transactions(
        &self,
        txns_to_commit: &[TransactionToCommit],
        first_version: Version,
        ledger_info_with_sigs: Option<&LedgerInfoWithSignatures>
    ) -> Result<()> { ... }
fn get_state_snapshot_receiver(
        &self,
        version: Version,
        expected_root_hash: HashValue
    ) -> Result<Box<dyn StateSnapshotReceiver<AccountStateBlob>>> { ... } }
Expand description

Trait that is implemented by a DB that supports certain public (to client) write APIs expected of a Diem DB. This adds write APIs to DbReader.

Provided methods

Persist transactions. Called by the executor module when either syncing nodes or committing blocks during normal operation. See DiemDB::save_transactions.

Get a (stateful) state snapshot receiver.

Chunk of accounts need to be added via add_chunk() before finishing up with finish_box()

Implementors