pub struct BlockTemplate {
pub header: BlockHeader,
pub coinbase_tx: Transaction,
pub transactions: Vec<Transaction>,
pub target: u128,
pub height: Natural,
pub timestamp: Natural,
}Expand description
BlockTemplate: Interface for mining software
Provides a template for mining software to work with:
- Block header with current difficulty
- Coinbase transaction template
- Selected transactions
- Mining parameters
Fields§
§header: BlockHeader§coinbase_tx: Transaction§transactions: Vec<Transaction>§target: u128§height: Natural§timestamp: NaturalTrait 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 (const: unstable) · 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 BlockTemplate
impl Debug for BlockTemplate
Source§impl<'de> Deserialize<'de> for BlockTemplate
impl<'de> Deserialize<'de> for BlockTemplate
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BlockTemplate
impl RefUnwindSafe for BlockTemplate
impl Send for BlockTemplate
impl Sync for BlockTemplate
impl Unpin for BlockTemplate
impl UnsafeUnpin for BlockTemplate
impl UnwindSafe for BlockTemplate
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§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