Struct btm::BtmCfg[][src]

pub struct BtmCfg {
    pub enable: bool,
    pub itv: u64,
    pub cap: u64,
    pub mode: SnapMode,
    pub algo: SnapAlgo,
    pub target: String,
}
Expand description

Config structure of snapshot

Fields

enable: bool

a global switch for enabling snapshot functions

itv: u64

interval between adjacent snapshots, default to 10 blocks

cap: u64

the maximum number of snapshots that will be stored, default to 100

mode: SnapMode

Zfs or Btrfs or External, will try a guess if missing

algo: SnapAlgo

Fair or Fade, default to ‘Fair’

target: String

a data volume containing both ledger data and tendermint data

Implementations

create a simple instance

Used in client side

generate a snapshot for the latest state of blockchain

rollback the state of blockchain to a specificed height

Get snapshot list in desc order.

try to guess a correct mode NOTE: not suitable for External mode

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.