From: Leonardo Lima Date: Tue, 19 Nov 2024 16:27:20 +0000 (-0300) Subject: chore(chain)!: use `debug_assert!` on `apply_update` X-Git-Tag: v1.0.0-beta.6~12^2 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/static/enum.ApplyBlockError.html?a=commitdiff_plain;h=2ec5aa488e9317d027d9625c1a4222e8c384b38e;p=bdk chore(chain)!: use `debug_assert!` on `apply_update` As mentioned in issue #1689 the `debug_assert!` is being used on other `LocalChain` methods, such as: `from_changeset`, and `apply_changeset` but it was missing on `apply_update`. --- diff --git a/crates/chain/src/local_chain.rs b/crates/chain/src/local_chain.rs index e16131db..b9a1b645 100644 --- a/crates/chain/src/local_chain.rs +++ b/crates/chain/src/local_chain.rs @@ -174,7 +174,7 @@ impl LocalChain { pub fn apply_update(&mut self, update: CheckPoint) -> Result { let (new_tip, changeset) = merge_chains(self.tip.clone(), update)?; self.tip = new_tip; - self._check_changeset_is_applied(&changeset); + debug_assert!(self._check_changeset_is_applied(&changeset)); Ok(changeset) }