diff --git a/toolkit/offchain/src/csl.rs b/toolkit/offchain/src/csl.rs index 8c14f8648..23e1dee1e 100644 --- a/toolkit/offchain/src/csl.rs +++ b/toolkit/offchain/src/csl.rs @@ -543,17 +543,14 @@ impl TransactionBuilderExt for TransactionBuilder { try_balance(self, &selected, ctx) .map_err(|e| JsError::from_str(&format!("Could not balance transaction. Usually it means that the payment key does not own UTXO set required to cover transaction outputs and fees or to provide collateral. Cause: {}", e)))?; - #[cfg(test)] - { - assert!( - balanced_transaction.body().collateral().is_some(), - "BUG: Balanced transaction should have collateral set." - ); - assert!( - balanced_transaction.body().collateral_return().is_some(), - "BUG: Balanced transaction should have collateral returned." - ); - } + debug_assert!( + balanced_transaction.body().collateral().is_some(), + "BUG: Balanced transaction should have collateral set." + ); + debug_assert!( + balanced_transaction.body().collateral_return().is_some(), + "BUG: Balanced transaction should have collateral returned." + ); Ok(balanced_transaction) }