From 1b5845ac3e22cc5868597aa1353d3bd5587d95d4 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Wed, 10 Apr 2019 17:16:08 -0700 Subject: [PATCH] Fix getting votes from gossip (#3723) --- core/src/cluster_info.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/cluster_info.rs b/core/src/cluster_info.rs index 4aff63afd..687c5d869 100644 --- a/core/src/cluster_info.rs +++ b/core/src/cluster_info.rs @@ -294,21 +294,21 @@ impl ClusterInfo { } /// Get votes in the crds - /// * since - The local timestamp when the vote was updated or inserted must be greater then + /// * since - The timestamp of when the vote inserted must be greater than /// since. This allows the bank to query for new votes only. /// - /// * return - The votes, and the max local timestamp from the new set. + /// * return - The votes, and the max timestamp from the new set. pub fn get_votes(&self, since: u64) -> (Vec, u64) { let votes: Vec<_> = self .gossip .crds .table .values() - .filter(|x| x.local_timestamp > since) + .filter(|x| x.insert_timestamp > since) .filter_map(|x| { x.value .vote() - .map(|v| (x.local_timestamp, v.transaction.clone())) + .map(|v| (x.insert_timestamp, v.transaction.clone())) }) .collect(); let max_ts = votes.iter().map(|x| x.0).max().unwrap_or(since);