Hook up getBlockTime rpc to real data (#7476)

* Add blocktree timestamp helper functions and tests

* Flesh out blocktree::get_block_time

* Move stakes up into rpc to make testing easier; expand tests

* Review comments
This commit is contained in:
Tyera Eulberg
2019-12-14 12:23:02 -07:00
committed by GitHub
parent d01ea20273
commit 6b88da2b82
3 changed files with 335 additions and 48 deletions

View File

@ -26,7 +26,7 @@ pub const INITIAL_LOCKOUT: usize = 2;
// smaller numbers makes
pub const MAX_EPOCH_CREDITS_HISTORY: usize = 64;
// Frequency of timestamp Votes In v0.22.0, this is approximately 30min with cluster clock
// Frequency of timestamp Votes. In v0.22.0, this is approximately 30min with cluster clock
// defaults, intended to limit block time drift to < 1hr
pub const TIMESTAMP_SLOT_INTERVAL: u64 = 4500;