diff --git a/crates/esplora/src/async_ext.rs b/crates/esplora/src/async_ext.rs index ca5111613..c9e167917 100644 --- a/crates/esplora/src/async_ext.rs +++ b/crates/esplora/src/async_ext.rs @@ -211,6 +211,9 @@ async fn chain_update( local_tip: &CheckPoint, anchors: &BTreeSet<(ConfirmationBlockTime, Txid)>, ) -> Result { + if latest_blocks.is_empty() { + return Ok(local_tip.clone()); + } let mut point_of_agreement = None; let mut conflicts = vec![]; for local_cp in local_tip.iter() { diff --git a/crates/esplora/src/blocking_ext.rs b/crates/esplora/src/blocking_ext.rs index b740a21db..20eba72ff 100644 --- a/crates/esplora/src/blocking_ext.rs +++ b/crates/esplora/src/blocking_ext.rs @@ -201,6 +201,9 @@ fn chain_update( local_tip: &CheckPoint, anchors: &BTreeSet<(ConfirmationBlockTime, Txid)>, ) -> Result { + if latest_blocks.is_empty() { + return Ok(local_tip.clone()); + } let mut point_of_agreement = None; let mut conflicts = vec![]; for local_cp in local_tip.iter() {