GetBlockStats

Struct GetBlockStats 

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

  1. “hash_or_height” (string or numeric, required) The block hash or height of the target block
  2. “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: u64

Average fee in the block.

§average_fee_rate: u64

Average feerate (in satoshis per virtual byte).

§average_tx_size: i64

Average transaction size.

§block_hash: String

The 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: i64

The height of the block.

§inputs: i64

The number of inputs (excluding coinbase).

§max_fee: u64

Maximum fee in the block.

§max_fee_rate: u64

Maximum feerate (in satoshis per virtual byte).

§max_tx_size: i64

Maximum transaction size.

§median_fee: u64

Truncated median fee in the block.

§median_time: i64

The block median time past.

§median_tx_size: i64

Truncated median transaction size

§minimum_fee: u64

Minimum fee in the block.

§minimum_fee_rate: u64

Minimum feerate (in satoshis per virtual byte).

§minimum_tx_size: i64

Minimum transaction size.

§outputs: i64

The number of outputs.

§subsidy: u64

The block subsidy.

§segwit_total_size: i64

Total size of all segwit transactions.

§segwit_total_weight: u64

Total weight of all segwit transactions divided by segwit scale factor (4).

§segwit_txs: i64

The number of segwit transactions.

§time: i64

The block time.

§total_out: u64

Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee]).

§total_size: i64

Total size of all non-coinbase transactions.

§total_weight: u64

Total weight of all non-coinbase transactions divided by segwit scale factor (4).

§total_fee: u64

The fee total.

§txs: i64

The number of transactions (excluding coinbase).

§utxo_increase: i32

The increase/decrease in the number of unspent outputs.

§utxo_size_increase: i32

The increase/decrease in size for the utxo index (not discounting op_return and similar).

Implementations§

Source§

impl GetBlockStats

Source

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

Source§

fn clone(&self) -> GetBlockStats

Returns a duplicate 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 GetBlockStats

Source§

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

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

impl<'de> Deserialize<'de> for GetBlockStats

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 for GetBlockStats

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for GetBlockStats

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 StructuralPartialEq for GetBlockStats

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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