Added node_info stuff
This commit is contained in:
55
src/monero_rpc.rs
Normal file
55
src/monero_rpc.rs
Normal file
@@ -0,0 +1,55 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct NodeInfo {
|
||||
pub id: String,
|
||||
pub jsonrpc: String,
|
||||
pub result: NodeInfoInner
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct NodeInfoInner {
|
||||
adjusted_time: u64,
|
||||
alt_blocks_count: u64,
|
||||
block_size_limit: u64,
|
||||
block_size_median: u64,
|
||||
block_weight_limit: u64,
|
||||
block_weight_median: u64,
|
||||
bootstrap_daemon_address: String,
|
||||
busy_syncing: bool,
|
||||
credits: u64,
|
||||
cumulative_difficulty: u64,
|
||||
cumulative_difficulty_top64: u64,
|
||||
database_size: u64,
|
||||
difficulty: u64,
|
||||
difficulty_top64: u64,
|
||||
free_space: u64,
|
||||
grey_peerlist_size: u64,
|
||||
height: u64,
|
||||
height_without_bootstrap: u64,
|
||||
incoming_connections_count: u64,
|
||||
mainnet: bool,
|
||||
nettype: String,
|
||||
offline: bool,
|
||||
outgoing_connections_count: u64,
|
||||
restricted: bool,
|
||||
rpc_connections_count: u64,
|
||||
stagenet: bool,
|
||||
start_time: u64,
|
||||
status: String,
|
||||
synchronized: bool,
|
||||
target: u64,
|
||||
target_height: u64,
|
||||
testnet: bool,
|
||||
top_block_hash: String,
|
||||
top_hash: String,
|
||||
tx_count: u64,
|
||||
tx_pool_size: u64,
|
||||
untrusted: bool,
|
||||
update_available: bool,
|
||||
version: String,
|
||||
was_bootstrap_ever_used: bool,
|
||||
white_peerlist_size: u64,
|
||||
wide_cumulative_difficulty: String,
|
||||
wide_difficulty: String
|
||||
}
|
||||
Reference in New Issue
Block a user