fix(ckbtc/ckdoge): destructure init args#9108
Merged
Conversation
gregorydemay
approved these changes
Mar 3, 2026
Contributor
gregorydemay
left a comment
There was a problem hiding this comment.
Thanks @mducroux for the quick fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the field
max_num_inputs_in_transactionin the ckBTC / ckDOGE minter state would always be set toDEFAULT_MAX_NUM_INPUTS_IN_TRANSACTIONand the value in the init arg would be ignored. This PR fixes this issue and destructures the init args to ensure that all fields are explicitly handled, preventing future fields from being silently ignored.Changes in this PR include:
utxo_consolidation_thresholdandmax_num_inputs_in_transactionnow read fromInitArgs. Before these fields were always hardcoded toDEFAULT_UTXO_CONSOLIDATION_THRESHOLD/DEFAULT_MAX_NUM_INPUTS_IN_TRANSACTION, ignoring theInitArgsvalues entirely.check_feenow falls back tokyt_fee. Before onlycheck_feewas considered. Now:check_feefalls back tokyt_feebefore the default. This is consistent with the upgrade and reinit methods.DOGECOIN_MAX_NUM_INPUTS_IN_TRANSACTIONset to 500.The behaviour of init is now similar to upgrade / reinit. The only difference is that the upgrade and reinit paths enforce that
utxo_consolidation_threshold > max_num_inputs_in_transaction, rejecting invalid values with a log message. The init path does not enforce this constraint (it is unclear why this contraint is here in the first place).