Fix warnings

This commit is contained in:
Paul Hauner
2019-11-23 13:13:29 +11:00
parent 3378ce9787
commit 466eb0420f
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
use ethabi::{Contract, Token};
use ssz::Encode;
use types::{DepositData, SecretKey};
use types::DepositData;
pub use ethabi::Error;

View File

@@ -74,14 +74,14 @@ impl SlotClock for SystemTimeSlotClock {
genesis + slot * self.slot_duration
};
let slot = self
let epoch_start_slot = self
.now()
.map(|slot| slot.epoch(slots_per_epoch))
.map(|epoch| (epoch + 1).start_slot(slots_per_epoch))?;
if now >= genesis {
Some(
slot_start(self.now()? + 1)
slot_start(epoch_start_slot)
.checked_sub(now)
.expect("The next epoch cannot start before now"),
)