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

bug 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.