From 3d9a2f1da50d937f7ba5817d40939b157e4becda Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 8 Dec 2020 07:30:55 +1000 Subject: [PATCH] Stop panicking on side chain contextual validation (#1465) Closes #1464. --- zebra-state/src/service.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zebra-state/src/service.rs b/zebra-state/src/service.rs index eb57e7d72..927d23334 100644 --- a/zebra-state/src/service.rs +++ b/zebra-state/src/service.rs @@ -268,7 +268,6 @@ impl StateService { } /// Return the height for the block at `hash` in any chain. - #[allow(dead_code)] pub fn any_height_by_hash(&self, hash: block::Hash) -> Option { self.mem .any_height_by_hash(hash) @@ -516,7 +515,7 @@ impl ExactSizeIterator for Iter<'_> { match self.state { IterState::NonFinalized(hash) => self .service - .best_height_by_hash(hash) + .any_height_by_hash(hash) .map(|height| (height.0 + 1) as _) .unwrap_or(0), IterState::Finalized(height) => (height.0 + 1) as _,