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

cli: Fix priority fee calculation causing panic on localnet #3318

Conversation

acheroncrypto
Copy link
Collaborator

Problem

(fees[median_index - 1].prioritization_fee + fees[median_index].prioritization_fee) / 2

Fails with:

thread 'main' panicked at cli/src/lib.rs:4735:15:
attempt to subtract with overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

When there is no recent prioritization fees, e.g. on localnet.

Summary of changes

Fix priority fee calculation causing panic on localnet.

Copy link

vercel bot commented Oct 18, 2024

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added cli fix Bug fix PR labels Oct 18, 2024
@acheroncrypto acheroncrypto merged commit b6724d2 into coral-xyz:master Oct 18, 2024
0 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli fix Bug fix PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant