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

fix: break loop when exhausted all transactions #265

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

defi2026-dev
Copy link

No description provided.

ton/transactions.go Outdated Show resolved Hide resolved
@xssnick
Copy link
Owner

xssnick commented Oct 1, 2024

Hi, this method is intended to work without break, since it is subscription. You can stop it by context cancellation when you want

@xssnick xssnick closed this Oct 1, 2024
@defi2026-dev
Copy link
Author

defi2026-dev commented Oct 12, 2024

Hi, this method is intended to work without break, since it is subscription. You can stop it by context cancellation when you want

it's to break the inner loop, otherwise, it'll keep passing lastLT = 0 to ListTransactions, and it never return a empty list to break the inner loop, that's what I see in my test case.

@xssnick xssnick reopened this Oct 12, 2024
@defi2026-dev
Copy link
Author

defi2026-dev commented Oct 13, 2024

I just re-checked the case, ListTransactions(lastLT=0) will return a non-nil error, then we'll retry in the inner loop, that's why it never breaks the inner loop.

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