mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-11-20 15:05:19 +00:00
Add log entry sync info in zgs_getStatus rpc (#200)
Some checks are pending
abi-consistent-check / build-and-compare (push) Waiting to run
code-coverage / unittest-cov (push) Waiting to run
rust / check (push) Waiting to run
rust / test (push) Waiting to run
rust / lints (push) Waiting to run
functional-test / test (push) Waiting to run
Some checks are pending
abi-consistent-check / build-and-compare (push) Waiting to run
code-coverage / unittest-cov (push) Waiting to run
rust / check (push) Waiting to run
rust / test (push) Waiting to run
rust / lints (push) Waiting to run
functional-test / test (push) Waiting to run
This commit is contained in:
parent
f878a4849c
commit
a153955246
@ -29,6 +29,7 @@ pub struct Status {
|
||||
pub connected_peers: usize,
|
||||
pub log_sync_height: u64,
|
||||
pub log_sync_block: H256,
|
||||
pub next_tx_seq: u64,
|
||||
pub network_identity: NetworkIdentity,
|
||||
}
|
||||
|
||||
|
@ -26,10 +26,13 @@ impl RpcServer for RpcServerImpl {
|
||||
.get_sync_progress()?
|
||||
.unwrap_or_default();
|
||||
|
||||
let next_tx_seq = self.ctx.log_store.get_store().next_tx_seq();
|
||||
|
||||
Ok(Status {
|
||||
connected_peers: self.ctx.network_globals.connected_peers(),
|
||||
log_sync_height: sync_progress.0,
|
||||
log_sync_block: sync_progress.1,
|
||||
next_tx_seq,
|
||||
network_identity: self.ctx.network_globals.network_id(),
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user