pub struct BlockTemplate {
pub block: MutableBlock,
pub miner_data: MinerData,
pub coinbase_has_red_reward: bool,
pub selected_parent_timestamp: u64,
pub selected_parent_daa_score: u64,
pub selected_parent_hash: Hash,
pub calculated_fees: Vec<u64>,
}Expand description
A block template for miners.
Fields§
§block: MutableBlock§miner_data: MinerData§coinbase_has_red_reward: bool§selected_parent_timestamp: u64§selected_parent_daa_score: u64§selected_parent_hash: Hash§calculated_fees: Vec<u64>Expected length is one less than txs length due to lack of coinbase transaction
Implementations§
Source§impl BlockTemplate
impl BlockTemplate
pub fn new( block: MutableBlock, miner_data: MinerData, coinbase_has_red_reward: bool, selected_parent_timestamp: u64, selected_parent_daa_score: u64, selected_parent_hash: Hash, calculated_fees: Vec<u64>, ) -> Self
pub fn to_virtual_state_approx_id(&self) -> VirtualStateApproxId
Trait Implementations§
Source§impl Clone for BlockTemplate
impl Clone for BlockTemplate
Source§fn clone(&self) -> BlockTemplate
fn clone(&self) -> BlockTemplate
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BlockTemplate
impl RefUnwindSafe for BlockTemplate
impl Send for BlockTemplate
impl Sync for BlockTemplate
impl Unpin for BlockTemplate
impl UnwindSafe for BlockTemplate
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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