Add {Vote, Tower}::last_voted_slot() (#10734)

This commit is contained in:
Ryo Onodera
2020-06-23 11:59:54 +09:00
committed by GitHub
parent 44f5452013
commit 0952b76f02
4 changed files with 26 additions and 21 deletions

View File

@ -54,6 +54,10 @@ impl Vote {
timestamp: None,
}
}
pub fn last_voted_slot(&self) -> Option<Slot> {
self.slots.last().copied()
}
}
#[derive(Serialize, Default, Deserialize, Debug, PartialEq, Eq, Clone)]