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
impl Clone for GetBlockTemplateResult
source§fn clone(&self) -> GetBlockTemplateResult
fn clone(&self) -> GetBlockTemplateResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GetBlockTemplateResult
impl Debug for GetBlockTemplateResult
source§impl<'de> Deserialize<'de> for GetBlockTemplateResult
impl<'de> Deserialize<'de> for GetBlockTemplateResult
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>,
source§impl PartialEq for GetBlockTemplateResult
impl PartialEq for GetBlockTemplateResult
source§fn eq(&self, other: &GetBlockTemplateResult) -> bool
fn eq(&self, other: &GetBlockTemplateResult) -> bool
self
and other
values to be equal, and is used
by ==
.