Expand description
Support functions for the get_block_template()
RPC.
Re-exports§
pub use crate::methods::get_block_template_rpcs::types::get_block_template::*;
Functions§
- calculate_
default_ root_ hashes - Returns the default block roots for the supplied coinbase and mempool transactions, and the supplied history tree.
- calculate_
miner_ fee - Returns the total miner fee for
mempool_txs
. - calculate_
transaction_ roots - Returns the transaction effecting and authorizing roots
for
coinbase_txn
andmempool_txs
, which are used in the block header. - check_
miner_ address - Returns the miner address, or an error if it is invalid.
- check_
parameters - Checks that
data
is omitted inTemplate
mode or provided inProposal
mode, - check_
synced_ to_ tip - Returns an error if Zebra is not synced to the consensus chain tip.
Returns early with
Ok(())
if Proof-of-Work is disabled on the providednetwork
. This error might be incorrect if the local clock is skewed. - combine_
coinbase_ 🔒outputs - Combine the miner reward and funding streams into a list of coinbase amounts and addresses.
- fetch_
mempool_ transactions - Returns the transactions that are currently in
mempool
, or None if thelast_seen_tip_hash
from the mempool response doesn’t match the tip hash from the state. - fetch_
state_ tip_ and_ local_ time - Returns the state data for the block template.
- generate_
coinbase_ and_ roots - Generates and returns the coinbase transaction and default roots.
- generate_
coinbase_ transaction - Returns a coinbase transaction for the supplied parameters.
- standard_
coinbase_ outputs - Returns the standard funding stream and miner reward transparent output scripts
for
network
,height
andminer_fee
. - validate_
block_ proposal - Attempts to validate block proposal against all of the server’s usual acceptance rules (except proof-of-work).