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§
- Returns the default block roots for the supplied coinbase and mempool transactions, and the supplied history tree.
- Returns the total miner fee for
mempool_txs
. - Returns the transaction effecting and authorizing roots for
coinbase_txn
andmempool_txs
, which are used in the block header. - Returns the miner address, or an error if it is invalid.
- Checks that
data
is omitted inTemplate
mode or provided inProposal
mode, - 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 the miner reward and funding streams into a list of coinbase amounts and addresses.
- 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. - Returns the state data for the block template.
- Generates and returns the coinbase transaction and default roots.
- Returns a coinbase transaction for the supplied parameters.
- Returns the standard funding stream and miner reward transparent output scripts for
network
,height
andminer_fee
. - Attempts to validate block proposal against all of the server’s usual acceptance rules (except proof-of-work).