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

source

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

source

pub fn is_transaction_block(&self) -> bool

source

pub fn first_in_sub_slot(&self) -> bool

source

pub fn is_challenge_block(&self, min_blocks_per_challenge_block: u8) -> bool

Trait Implementations§

source§

impl Clone for BlockRecord

source§

fn clone(&self) -> BlockRecord

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockRecord

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for BlockRecord

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for BlockRecord

source§

fn eq(&self, other: &BlockRecord) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Streamable for BlockRecord

source§

fn update_digest(&self, digest: &mut Sha256)

source§

fn stream(&self, out: &mut Vec<u8>) -> Result<()>

source§

fn parse<const TRUSTED: bool>(input: &mut Cursor<&[u8]>) -> Result<Self>

source§

fn to_bytes(&self) -> Result<Vec<u8>, Error>

source§

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
where Self: Sized,

source§

fn from_bytes_unchecked(bytes: &[u8]) -> Result<Self, Error>
where Self: Sized,

source§

fn hash(&self) -> [u8; 32]

source§

impl Eq for BlockRecord

source§

impl StructuralPartialEq for BlockRecord

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V