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:
Jimmy Chen
2023-09-21 04:17:25 +00:00
parent 082bb2d638
commit a0478da990
12 changed files with 91 additions and 92 deletions

View File

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