From 5508ac627240895e327190f671702916d4e20ce2 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 7 Oct 2019 12:24:26 +0900 Subject: [PATCH] Add root slot to getVoteAccounts --- core/src/rpc.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/rpc.rs b/core/src/rpc.rs index b552845683..dbe70ef0c9 100644 --- a/core/src/rpc.rs +++ b/core/src/rpc.rs @@ -177,6 +177,7 @@ impl JsonRpcRequestProcessor { node_pubkey: vote_state.node_pubkey.to_string(), activated_stake: *activated_stake, commission: vote_state.commission, + root_slot: vote_state.root_slot.unwrap_or(0), epoch_vote_account, last_vote, } @@ -286,8 +287,11 @@ pub struct RpcVoteAccountInfo { /// Whether this account is staked for the current epoch pub epoch_vote_account: bool, - /// Most recent slot voted on by this vote account + /// Most recent slot voted on by this vote account (0 if no votes exist) pub last_vote: u64, + + /// Current root slot for this vote account (0 if not root slot exists) + pub root_slot: u64, } #[derive(Serialize, Deserialize, Clone, Debug)]