Add new beacon chain test harness

This commit is contained in:
Paul Hauner
2019-06-16 02:24:33 -04:00
parent 1128de535d
commit 8fb6ffffe2
4 changed files with 154 additions and 2 deletions

View File

@@ -15,6 +15,10 @@ impl TestingSlotClock {
pub fn set_slot(&self, slot: u64) {
*self.slot.write().expect("TestingSlotClock poisoned.") = Slot::from(slot);
}
pub fn advance_slot(&self) {
self.set_slot(self.present_slot().unwrap().unwrap().as_u64() + 1)
}
}
impl SlotClock for TestingSlotClock {