pub struct GetBlockStats {Show 29 fields
pub average_fee: u64,
pub average_fee_rate: u64,
pub average_tx_size: i64,
pub block_hash: String,
pub fee_rate_percentiles: [u64; 5],
pub height: i64,
pub inputs: i64,
pub max_fee: u64,
pub max_fee_rate: u64,
pub max_tx_size: i64,
pub median_fee: u64,
pub median_time: i64,
pub median_tx_size: i64,
pub minimum_fee: u64,
pub minimum_fee_rate: u64,
pub minimum_tx_size: i64,
pub outputs: i64,
pub subsidy: u64,
pub segwit_total_size: i64,
pub segwit_total_weight: u64,
pub segwit_txs: i64,
pub time: i64,
pub total_out: u64,
pub total_size: i64,
pub total_weight: u64,
pub total_fee: u64,
pub txs: i64,
pub utxo_increase: i32,
pub utxo_size_increase: i32,
}Expand description
Result of JSON-RPC method getblockstats.
getblockstats hash_or_height ( stats )
Returns the number of blocks in the longest blockchain. getblockstats hash_or_height ( stats )
Compute per block statistics for a given window. All amounts are in satoshis. It won’t work for some heights with pruning. It won’t work without -txindex for utxo_size_inc, *fee or *feerate stats.
Arguments:
- “hash_or_height” (string or numeric, required) The block hash or height of the target block
- “stats” (array, optional) Values to plot, by default all values (see result below) [ “height”, (string, optional) Selected statistic “time”, (string, optional) Selected statistic ,… ]
Fields§
§average_fee: u64Average fee in the block.
average_fee_rate: u64Average feerate (in satoshis per virtual byte).
average_tx_size: i64Average transaction size.
block_hash: StringThe block hash (to check for potential reorgs).
fee_rate_percentiles: [u64; 5]Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit (in satoshis per virtual byte).
height: i64The height of the block.
inputs: i64The number of inputs (excluding coinbase).
max_fee: u64Maximum fee in the block.
max_fee_rate: u64Maximum feerate (in satoshis per virtual byte).
max_tx_size: i64Maximum transaction size.
median_fee: u64Truncated median fee in the block.
median_time: i64The block median time past.
median_tx_size: i64Truncated median transaction size
minimum_fee: u64Minimum fee in the block.
minimum_fee_rate: u64Minimum feerate (in satoshis per virtual byte).
minimum_tx_size: i64Minimum transaction size.
outputs: i64The number of outputs.
subsidy: u64The block subsidy.
segwit_total_size: i64Total size of all segwit transactions.
segwit_total_weight: u64Total weight of all segwit transactions divided by segwit scale factor (4).
segwit_txs: i64The number of segwit transactions.
time: i64The block time.
total_out: u64Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee]).
total_size: i64Total size of all non-coinbase transactions.
total_weight: u64Total weight of all non-coinbase transactions divided by segwit scale factor (4).
total_fee: u64The fee total.
txs: i64The number of transactions (excluding coinbase).
utxo_increase: i32The increase/decrease in the number of unspent outputs.
utxo_size_increase: i32The increase/decrease in size for the utxo index (not discounting op_return and similar).
Implementations§
Source§impl GetBlockStats
impl GetBlockStats
Sourcepub fn into_model(self) -> Result<GetBlockStats, GetBlockStatsError>
pub fn into_model(self) -> Result<GetBlockStats, GetBlockStatsError>
Converts version specific type to a version in-specific, more strongly typed type.
Trait Implementations§
Source§impl Clone for GetBlockStats
impl Clone for GetBlockStats
Source§fn clone(&self) -> GetBlockStats
fn clone(&self) -> GetBlockStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more