Struct tendermint_light_client::state::State
source · pub struct State {
pub light_store: Box<dyn LightStore>,
pub verification_trace: VerificationTrace,
}
Expand description
The state managed by the light client.
Fields§
§light_store: Box<dyn LightStore>
Store for light blocks.
verification_trace: VerificationTrace
Records which blocks were needed to verify a target block, eg. during bisection.
Implementations§
source§impl State
impl State
sourcepub fn new(light_store: impl LightStore + 'static) -> Self
pub fn new(light_store: impl LightStore + 'static) -> Self
Create a new state from the given light store with an empty verification trace.
sourcepub fn trace_block(&mut self, target_height: Height, height: Height)
pub fn trace_block(&mut self, target_height: Height, height: Height)
sourcepub fn get_trace(&self, target_height: Height) -> Vec<LightBlock>
pub fn get_trace(&self, target_height: Height) -> Vec<LightBlock>
Get the verification trace for the block at target_height
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl !RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl !UnwindSafe for State
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
Mutably borrows from an owned value. Read more