mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-28 18:23:38 +00:00
Small improvement: encapsulate a public field (#1362)
## Issue Addressed
This PR makes the `Eth1Chain::use_dummy_backend` field private. I believe this could be good to ensure the consistency of a Eth1Chain instance. 💡
This commit is contained in:
@@ -82,7 +82,7 @@ where
|
||||
backend: T,
|
||||
/// When `true`, the backend will be ignored and dummy data from the 2019 Canada interop method
|
||||
/// will be used instead.
|
||||
pub use_dummy_backend: bool,
|
||||
use_dummy_backend: bool,
|
||||
_phantom: PhantomData<E>,
|
||||
}
|
||||
|
||||
@@ -99,6 +99,13 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_dummy(backend: T) -> Self {
|
||||
Self {
|
||||
use_dummy_backend: true,
|
||||
..Self::new(backend)
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the `Eth1Data` that should be included in a block being produced for the given
|
||||
/// `state`.
|
||||
pub fn eth1_data_for_block_production(
|
||||
|
||||
Reference in New Issue
Block a user