pub struct Block {Show 14 fields
pub hash: String,
pub previous_block_hash: String,
pub seed: String,
pub proposer: String,
pub round: Round,
pub period: u64,
pub transactions_root: String,
pub rewards_level: Option<MicroAlgos>,
pub rewards_rate: Option<MicroAlgos>,
pub rewards_residue: Option<MicroAlgos>,
pub transactions: Option<TransactionList>,
pub timestamp: i64,
pub upgrade_state: UpgradeState,
pub upgrade_vote: UpgradeVote,
}
Expand description
Block contains a block information
Fields§
§hash: String
The current block hash
previous_block_hash: String
The previous block hash
seed: String
The sortition seed
proposer: String
The address of this block proposer
round: Round
The current round on which this block was appended to the chain
period: u64
Period is the period on which the block was confirmed
transactions_root: String
TransactionsRoot authenticates the set of transactions appearing in the block. More specifically, it’s the root of a merkle tree whose leaves are the block’s Txids, in lexicographic order. For the empty block, it’s 0. Note that the TxnRoot does not authenticate the signatures on the transactions, only the transactions themselves. Two blocks with the same transactions but in a different order and with different signatures will have the same TxnRoot.
rewards_level: Option<MicroAlgos>
Specifies how many rewards, in MicroAlgos, have been distributed to each config.Protocol.RewardUnit of MicroAlgos since genesis.
rewards_rate: Option<MicroAlgos>
The number of new MicroAlgos added to the participation stake from rewards at the next round.
rewards_residue: Option<MicroAlgos>
The number of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round.
transactions: Option<TransactionList>
The list of transactions in this block
timestamp: i64
TimeStamp in seconds since epoch
upgrade_state: UpgradeState
§upgrade_vote: UpgradeVote
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
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>,
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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> 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>
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>
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