Add intermittent Timestamping to Votes (#7233)

* Add intermittent timestamp to Vote

* Add timestamp to VoteState, add timestamp processing to program

* Print recent timestamp with solana show-vote-account

* Add offset of 1 to timestamp Vote interval to initialize at node boot (slot 1)

* Review comments

* Cache last_timestamp in Tower and use for interval check

* Move work into Tower method

* Clarify timestamping interval

* Replace tuple with struct
This commit is contained in:
Tyera Eulberg
2019-12-06 14:38:49 -07:00
committed by GitHub
parent b8008ae1e9
commit 3ab8185777
7 changed files with 164 additions and 23 deletions

View File

@@ -33,6 +33,9 @@ pub enum VoteError {
#[error("vote has no slots, invalid")]
EmptySlots,
#[error("vote timestamp not recent")]
TimestampTooOld,
}
impl<E> DecodeError<E> for VoteError {
fn type_of() -> &'static str {