mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Introduce Fork struct to block_producer
It's a pretty crappy solution, IMO. It shouldn't really belong in "duties" but this gets the job done for now.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::{DutiesReader, DutiesReaderError};
|
||||
use std::collections::HashMap;
|
||||
use types::{Epoch, Slot};
|
||||
use types::{Epoch, Fork, Slot};
|
||||
|
||||
pub struct EpochMap {
|
||||
slots_per_epoch: u64,
|
||||
@@ -25,4 +25,12 @@ impl DutiesReader for EpochMap {
|
||||
_ => Err(DutiesReaderError::UnknownEpoch),
|
||||
}
|
||||
}
|
||||
|
||||
fn fork(&self) -> Result<Fork, DutiesReaderError> {
|
||||
Ok(Fork {
|
||||
previous_version: 0,
|
||||
current_version: 0,
|
||||
epoch: Epoch::new(0),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user