pub struct GetBlockchainInfo {
Show 16 fields pub chain: String, pub blocks: u64, pub headers: u64, pub best_block_hash: String, pub difficulty: f64, pub median_time: u64, pub verification_progress: f64, pub initial_block_download: bool, pub chain_work: String, pub size_on_disk: u64, pub pruned: bool, pub prune_height: Option<u64>, pub automatic_pruning: Option<bool>, pub prune_target_size: Option<u64>, pub softforks: BTreeMap<String, Softfork>, pub warnings: String,
}
Available on crate feature 26_0 only.
Expand description

Result of JSON-RPC method getblockchaininfo.

Method call: getblockchaininfo

Returns an object containing various state info regarding blockchain processing.

Fields§

§chain: String

Current network name as defined in BIP70 (main, test, signet, regtest).

§blocks: u64

The current number of blocks processed in the server.

§headers: u64

The current number of headers we have validated.

§best_block_hash: String

The hash of the currently best block.

§difficulty: f64

The current difficulty.

§median_time: u64

Median time for the current best block.

§verification_progress: f64

Estimate of verification progress (between 0 and 1).

§initial_block_download: bool

Estimate of whether this node is in Initial Block Download (IBD) mode.

§chain_work: String

Total amount of work in active chain, in hexadecimal.

§size_on_disk: u64

The estimated size of the block and undo files on disk.

§pruned: bool

If the blocks are subject to pruning.

§prune_height: Option<u64>

Lowest-height complete block stored (only present if pruning is enabled).

§automatic_pruning: Option<bool>

Whether automatic pruning is enabled (only present if pruning is enabled).

§prune_target_size: Option<u64>

The target size used by pruning (only present if automatic pruning is enabled).

§softforks: BTreeMap<String, Softfork>

Status of softforks in progress, maps softfork name -> Softfork.

§warnings: String

Any network and blockchain warnings.

Implementations§

source§

impl GetBlockchainInfo

source

pub fn into_model(self) -> Result<GetBlockchainInfo, GetBlockchainInfoError>

Converts version specific type to a version in-specific, more strongly typed type.

Trait Implementations§

source§

impl Clone for GetBlockchainInfo

source§

fn clone(&self) -> GetBlockchainInfo

Returns a copy 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 GetBlockchainInfo

source§

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

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

impl<'de> Deserialize<'de> for GetBlockchainInfo

source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<GetBlockchainInfo, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for GetBlockchainInfo

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GetBlockchainInfo

source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for GetBlockchainInfo

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> 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

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

§

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>,

§

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>,

§

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>,