mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Fix genesis state download panic when running in debug mode (#4753)
## Issue Addressed #4738 ## Proposed Changes See the above issue for details. Went with option #2 to use the async reqwest client in `Eth2NetworkConfig` and propagate the async-ness.
This commit is contained in:
@@ -25,7 +25,7 @@ pub struct BootNodeConfig<T: EthSpec> {
|
||||
}
|
||||
|
||||
impl<T: EthSpec> BootNodeConfig<T> {
|
||||
pub fn new(
|
||||
pub async fn new(
|
||||
matches: &ArgMatches<'_>,
|
||||
eth2_network_config: &Eth2NetworkConfig,
|
||||
) -> Result<Self, String> {
|
||||
@@ -99,7 +99,7 @@ impl<T: EthSpec> BootNodeConfig<T> {
|
||||
|
||||
if eth2_network_config.genesis_state_is_known() {
|
||||
let genesis_state = eth2_network_config
|
||||
.genesis_state::<T>(genesis_state_url.as_deref(), genesis_state_url_timeout, &logger)?
|
||||
.genesis_state::<T>(genesis_state_url.as_deref(), genesis_state_url_timeout, &logger).await?
|
||||
.ok_or_else(|| {
|
||||
"The genesis state for this network is not known, this is an unsupported mode"
|
||||
.to_string()
|
||||
|
||||
Reference in New Issue
Block a user