Add time since genesis to sysvar::clock (#7289)

* genesis timestamp

* remove clock::create_account()

* ..

* add configure-able creation time

* dividing by 1T, should be dividing by 1B
This commit is contained in:
Rob Walker
2019-12-12 14:03:43 -08:00
committed by GitHub
parent 1b2a9270e8
commit 777ae3c215
10 changed files with 87 additions and 51 deletions

View File

@@ -108,6 +108,9 @@ pub struct Clock {
/// the future Epoch for which the leader schedule has
/// most recently been calculated
pub leader_schedule_epoch: Epoch,
/// computed from genesis creation time and network time
/// in slots, drifts!
pub unix_timestamp: UnixTimestamp,
}
#[cfg(test)]