pub trait DbWriter: Send + Sync {
    // Required method
    fn save_transactions(
        &self,
        txns_to_commit: &[TransactionToCommit],
        first_version: Version,
        ledger_info_with_sigs: Option<&LedgerInfoWithSignatures>
    ) -> Result<()>;
}
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.

Required Methods§

source

fn save_transactions( &self, txns_to_commit: &[TransactionToCommit], first_version: Version, ledger_info_with_sigs: Option<&LedgerInfoWithSignatures> ) -> Result<()>

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

Implementors§