zebrad: avoid a borrow in the ChainSync future

This commit is contained in:
Henry de Valence 2020-11-12 20:01:16 -08:00
parent b632a24436
commit e9c847bbd7
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ impl StartCmd {
.map_err(|_| eyre!("could not send setup data to inbound service"))?; .map_err(|_| eyre!("could not send setup data to inbound service"))?;
info!("initializing syncer"); info!("initializing syncer");
let mut syncer = ChainSync::new(&config, peer_set, state, verifier); let syncer = ChainSync::new(&config, peer_set, state, verifier);
syncer.sync().await syncer.sync().await
} }

View File

@ -169,7 +169,7 @@ where
} }
#[instrument(skip(self))] #[instrument(skip(self))]
pub async fn sync(&mut self) -> Result<(), Report> { pub async fn sync(mut self) -> Result<(), Report> {
// We can't download the genesis block using our normal algorithm, // We can't download the genesis block using our normal algorithm,
// due to protocol limitations // due to protocol limitations
self.request_genesis().await?; self.request_genesis().await?;