Skip to content

feat: anchor-fill UTXO selector for consolidation withdrawals#281

Draft
karim-en wants to merge 5 commits into
mainfrom
utxo-consolidating
Draft

feat: anchor-fill UTXO selector for consolidation withdrawals#281
karim-en wants to merge 5 commits into
mainfrom
utxo-consolidating

Conversation

@karim-en
Copy link
Copy Markdown
Collaborator

No description provided.

// fee = 5000 * max(num_input, num_output) + (orchard ? 5000 : 0)
let orchard_offset = if orchard { 5000u64 } else { 0 };
let budget = max_gas_fee.saturating_sub(orchard_offset);
usize::try_from(budget / 5000).unwrap_or(usize::MAX)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add something like if max_gas_fee < 5000 * num_output + orchard_offset { return 0; } here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants