mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 14:54:45 +00:00
Implement very raw state transition logic
This commit is contained in:
@@ -3,10 +3,10 @@ use std::time::{Duration, SystemTime};
|
||||
|
||||
pub use std::time::SystemTimeError;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum Error {
|
||||
SlotDurationIsZero,
|
||||
SystemTimeError(SystemTimeError),
|
||||
SystemTimeError(String),
|
||||
}
|
||||
|
||||
/// Determines the present slot based upon the present system time.
|
||||
@@ -51,7 +51,7 @@ impl SlotClock for SystemTimeSlotClock {
|
||||
|
||||
impl From<SystemTimeError> for Error {
|
||||
fn from(e: SystemTimeError) -> Error {
|
||||
Error::SystemTimeError(e)
|
||||
Error::SystemTimeError(format!("{:?}", e))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user