pub trait ConsensusStorage<N: Network>: 'static + Clone + Send + Sync {
    type FinalizeStorage: FinalizeStorage<N>;
    type BlockStorage: BlockStorage<N, TransactionStorage = Self::TransactionStorage, TransitionStorage = Self::TransitionStorage>;
    type TransactionStorage: TransactionStorage<N, TransitionStorage = Self::TransitionStorage>;
    type TransitionStorage: TransitionStorage<N>;

Show 13 methods // Required methods fn open(dev: Option<u16>) -> Result<Self>; fn finalize_store(&self) -> &FinalizeStore<N, Self::FinalizeStorage>; fn block_store(&self) -> &BlockStore<N, Self::BlockStorage>; // Provided methods fn transaction_store( &self ) -> &TransactionStore<N, Self::TransactionStorage> { ... } fn transition_store(&self) -> &TransitionStore<N, Self::TransitionStorage> { ... } fn dev(&self) -> Option<u16> { ... } fn start_atomic(&self) { ... } fn is_atomic_in_progress(&self) -> bool { ... } fn atomic_checkpoint(&self) { ... } fn clear_latest_checkpoint(&self) { ... } fn atomic_rewind(&self) { ... } fn abort_atomic(&self) { ... } fn finish_atomic(&self) -> Result<()> { ... }
}
Expand description

A trait for consensus storage.

Required Associated Types§

source

type FinalizeStorage: FinalizeStorage<N>

The finalize storage.

source

type BlockStorage: BlockStorage<N, TransactionStorage = Self::TransactionStorage, TransitionStorage = Self::TransitionStorage>

The block storage.

source

type TransactionStorage: TransactionStorage<N, TransitionStorage = Self::TransitionStorage>

The transaction storage.

source

type TransitionStorage: TransitionStorage<N>

The transition storage.

Required Methods§

source

fn open(dev: Option<u16>) -> Result<Self>

Initializes the consensus storage.

source

fn finalize_store(&self) -> &FinalizeStore<N, Self::FinalizeStorage>

Returns the finalize storage.

source

fn block_store(&self) -> &BlockStore<N, Self::BlockStorage>

Returns the block storage.

Provided Methods§

source

fn transaction_store(&self) -> &TransactionStore<N, Self::TransactionStorage>

Returns the transaction store.

source

fn transition_store(&self) -> &TransitionStore<N, Self::TransitionStorage>

Returns the transition store.

source

fn dev(&self) -> Option<u16>

Returns the optional development ID.

source

fn start_atomic(&self)

Starts an atomic batch write operation.

source

fn is_atomic_in_progress(&self) -> bool

Checks if an atomic batch is in progress.

source

fn atomic_checkpoint(&self)

Checkpoints the atomic batch.

source

fn clear_latest_checkpoint(&self)

Clears the latest atomic batch checkpoint.

source

fn atomic_rewind(&self)

Rewinds the atomic batch to the previous checkpoint.

source

fn abort_atomic(&self)

Aborts an atomic batch write operation.

source

fn finish_atomic(&self) -> Result<()>

Finishes an atomic batch write operation.

Object Safety§

This trait is not object safe.

Implementors§