diff --git a/sequencer/src/catchup.rs b/sequencer/src/catchup.rs index cd4858125..b8265e40d 100644 --- a/sequencer/src/catchup.rs +++ b/sequencer/src/catchup.rs @@ -136,13 +136,14 @@ impl StateCatchup for StatePeers { .await { Ok(res) => { - if res.proof.account == account.into() { - match res.proof.verify(&fee_merkle_tree_root) { - Ok(_) => return Ok(res), - Err(err) => tracing::warn!("Error verifying account proof: {}", err), - } - } else { + if res.proof.account != account.into() { tracing::warn!("Invalid proof received from peer {:?}", client.url); + continue; + } + + match res.proof.verify(&fee_merkle_tree_root) { + Ok(_) => return Ok(res), + Err(err) => tracing::warn!("Error verifying account proof: {}", err), } } Err(err) => {