pub struct GetBlockchainInfo {Show 16 fields
pub chain: String,
pub blocks: i64,
pub headers: i64,
pub best_block_hash: String,
pub difficulty: f64,
pub median_time: i64,
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<i64>,
pub automatic_pruning: Option<bool>,
pub prune_target_size: Option<i64>,
pub softforks: BTreeMap<String, Softfork>,
pub warnings: String,
}Expand description
Result of JSON-RPC method getblockchaininfo.
Method call: getblockchaininfo
Returns an object containing various state info regarding blockchain processing.
Fields§
§chain: StringCurrent network name as defined in BIP70 (main, test, signet, regtest).
blocks: i64The current number of blocks processed in the server.
headers: i64The current number of headers we have validated.
best_block_hash: StringThe hash of the currently best block.
difficulty: f64The current difficulty.
median_time: i64Median time for the current best block.
verification_progress: f64Estimate of verification progress (between 0 and 1).
initial_block_download: boolEstimate of whether this node is in Initial Block Download (IBD) mode.
chain_work: StringTotal amount of work in active chain, in hexadecimal.
size_on_disk: u64The estimated size of the block and undo files on disk.
pruned: boolIf the blocks are subject to pruning.
prune_height: Option<i64>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<i64>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: StringAny network and blockchain warnings.
Implementations§
Source§impl GetBlockchainInfo
impl GetBlockchainInfo
Sourcepub fn into_model(self) -> Result<GetBlockchainInfo, GetBlockchainInfoError>
Available on crate feature 26_2 and non-crate feature 27_0 only.
pub fn into_model(self) -> Result<GetBlockchainInfo, GetBlockchainInfoError>
26_2 and non-crate feature 27_0 only.Converts version specific type to a version in-specific, more strongly typed type.
Trait Implementations§
Source§impl Clone for GetBlockchainInfo
impl Clone for GetBlockchainInfo
Source§fn clone(&self) -> GetBlockchainInfo
fn clone(&self) -> GetBlockchainInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GetBlockchainInfo
impl Debug for GetBlockchainInfo
Source§impl<'de> Deserialize<'de> for GetBlockchainInfo
impl<'de> Deserialize<'de> for GetBlockchainInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetBlockchainInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetBlockchainInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for GetBlockchainInfo
impl PartialEq for GetBlockchainInfo
Source§impl Serialize for GetBlockchainInfo
impl Serialize for GetBlockchainInfo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for GetBlockchainInfo
Auto Trait Implementations§
impl Freeze for GetBlockchainInfo
impl RefUnwindSafe for GetBlockchainInfo
impl Send for GetBlockchainInfo
impl Sync for GetBlockchainInfo
impl Unpin for GetBlockchainInfo
impl UnwindSafe for GetBlockchainInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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