pub struct GetBlockchainInfoRes {
    pub best_block: String,
    pub height: u32,
    pub ibd: bool,
    pub validated: u32,
    pub latest_work: String,
    pub latest_block_time: u32,
    pub leaf_count: u32,
    pub root_count: u32,
    pub root_hashes: Vec<String>,
    pub chain: String,
    pub progress: Option<f32>,
    pub difficulty: u64,
}

Fields§

§best_block: String

The best block we know about

This should be the hash of the latest block in the most PoW chain we know about. We may or may not have fully-validated it yet

§height: u32

The depth of the most-PoW chain we know about

§ibd: bool

Whether we are on Initial Block Download

§validated: u32

How many blocks we have fully-validated so far? This number will be smaller than height during IBD, and should be equal to height otherwise

§latest_work: String

The work performed by the last block

This is the estimated amount of hashes the miner of this block had to perform before mining that block, on average

§latest_block_time: u32

The UNIX timestamp for the latest block, as reported by the block’s header

§leaf_count: u32

How many leaves we have in the utreexo accumulator so far

This should be equal to the number of UTXOs returned by core’s gettxoutsetinfo

§root_count: u32

How many roots we have in the acc

§root_hashes: Vec<String>

The actual hex-encoded roots

§chain: String

A short string representing the chain we’re in

§progress: Option<f32>

The validation progress

0% means we didn’t validate any block. 100% means we’ve validated all blocks, so validated == height

§difficulty: u64

Current network “difficulty”

On average, miners needs to make difficulty hashes before finding one that solves a block’s PoW

Trait Implementations§

source§

impl Debug for GetBlockchainInfoRes

source§

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

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

impl<'de> Deserialize<'de> for GetBlockchainInfoRes

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 Serialize for GetBlockchainInfoRes

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

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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, U> TryFrom<U> for Twhere 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 Twhere 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 Twhere T: for<'de> Deserialize<'de>,