Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow for automatic retry if tx_too_early - #32

Merged
tate1650 merged 1 commit into
mainfrom
fix/tx-too-early
May 8, 2025
Merged

tate1650 merged 1 commit into
mainfrom
fix/tx-too-early

Conversation

@tate1650

@tate1650 tate1650 commented May 7, 2025

Copy link
Copy Markdown
Contributor

With the introduction of timebounds into A2U payments, it seems to be possible that even when using Time.now for min_time, it can still be earlier than the time recorded on Horizon servers. Presumably this is by a small margin, and there's nothing inherently wrong with the transaction request, so rather than immediately raising an error like we would for most user-side errors, this one we can re-attempt like a server-side error (and indeed the tx_too_early code raises errors quite frequently if we don't do this).

@tate1650
tate1650 requested a review from hklee93 May 7, 2025 22:27

@hklee93 hklee93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting error, haven't seen this one so far but glad we have seen it!

@tate1650

tate1650 commented May 8, 2025

Copy link
Copy Markdown
Contributor Author

Yeah, this one is new. It only got introduced with #28. That's my bad 😅 wasn't factoring in that the clocks might not be synchronized.

@tate1650
tate1650 merged commit b6d2bd2 into main May 8, 2025
@tate1650
tate1650 deleted the fix/tx-too-early branch May 8, 2025 23:20
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

Successfully merging this pull request may close these issues.

2 participants