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

recentBlockhash gets overwritten #3375

Open
bucurdavid opened this issue Nov 20, 2024 · 0 comments
Open

recentBlockhash gets overwritten #3375

bucurdavid opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working ts

Comments

@bucurdavid
Copy link

Currently, the AnchorProvider offers the following methods for sending transactions:

  1. sendAndConfirm
  2. sendAll

However, issues arise when using durable nonces because the recentBlockhash field gets overwritten. It would be beneficial to add a check to determine if the field is already set or to make the sendAndConfirmRawTransaction method public to provide more flexibility.

Reference:

tx.recentBlockhash = (
await this.connection.getLatestBlockhash(opts.preflightCommitment)
).blockhash;

@acheroncrypto acheroncrypto added bug Something isn't working ts labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ts
Projects
None yet
Development

No branches or pull requests

2 participants