Struct common_types::blockchain_info::BlockChainInfo
source · [−]pub struct BlockChainInfo {
pub total_difficulty: U256,
pub pending_total_difficulty: U256,
pub genesis_hash: H256,
pub best_block_hash: H256,
pub best_block_number: BlockNumber,
pub best_block_timestamp: u64,
pub ancient_block_hash: Option<H256>,
pub ancient_block_number: Option<BlockNumber>,
pub first_block_hash: Option<H256>,
pub first_block_number: Option<BlockNumber>,
}
Expand description
Information about the blockchain gathered together.
Fields
total_difficulty: U256
Blockchain difficulty.
pending_total_difficulty: U256
Block queue difficulty.
genesis_hash: H256
Genesis block hash.
best_block_hash: H256
Best blockchain block hash.
best_block_number: BlockNumber
Best blockchain block number.
best_block_timestamp: u64
Best blockchain block timestamp.
ancient_block_hash: Option<H256>
Best ancient block hash.
ancient_block_number: Option<BlockNumber>
Best ancient block number.
first_block_hash: Option<H256>
First block on the best sequence.
first_block_number: Option<BlockNumber>
Number of the first block on the best sequence.
Implementations
sourceimpl BlockChainInfo
impl BlockChainInfo
sourcepub fn security_level(&self) -> SecurityLevel
pub fn security_level(&self) -> SecurityLevel
Determine the security model for the current state.
Trait Implementations
sourceimpl Clone for BlockChainInfo
impl Clone for BlockChainInfo
sourcefn clone(&self) -> BlockChainInfo
fn clone(&self) -> BlockChainInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BlockChainInfo
impl Debug for BlockChainInfo
Auto Trait Implementations
impl RefUnwindSafe for BlockChainInfo
impl Send for BlockChainInfo
impl Sync for BlockChainInfo
impl Unpin for BlockChainInfo
impl UnwindSafe for BlockChainInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more