diff --git a/zebra-state/src/service.rs b/zebra-state/src/service.rs index e6fe6c69..35f09eb7 100644 --- a/zebra-state/src/service.rs +++ b/zebra-state/src/service.rs @@ -166,7 +166,7 @@ impl StateService { let queued_children = self.queued_blocks.dequeue_children(parent_hash); for (child, rsp_tx) in queued_children { - let child_hash = child.hash.clone(); + let child_hash = child.hash; tracing::trace!(?child_hash, "validating queued child"); let result = self .validate_and_commit(child) diff --git a/zebra-state/src/service/non_finalized_state/queued_blocks.rs b/zebra-state/src/service/non_finalized_state/queued_blocks.rs index 0bea77fd..6593a57c 100644 --- a/zebra-state/src/service/non_finalized_state/queued_blocks.rs +++ b/zebra-state/src/service/non_finalized_state/queued_blocks.rs @@ -66,11 +66,10 @@ impl QueuedBlocks { .unwrap_or_default() .into_iter() .map(|hash| { - let queued = self + self .blocks .remove(&hash) - .expect("block is present if its hash is in by_parent"); - queued + .expect("block is present if its hash is in by_parent") }) .collect::>();