mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Custody persist fix (#7661)
N/A Persist the epoch -> cgc values. This is to ensure that `ValidatorRegistrations::latest_validator_custody_requirement` always returns a `Some` value post restart assuming the `epoch_validator_custody_requirements` map has been updated in the previous runs.
This commit is contained in:
@@ -654,6 +654,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
|
||||
/// Persists the custody information to disk.
|
||||
pub fn persist_custody_context(&self) -> Result<(), Error> {
|
||||
if !self.spec.is_peer_das_scheduled() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let custody_context: CustodyContextSsz = self
|
||||
.data_availability_checker
|
||||
.custody_context()
|
||||
|
||||
Reference in New Issue
Block a user