diff --git a/zebrad/src/components/inbound/downloads.rs b/zebrad/src/components/inbound/downloads.rs index 97192d28..0d58727e 100644 --- a/zebrad/src/components/inbound/downloads.rs +++ b/zebrad/src/components/inbound/downloads.rs @@ -172,6 +172,8 @@ where let fut = async move { // Check if the block is already in the state. + // BUG: check if the hash is in any chain (#862). + // Depth only checks the main chain. match state.oneshot(zs::Request::Depth(hash)).await { Ok(zs::Response::Depth(None)) => Ok(()), Ok(zs::Response::Depth(Some(_))) => Err("already present".into()), diff --git a/zebrad/src/components/sync.rs b/zebrad/src/components/sync.rs index d673c6a2..965bc643 100644 --- a/zebrad/src/components/sync.rs +++ b/zebrad/src/components/sync.rs @@ -620,7 +620,8 @@ where /// Returns `true` if the hash is present in the state, and `false` /// if the hash is not present in the state. /// - /// TODO: handle multiple tips in the state. + /// BUG: check if the hash is in any chain (#862) + /// Depth only checks the main chain. async fn state_contains(&mut self, hash: block::Hash) -> Result { match self .state