-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add retry logic to RPC methods (#1166)
* Add async support and retry logic to RPC methods Added the 'async-trait' crate to provide async trait methods in RPC interfaces. Implemented async versions of existing synchronous methods and added retry logic for better error handling in 'SolanaRpcConnection'. * Switch to async_trait for TransactionBuilder methods The `build_signed_transaction_batch` method in `TransactionBuilder` now uses `async_trait` to support async/await syntax. This change ensures better concurrency handling and simplifies the implementation of asynchronous code within the trait. Additionally, added a TODO comment about optimizing retry logic for sending transactions. * Reorganize imports in send_transaction.rs Move `async_trait::async_trait` to the correct location. This change improves code readability by maintaining a consistent import ordering.
- Loading branch information
1 parent
183bcbf
commit c7491d0
Showing
14 changed files
with
290 additions
and
245 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,4 @@ log = "0.4" | |
num-bigint = "0.4.6" | ||
num-traits = "0.2.19" | ||
reqwest = "0.11.26" | ||
async-trait = "0.1.82" |
This file contains 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
Oops, something went wrong.