pub enum PruningStrategy {
Default,
Everything,
Nothing,
Custom,
}Expand description
We follow cosmos-sdk pruning strategies for convenience’s sake.
Variants§
Default
‘Default’ strategy defines a pruning strategy where the last 362880 heights are kept where to-be pruned heights are pruned at every 10th height. The last 362880 heights are kept(approximately 3.5 weeks worth of state) assuming the typical block time is 6s. If these values do not match the applications’ requirements, use the “custom” option.
Everything
‘Everything’ strategy defines a pruning strategy where all committed heights are deleted, storing only the current height and last 2 states. To-be pruned heights are pruned at every 10th height.
Nothing
‘Nothing’ strategy defines a pruning strategy where all heights are kept on disk.
Custom
‘Custom’ strategy defines a pruning strategy where the user specifies the pruning.
Implementations§
Source§impl PruningStrategy
impl PruningStrategy
pub fn is_custom(&self) -> bool
pub fn is_nothing(&self) -> bool
pub fn is_everything(&self) -> bool
Trait Implementations§
Source§impl Clone for PruningStrategy
impl Clone for PruningStrategy
Source§fn clone(&self) -> PruningStrategy
fn clone(&self) -> PruningStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PruningStrategy
impl Debug for PruningStrategy
Source§impl Default for PruningStrategy
impl Default for PruningStrategy
Source§fn default() -> PruningStrategy
fn default() -> PruningStrategy
Source§impl<'de> Deserialize<'de> for PruningStrategy
impl<'de> Deserialize<'de> for PruningStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for PruningStrategy
impl Serialize for PruningStrategy
impl Copy for PruningStrategy
Auto Trait Implementations§
impl Freeze for PruningStrategy
impl RefUnwindSafe for PruningStrategy
impl Send for PruningStrategy
impl Sync for PruningStrategy
impl Unpin for PruningStrategy
impl UnwindSafe for PruningStrategy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request