pub struct GetBlockTemplateResult {
Show 22 fields pub bits: Vec<u8>, pub previous_block_hash: BlockHash, pub current_time: u64, pub height: u64, pub sigop_limit: u32, pub size_limit: u32, pub weight_limit: u32, pub version: u32, pub rules: Vec<GetBlockTemplateResultRules>, pub capabilities: Vec<GetBlockTemplateResultCapabilities>, pub version_bits_available: HashMap<u32, String>, pub version_bits_required: u32, pub longpollid: String, pub transactions: Vec<GetBlockTemplateResultTransaction>, pub signet_challenge: Script, pub default_witness_commitment: Script, pub coinbaseaux: HashMap<String, String>, pub coinbase_value: Amount, pub target: Vec<u8>, pub min_time: u64, pub mutable: Vec<GetBlockTemplateResulMutations>, pub nonce_range: Vec<u8>,
}
Expand description

Models the result of “getblocktemplate”

Fields

bits: Vec<u8>

The compressed difficulty in hexadecimal

previous_block_hash: BlockHash

The previous block hash the current template is mining on

current_time: u64

The current time as seen by the server (recommended for block time) Note: this is not necessarily the system clock, and must fall within the mintime/maxtime rules. Expressed as UNIX timestamp.

height: u64

The height of the block we will be mining: current height + 1

sigop_limit: u32

Block sigops limit

size_limit: u32

Block size limit

weight_limit: u32

Block weight limit

version: u32

Block header version

rules: Vec<GetBlockTemplateResultRules>

Block rules that are to be enforced

capabilities: Vec<GetBlockTemplateResultCapabilities>

List of features the Bitcoin Core getblocktemplate implementation supports

version_bits_available: HashMap<u32, String>

Set of pending, supported versionbit (BIP 9) softfork deployments

version_bits_required: u32

Bit mask of versionbits the server requires set in submissions

longpollid: String

Id used in longpoll requests for this template.

transactions: Vec<GetBlockTemplateResultTransaction>

List of transactions included in the template block

signet_challenge: Script

The signet challenge. Only set if mining on a signet, otherwise empty

default_witness_commitment: Script

The default witness commitment included in an OP_RETURN output of the coinbase transactions. Only set when mining on a network where SegWit is activated.

coinbaseaux: HashMap<String, String>

Data that should be included in the coinbase’s scriptSig content. Only the values (hexadecimal byte-for-byte) in this map should be included, not the keys. This does not include the block height, which is required to be included in the scriptSig by BIP 0034. It is advisable to encode values inside “PUSH” opcodes, so as to not inadvertently expend SIGOPs (which are counted toward limits, despite not being executed).

coinbase_value: Amount

Total funds available for the coinbase

target: Vec<u8>

The number which valid hashes must be less than, in big-endian

min_time: u64

The minimum timestamp appropriate for the next block time. Expressed as UNIX timestamp.

mutable: Vec<GetBlockTemplateResulMutations>

List of things that may be changed by the client before submitting a block

nonce_range: Vec<u8>

A range of valid nonces

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

Deserialize this value from the given Serde deserializer. Read more

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

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

Serialize this value into the given Serde serializer. Read more

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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.