pub struct BlockInfoV1 {Show 30 fields
pub hash: CryptoHash,
pub height: BlockHeight,
pub last_finalized_height: BlockHeight,
pub last_final_block_hash: CryptoHash,
pub prev_hash: CryptoHash,
pub epoch_first_block: CryptoHash,
pub epoch_id: EpochId,
pub power_proposals: Vec<ValidatorPowerV1>,
pub pledge_proposals: Vec<ValidatorPledgeV1>,
pub chunk_mask: Vec<bool>,
pub latest_protocol_version: ProtocolVersion,
pub slashed: HashMap<AccountId, SlashState>,
pub total_supply: Balance,
pub timestamp_nanosec: u64,
pub random_value: CryptoHash,
pub validators: Vec<ValidatorPowerAndPledge>,
pub validator_to_index: HashMap<AccountId, ValidatorId>,
pub block_producers_settlement: Vec<ValidatorId>,
pub chunk_producers_settlement: Vec<Vec<ValidatorId>>,
pub fishermen: Vec<ValidatorPowerAndPledge>,
pub fishermen_to_index: HashMap<AccountId, ValidatorId>,
pub power_change: BTreeMap<AccountId, Power>,
pub pledge_change: BTreeMap<AccountId, Balance>,
pub validator_reward: HashMap<AccountId, Balance>,
pub seat_price: Balance,
pub minted_amount: Balance,
pub all_power_proposals: Vec<ValidatorPower>,
pub all_pledge_proposals: Vec<ValidatorPledge>,
pub validator_kickout: HashMap<AccountId, ValidatorKickoutReason>,
pub validator_mandates: ValidatorMandates,
}Expand description
Information per each block.
Fields§
§hash: CryptoHash§height: BlockHeight§last_finalized_height: BlockHeight§last_final_block_hash: CryptoHash§prev_hash: CryptoHash§epoch_first_block: CryptoHash§epoch_id: EpochId§power_proposals: Vec<ValidatorPowerV1>§pledge_proposals: Vec<ValidatorPledgeV1>§chunk_mask: Vec<bool>§latest_protocol_version: ProtocolVersionLatest protocol version this validator observes.
slashed: HashMap<AccountId, SlashState>Validators slashed since the start of epoch or in previous epoch.
total_supply: BalanceTotal supply at this block.
timestamp_nanosec: u64§random_value: CryptoHashstart customized by James Savechives
validators: Vec<ValidatorPowerAndPledge>§validator_to_index: HashMap<AccountId, ValidatorId>§block_producers_settlement: Vec<ValidatorId>§chunk_producers_settlement: Vec<Vec<ValidatorId>>§fishermen: Vec<ValidatorPowerAndPledge>§fishermen_to_index: HashMap<AccountId, ValidatorId>§power_change: BTreeMap<AccountId, Power>§pledge_change: BTreeMap<AccountId, Balance>§validator_reward: HashMap<AccountId, Balance>§seat_price: Balance§minted_amount: Balance§all_power_proposals: Vec<ValidatorPower>Power proposals from the block, only the latest one per account
all_pledge_proposals: Vec<ValidatorPledge>Pledge proposals from the block, only the latest one per account
validator_kickout: HashMap<AccountId, ValidatorKickoutReason>Kickout set, includes slashed
validator_mandates: ValidatorMandatesOnly for validators who met the threshold and didn’t get slashed
Implementations§
Source§impl BlockInfoV1
impl BlockInfoV1
pub fn new( hash: CryptoHash, height: BlockHeight, last_finalized_height: BlockHeight, last_final_block_hash: CryptoHash, prev_hash: CryptoHash, power_proposals: Vec<ValidatorPowerV1>, pledge_proposals: Vec<ValidatorPledgeV1>, validator_mask: Vec<bool>, slashed: Vec<SlashedValidator>, total_supply: Balance, latest_protocol_version: ProtocolVersion, timestamp_nanosec: u64, random_value: CryptoHash, validators: Vec<ValidatorPowerAndPledge>, validator_to_index: HashMap<AccountId, ValidatorId>, block_producers_settlement: Vec<ValidatorId>, chunk_producers_settlement: Vec<Vec<ValidatorId>>, fishermen: Vec<ValidatorPowerAndPledge>, fishermen_to_index: HashMap<AccountId, ValidatorId>, power_change: BTreeMap<AccountId, Power>, pledge_change: BTreeMap<AccountId, Balance>, validator_reward: HashMap<AccountId, Balance>, seat_price: Balance, minted_amount: Balance, all_power_proposals: Vec<ValidatorPower>, all_pledge_proposals: Vec<ValidatorPledge>, validator_kickout: HashMap<AccountId, ValidatorKickoutReason>, validator_mandates: ValidatorMandates, ) -> Self
Trait Implementations§
Source§impl BorshDeserialize for BlockInfoV1
impl BorshDeserialize for BlockInfoV1
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for BlockInfoV1
impl BorshSerialize for BlockInfoV1
Source§impl Clone for BlockInfoV1
impl Clone for BlockInfoV1
Source§fn clone(&self) -> BlockInfoV1
fn clone(&self) -> BlockInfoV1
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockInfoV1
impl Debug for BlockInfoV1
Source§impl Default for BlockInfoV1
impl Default for BlockInfoV1
Source§fn default() -> BlockInfoV1
fn default() -> BlockInfoV1
Returns the “default value” for a type. Read more
Source§impl PartialEq for BlockInfoV1
impl PartialEq for BlockInfoV1
Source§impl Serialize for BlockInfoV1
impl Serialize for BlockInfoV1
impl Eq for BlockInfoV1
impl StructuralPartialEq for BlockInfoV1
Auto Trait Implementations§
impl Freeze for BlockInfoV1
impl RefUnwindSafe for BlockInfoV1
impl Send for BlockInfoV1
impl Sync for BlockInfoV1
impl Unpin for BlockInfoV1
impl UnwindSafe for BlockInfoV1
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more