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

automerge
This commit is contained in:
mergify[bot]
2020-01-03 23:30:12 -08:00
committed by Grimes
parent cee22262fc
commit 6ee77e9754
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 {