mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Fix enr loading from disk with cgc (#7754)
N/A During building an enr on startup, we weren't using the value in the custody context. This was resulting in the enr value getting updated when the cgc updates, the change getting persisted, but getting set back to the default on restart. This PR takes the value explicitly from the custody context.
This commit is contained in:
@@ -38,8 +38,15 @@ pub fn run<E: EthSpec>(matches: &ArgMatches, spec: &ChainSpec) -> Result<(), Str
|
||||
next_fork_version: genesis_fork_version,
|
||||
next_fork_epoch: Epoch::max_value(), // FAR_FUTURE_EPOCH
|
||||
};
|
||||
let enr = build_enr::<E>(&enr_key, &config, &enr_fork_id, genesis_fork_digest, spec)
|
||||
.map_err(|e| format!("Unable to create ENR: {:?}", e))?;
|
||||
let enr = build_enr::<E>(
|
||||
&enr_key,
|
||||
&config,
|
||||
&enr_fork_id,
|
||||
None,
|
||||
genesis_fork_digest,
|
||||
spec,
|
||||
)
|
||||
.map_err(|e| format!("Unable to create ENR: {:?}", e))?;
|
||||
|
||||
fs::create_dir_all(&output_dir).map_err(|e| format!("Unable to create output-dir: {:?}", e))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user