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:
Pawan Dhananjay
2025-06-30 23:06:37 -07:00
committed by GitHub
parent 257d270718
commit e305cb1b92
7 changed files with 131 additions and 12 deletions

View File

@@ -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()