diff --git a/zebrad/src/commands/start.rs b/zebrad/src/commands/start.rs index 619d47bde..f829f3552 100644 --- a/zebrad/src/commands/start.rs +++ b/zebrad/src/commands/start.rs @@ -75,7 +75,7 @@ impl StartCmd { .map_err(|_| eyre!("could not send setup data to inbound service"))?; 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 } diff --git a/zebrad/src/components/sync.rs b/zebrad/src/components/sync.rs index ecf687b2b..ba749a4c9 100644 --- a/zebrad/src/components/sync.rs +++ b/zebrad/src/components/sync.rs @@ -169,7 +169,7 @@ where } #[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, // due to protocol limitations self.request_genesis().await?;