Struct template_distribution_sv2::NewTemplate [−][src]
pub struct NewTemplate<'decoder> { pub template_id: u64, pub future_template: bool, pub version: u32, pub coinbase_tx_version: u32, pub coinbase_prefix: B0255<'decoder>, pub coinbase_tx_input_sequence: u32, pub coinbase_tx_value_remaining: u64, pub coinbase_tx_outputs_count: u32, pub coinbase_tx_outputs: B064K<'decoder>, pub coinbase_tx_locktime: u32, pub merkle_path: Seq0255<'decoder, U256<'decoder>>, }
Expand description
NewTemplate (Server -> Client)
The primary template-providing function. Note that the coinbase_tx_outputs bytes will appear as is at the end of the coinbase transaction.
Fields
template_id: u64
Server’s identification of the template. Strictly increasing, the current UNIX time may be used in place of an ID.
future_template: bool
True if the template is intended for future crate::SetNewPrevHash
message sent on the channel. If False, the job relates to the last
sent crate::SetNewPrevHash
message on the channel and the miner
should start to work on the job immediately.
version: u32
Valid header version field that reflects the current network consensus. The general purpose bits (as specified in [BIP320](TODO link)) can be freely manipulated by the downstream node. The downstream node MUST NOT rely on the upstream node to set the BIP320 bits to any particular value.
coinbase_tx_version: u32
The coinbase transaction nVersion field.
coinbase_prefix: B0255<'decoder>
Up to 8 bytes (not including the length byte) which are to be placed at the beginning of the coinbase field in the coinbase transaction.
coinbase_tx_input_sequence: u32
The coinbase transaction input’s nSequence field.
coinbase_tx_value_remaining: u64
The value, in satoshis, available for spending in coinbase outputs added by the client. Includes both transaction fees and block subsidy.
coinbase_tx_outputs_count: u32
The number of transaction outputs included in coinbase_tx_outputs.
coinbase_tx_outputs: B064K<'decoder>
Bitcoin transaction outputs to be included as the last outputs in the coinbase transaction.
coinbase_tx_locktime: u32
The locktime field in the coinbase transaction.
merkle_path: Seq0255<'decoder, U256<'decoder>>
Merkle path hashes ordered from deepest.
Trait Implementations
fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>
fn from_reader(reader: &mut impl Read) -> Result<Self, Error>
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<'decoder> RefUnwindSafe for NewTemplate<'decoder>
impl<'decoder> Send for NewTemplate<'decoder>
impl<'decoder> Sync for NewTemplate<'decoder>
impl<'decoder> Unpin for NewTemplate<'decoder>
impl<'decoder> !UnwindSafe for NewTemplate<'decoder>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'a, T> Encodable for T where
T: Into<EncodableField<'a>>,
impl<'a, T> Encodable for T where
T: Into<EncodableField<'a>>,