You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature - Return a proper errors instead of a debug_asserts
1. Description
We have some debug_asserts in the codebase that turn out to be conditions that can be tripped in production. We should turn some of these into proper Errors. The one that we should definitely handle is the one here:
let multi_sig = MultisigTx::new_tx(&request.contract_tx,&wallet, request.tx_fee);
let txid = multi_sig.tx().txid();
debug_assert_eq!(txid, request.txid);
1.1 Context & Purpose
We think that one of the debug_asserts is a proper error so it should be treated as such. For the others, we should at least have a look to see if they should be removed or upgraded and act on them accordingly.
2. Technical Details:
Generally speaking, we create new error variants for the debug_assert condition that we want to convert (if an error variant does not exist for the condition already) and return them when the proper condition is triggered.
2.1 Acceptance Criteria:
The debug assertion highlighted above is replaced with a proper error.
3. Related Issues and Pull Requests (optional):
The text was updated successfully, but these errors were encountered:
Feature - Return a proper errors instead of a
debug_assert
s1. Description
We have some
debug_assert
s in the codebase that turn out to be conditions that can be tripped in production. We should turn some of these into proper Errors. The one that we should definitely handle is the one here:sbtc/signer/src/transaction_signer.rs
Lines 413 to 416 in 155f0d4
1.1 Context & Purpose
We think that one of the
debug_assert
s is a proper error so it should be treated as such. For the others, we should at least have a look to see if they should be removed or upgraded and act on them accordingly.2. Technical Details:
Generally speaking, we create new error variants for the
debug_assert
condition that we want to convert (if an error variant does not exist for the condition already) and return them when the proper condition is triggered.2.1 Acceptance Criteria:
3. Related Issues and Pull Requests (optional):
The text was updated successfully, but these errors were encountered: