mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 06:44:35 +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:
@@ -7,7 +7,7 @@ use types::{EthSpec, Hash256};
|
||||
/// 32-byte key for accessing the `CustodyContext`. All zero because `CustodyContext` has its own column.
|
||||
pub const CUSTODY_DB_KEY: Hash256 = Hash256::ZERO;
|
||||
|
||||
pub struct PersistedCustody(CustodyContextSsz);
|
||||
pub struct PersistedCustody(pub CustodyContextSsz);
|
||||
|
||||
pub fn load_custody_context<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>>(
|
||||
store: Arc<HotColdDB<E, Hot, Cold>>,
|
||||
|
||||
Reference in New Issue
Block a user