mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-12-24 07:15:17 +00:00
return network identity for status rpc (#178)
This commit is contained in:
parent
e3c199d361
commit
4edd61b9d2
@ -7,7 +7,8 @@ use merkle_tree::RawLeafSha3Algorithm;
|
||||
use network::Multiaddr;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use shared_types::{
|
||||
compute_padded_chunk_size, compute_segment_size, DataRoot, FileProof, Transaction, CHUNK_SIZE,
|
||||
compute_padded_chunk_size, compute_segment_size, DataRoot, FileProof, NetworkIdentity,
|
||||
Transaction, CHUNK_SIZE,
|
||||
};
|
||||
use std::collections::HashSet;
|
||||
use std::hash::Hasher;
|
||||
@ -28,6 +29,7 @@ pub struct Status {
|
||||
pub connected_peers: usize,
|
||||
pub log_sync_height: u64,
|
||||
pub log_sync_block: H256,
|
||||
pub network_identity: NetworkIdentity,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
|
@ -30,6 +30,7 @@ impl RpcServer for RpcServerImpl {
|
||||
connected_peers: self.ctx.network_globals.connected_peers(),
|
||||
log_sync_height: sync_progress.0,
|
||||
log_sync_block: sync_progress.1,
|
||||
network_identity: self.ctx.network_globals.network_id(),
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user