From 08569c81e98edfc6d2da9eb90b4a39d0e61451f6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2019 18:13:46 -0800 Subject: [PATCH] getVoteAccounts RPC API no longer returns "idle" vote accounts (#7339) (#7341) automerge --- core/src/rpc.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/rpc.rs b/core/src/rpc.rs index a9ed2649b2..439c72b3b1 100644 --- a/core/src/rpc.rs +++ b/core/src/rpc.rs @@ -255,6 +255,10 @@ impl JsonRpcRequestProcessor { last_vote, } }) + .filter(|vote_account_info| { + // Remove vote accounts that have never voted and also have no stake + vote_account_info.last_vote == 0 && vote_account_info.activated_stake == 0 + }) .partition(|vote_account_info| { if bank.slot() >= MAX_LOCKOUT_HISTORY as u64 { vote_account_info.last_vote > bank.slot() - MAX_LOCKOUT_HISTORY as u64