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:
@ -637,6 +637,8 @@ fn process_balance(
|
||||
use_lamports_unit: bool,
|
||||
) -> ProcessResult {
|
||||
let pubkey = pubkey.unwrap_or(config.keypair.pubkey());
|
||||
let string = solana_stake_program::id().to_string();
|
||||
println!("{:}", string);
|
||||
let balance = rpc_client.retry_get_balance(&pubkey, 5)?;
|
||||
match balance {
|
||||
Some(lamports) => Ok(build_balance_message(lamports, use_lamports_unit, true)),
|
||||
|
@ -353,6 +353,7 @@ pub fn process_show_vote_account(
|
||||
None => "~".to_string(),
|
||||
}
|
||||
);
|
||||
println!("recent timestamp: {:?}", vote_state.last_timestamp);
|
||||
if !vote_state.votes.is_empty() {
|
||||
println!("recent votes:");
|
||||
for vote in &vote_state.votes {
|
||||
|
Reference in New Issue
Block a user