Make validator timestamping more coincident, and increase timestamp sample range (#7673)

automerge
This commit is contained in:
Tyera Eulberg
2020-01-03 23:38:00 -07:00
committed by Grimes
parent 7e94cc2cc3
commit 84a37a2c0c
2 changed files with 32 additions and 23 deletions

View File

@ -432,7 +432,7 @@ impl Tower {
fn maybe_timestamp(&mut self, current_slot: Slot) -> Option<UnixTimestamp> {
if self.last_timestamp.slot == 0
|| self.last_timestamp.slot + TIMESTAMP_SLOT_INTERVAL <= current_slot
|| self.last_timestamp.slot < (current_slot - (current_slot % TIMESTAMP_SLOT_INTERVAL))
{
let timestamp = Utc::now().timestamp();
self.last_timestamp = BlockTimestamp {