1use crate::{block::Block, quorum_cert::QuorumCert};
6use diem_crypto::HashValue;
7
8pub trait LedgerBlockRW: Send + Sync {
9 fn get_ledger_block(
11 &self, _block_id: &HashValue,
12 ) -> anyhow::Result<Option<Block>> {
13 unimplemented!()
14 }
15
16 fn save_ledger_blocks(&self, _blocks: Vec<Block>) -> anyhow::Result<()> {
18 unimplemented!()
19 }
20
21 fn get_qc_for_block(
22 &self, _block_id: &HashValue,
23 ) -> anyhow::Result<Option<QuorumCert>> {
24 unimplemented!()
25 }
26}
27
28pub struct FakeLedgerBlockDB {}
29impl LedgerBlockRW for FakeLedgerBlockDB {}