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<String, u32>, pub version_bits_required: u32, pub longpollid: String, pub transactions: Vec<GetBlockTemplateResultTransaction>, pub signet_challenge: ScriptBuf, pub default_witness_commitment: ScriptBuf, 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<String, u32>

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: ScriptBuf

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

§default_witness_commitment: ScriptBuf

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§

source§

impl Clone for GetBlockTemplateResult

source§

fn clone(&self) -> GetBlockTemplateResult

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GetBlockTemplateResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GetBlockTemplateResult

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<GetBlockTemplateResult> for GetBlockTemplateResult

source§

fn eq(&self, other: &GetBlockTemplateResult) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

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

impl Serialize for GetBlockTemplateResult

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GetBlockTemplateResult

source§

impl StructuralEq for GetBlockTemplateResult

source§

impl StructuralPartialEq for GetBlockTemplateResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,