Replace polling with SDK PollTransaction - #38
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR modernizes the transaction polling implementation by replacing custom backoff-based polling logic with the Go Stellar SDK's built-in PollTransaction method. This change eliminates maintenance burden and leverages battle-tested SDK functionality.
Key Changes:
- Replaced custom
pollTransactionStatusfunction with SDK'sPollTransactionmethod - Removed direct dependency on
cenkalti/backoff/v4package (now indirect via SDK) - Updated to a development version of
go-stellar-sdkthat includes thePollTransactionmethod
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/rpcnetworkclient/client.go | Simplified transaction submission by replacing custom polling loop with SDK's PollTransaction method; removed backoff import and polling constants |
| go.mod | Updated go-stellar-sdk to development version; moved backoff package to indirect dependencies |
| go.sum | Updated checksums for go-stellar-sdk version change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Ready for review and merging. This PR now depends on a specific commit of go-stellar-sdk ( |
What
Replace custom backoff-based transaction polling logic with the Go Stellar SDK's built-in PollTransaction method.
Why
The go-stellar-sdk is getting PollTransaction functionality in stellar/go-stellar-sdk#5876, which is a port over of the polling transaction logic in friendbot. Now that the logic has been incorporated into the SDK, that eliminates the need for that logic to live and be maintained here.
Dependent on: