Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in prependFeePrioritizationIx compute units #115

Open
wisefool769 opened this issue Sep 2, 2022 · 0 comments
Open

Bug in prependFeePrioritizationIx compute units #115

wisefool769 opened this issue Sep 2, 2022 · 0 comments

Comments

@wisefool769
Copy link

In prependFeePrioritizationIx in https://github.com/blockworks-foundation/mango-client-v3/blame/main/src/utils/utils.ts, which was added by this PR #101 you set the requested units in the ComputeBudgetProgram instruction to 200000 * transaction.instructions.length + 1. Surely there should be parentheses, making it 200000 * (transaction.instructions.length + 1). Ie, for a transaction that had 1 instruction before prepending the fee prioritization instruction, we should have 200_000 * (1 + 1) = 400_000 units, rather than 200_001 units?

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

No branches or pull requests

1 participant