mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 13:54:44 +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,4 +1,4 @@
|
||||
use types::{BeaconBlock, Signature, Slot};
|
||||
use types::{BeaconBlock, Fork, Signature, Slot};
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum BeaconNodeError {
|
||||
@@ -40,6 +40,7 @@ pub enum DutiesReaderError {
|
||||
/// Informs a validator of their duties (e.g., block production).
|
||||
pub trait DutiesReader: Send + Sync {
|
||||
fn is_block_production_slot(&self, slot: Slot) -> Result<bool, DutiesReaderError>;
|
||||
fn fork(&self) -> Result<Fork, DutiesReaderError>;
|
||||
}
|
||||
|
||||
/// Signs message using an internally-maintained private key.
|
||||
|
||||
Reference in New Issue
Block a user