pub struct NetworkStatusResponse {
pub current_block_identifier: BlockIdentifier,
pub current_block_timestamp: i64,
pub genesis_block_identifier: Option<BlockIdentifier>,
pub oldest_block_identifier: Option<BlockIdentifier>,
pub sync_status: Option<SyncStatus>,
pub peers: Option<Vec<Peer>>,
}
Expand description
NetworkStatusResponse : NetworkStatusResponse contains basic information about the node’s view of a blockchain network. It is assumed that any BlockIdentifier.Index less than or equal to CurrentBlockIdentifier.Index can be queried. If a Rosetta implementation prunes historical state, it should populate the optional oldest_block_identifier
field with the oldest block available to query. If this is not populated, it is assumed that the genesis_block_identifier
is the oldest queryable block. If a Rosetta implementation performs some pre-sync before it is possible to query blocks, sync_status should be populated so that clients can still monitor healthiness. Without this field, it may appear that the implementation is stuck syncing and needs to be terminated.
Fields§
§current_block_identifier: BlockIdentifier
§current_block_timestamp: i64
The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second.
genesis_block_identifier: Option<BlockIdentifier>
§oldest_block_identifier: Option<BlockIdentifier>
§sync_status: Option<SyncStatus>
§peers: Option<Vec<Peer>>
Implementations§
source§impl NetworkStatusResponse
impl NetworkStatusResponse
sourcepub fn new(
current_block_identifier: BlockIdentifier,
current_block_timestamp: i64,
genesis_block_identifier: BlockIdentifier
) -> NetworkStatusResponse
pub fn new( current_block_identifier: BlockIdentifier, current_block_timestamp: i64, genesis_block_identifier: BlockIdentifier ) -> NetworkStatusResponse
NetworkStatusResponse contains basic information about the node’s view of a blockchain network. It is assumed that any BlockIdentifier.Index less than or equal to CurrentBlockIdentifier.Index can be queried. If a Rosetta implementation prunes historical state, it should populate the optional oldest_block_identifier
field with the oldest block available to query. If this is not populated, it is assumed that the genesis_block_identifier
is the oldest queryable block. If a Rosetta implementation performs some pre-sync before it is possible to query blocks, sync_status should be populated so that clients can still monitor healthiness. Without this field, it may appear that the implementation is stuck syncing and needs to be terminated.
Trait Implementations§
source§impl Clone for NetworkStatusResponse
impl Clone for NetworkStatusResponse
source§fn clone(&self) -> NetworkStatusResponse
fn clone(&self) -> NetworkStatusResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NetworkStatusResponse
impl Debug for NetworkStatusResponse
source§impl Default for NetworkStatusResponse
impl Default for NetworkStatusResponse
source§fn default() -> NetworkStatusResponse
fn default() -> NetworkStatusResponse
source§impl<'de> Deserialize<'de> for NetworkStatusResponse
impl<'de> Deserialize<'de> for NetworkStatusResponse
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl PartialEq<NetworkStatusResponse> for NetworkStatusResponse
impl PartialEq<NetworkStatusResponse> for NetworkStatusResponse
source§fn eq(&self, other: &NetworkStatusResponse) -> bool
fn eq(&self, other: &NetworkStatusResponse) -> bool
self
and other
values to be equal, and is used
by ==
.