Struct tendermint_light_client::types::LightBlock
source ·
[−]pub struct LightBlock {
pub signed_header: SignedHeader,
pub validators: ValidatorSet,
pub next_validators: ValidatorSet,
pub provider: PeerId,
}Expand description
A light block is the core data structure used by the light client. It records everything the light client needs to know about a block.
Fields
signed_header: SignedHeaderHeader and commit of this block
validators: ValidatorSetValidator set at the block height
next_validators: ValidatorSetValidator set at the next block height
provider: PeerIdThe peer ID of the node that provided this block
Implementations
pub fn new(
signed_header: SignedHeader,
validators: ValidatorSet,
next_validators: ValidatorSet,
provider: PeerId
) -> LightBlock
pub fn new(
signed_header: SignedHeader,
validators: ValidatorSet,
next_validators: ValidatorSet,
provider: PeerId
) -> LightBlock
Constructs a new light block
Obtain the verification parameters for the light block when using it as trusted state.
Obtain the verification parameters for the light block when using it as untrusted state.
Trait Implementations
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>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for LightBlock
impl Send for LightBlock
impl Sync for LightBlock
impl Unpin for LightBlock
impl UnwindSafe for LightBlock
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
