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: boola global switch for enabling snapshot functions
itv: u64interval between adjacent snapshots, default to 10 blocks
cap: u64the maximum number of snapshots that will be stored, default to 100
mode: SnapModeZfs or Btrfs or External, will try a guess if missing
algo: SnapAlgoFair or Fade, default to ‘Fair’
target: Stringa data volume containing both ledger data and tendermint data
Implementations
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