Struct chik_protocol::BlockRecord
source · pub struct BlockRecord {Show 25 fields
pub header_hash: Bytes32,
pub prev_hash: Bytes32,
pub height: u32,
pub weight: u128,
pub total_iters: u128,
pub signage_point_index: u8,
pub challenge_vdf_output: ClassgroupElement,
pub infused_challenge_vdf_output: Option<ClassgroupElement>,
pub reward_infusion_new_challenge: Bytes32,
pub challenge_block_info_hash: Bytes32,
pub sub_slot_iters: u64,
pub pool_puzzle_hash: Bytes32,
pub farmer_puzzle_hash: Bytes32,
pub required_iters: u64,
pub deficit: u8,
pub overflow: bool,
pub prev_transaction_block_height: u32,
pub timestamp: Option<u64>,
pub prev_transaction_block_hash: Option<Bytes32>,
pub fees: Option<u64>,
pub reward_claims_incorporated: Option<Vec<Coin>>,
pub finished_challenge_slot_hashes: Option<Vec<Bytes32>>,
pub finished_infused_challenge_slot_hashes: Option<Vec<Bytes32>>,
pub finished_reward_slot_hashes: Option<Vec<Bytes32>>,
pub sub_epoch_summary_included: Option<SubEpochSummary>,
}Fields§
§header_hash: Bytes32§prev_hash: Bytes32§height: u32§weight: u128§total_iters: u128§signage_point_index: u8§challenge_vdf_output: ClassgroupElement§infused_challenge_vdf_output: Option<ClassgroupElement>§reward_infusion_new_challenge: Bytes32§challenge_block_info_hash: Bytes32§sub_slot_iters: u64§pool_puzzle_hash: Bytes32§farmer_puzzle_hash: Bytes32§required_iters: u64§deficit: u8§overflow: bool§prev_transaction_block_height: u32§timestamp: Option<u64>§prev_transaction_block_hash: Option<Bytes32>§fees: Option<u64>§reward_claims_incorporated: Option<Vec<Coin>>§finished_challenge_slot_hashes: Option<Vec<Bytes32>>§finished_infused_challenge_slot_hashes: Option<Vec<Bytes32>>§finished_reward_slot_hashes: Option<Vec<Bytes32>>§sub_epoch_summary_included: Option<SubEpochSummary>Implementations§
source§impl BlockRecord
impl BlockRecord
pub fn new( header_hash: Bytes32, prev_hash: Bytes32, height: u32, weight: u128, total_iters: u128, signage_point_index: u8, challenge_vdf_output: ClassgroupElement, infused_challenge_vdf_output: Option<ClassgroupElement>, reward_infusion_new_challenge: Bytes32, challenge_block_info_hash: Bytes32, sub_slot_iters: u64, pool_puzzle_hash: Bytes32, farmer_puzzle_hash: Bytes32, required_iters: u64, deficit: u8, overflow: bool, prev_transaction_block_height: u32, timestamp: Option<u64>, prev_transaction_block_hash: Option<Bytes32>, fees: Option<u64>, reward_claims_incorporated: Option<Vec<Coin>>, finished_challenge_slot_hashes: Option<Vec<Bytes32>>, finished_infused_challenge_slot_hashes: Option<Vec<Bytes32>>, finished_reward_slot_hashes: Option<Vec<Bytes32>>, sub_epoch_summary_included: Option<SubEpochSummary>, ) -> BlockRecord
source§impl BlockRecord
impl BlockRecord
pub fn is_transaction_block(&self) -> bool
pub fn first_in_sub_slot(&self) -> bool
pub fn is_challenge_block(&self, min_blocks_per_challenge_block: u8) -> bool
Trait Implementations§
source§impl Clone for BlockRecord
impl Clone for BlockRecord
source§fn clone(&self) -> BlockRecord
fn clone(&self) -> BlockRecord
Returns a copy 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 BlockRecord
impl Debug for BlockRecord
source§impl Hash for BlockRecord
impl Hash for BlockRecord
source§impl PartialEq for BlockRecord
impl PartialEq for BlockRecord
source§fn eq(&self, other: &BlockRecord) -> bool
fn eq(&self, other: &BlockRecord) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Streamable for BlockRecord
impl Streamable for BlockRecord
fn update_digest(&self, digest: &mut Sha256)
fn stream(&self, out: &mut Vec<u8>) -> Result<()>
fn parse<const TRUSTED: bool>(input: &mut Cursor<&[u8]>) -> Result<Self>
fn to_bytes(&self) -> Result<Vec<u8>, Error>
fn from_bytes(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn hash(&self) -> [u8; 32]
impl Eq for BlockRecord
impl StructuralPartialEq for BlockRecord
Auto Trait Implementations§
impl Freeze for BlockRecord
impl RefUnwindSafe for BlockRecord
impl Send for BlockRecord
impl Sync for BlockRecord
impl Unpin for BlockRecord
impl UnwindSafe for BlockRecord
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)