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

Print error in case XRPL tx scanning is failed and retry after timeout. #202

Merged
merged 6 commits into from
Apr 5, 2024

Conversation

dzmitryhil
Copy link
Contributor

@dzmitryhil dzmitryhil commented Apr 4, 2024

Description

Print error in case XRPL tx scanning is failed and retry after timeout.

Reviewers checklist:

  • Try to write more meaningful comments with clear actions to be taken.
  • Nit-picking should be unblocking. Focus on core issues.

Authors checklist

  • Provide a concise and meaningful description
  • Review the code yourself first, before making the PR.
  • Annotate your PR in places that require explanation.
  • Think and try to split the PR to smaller PR if it is big.

This change is Reviewable

@dzmitryhil dzmitryhil requested a review from a team as a code owner April 4, 2024 09:19
@dzmitryhil dzmitryhil requested review from masihyeganeh, miladz68, ysv and wojtek-coreum and removed request for a team April 4, 2024 09:19
Copy link
Collaborator

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @wojtek-coreum)


relayer/xrpl/scanner.go line 139 at r1 (raw file):

		// set minLedger to start with it in next iteration
		// even if the error was returned we still re-scan from the lastLedger
		if lastLedger != 0 {

I can see that you assign minLedger to -1 in some places
Is it ok that you compare it to 0 here ? maybe it should be if lastLedger > 0 ?

For me it is not clear what is the logic behind -1 here

Copy link
Contributor Author

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @miladz68, @wojtek-coreum, and @ysv)


relayer/xrpl/scanner.go line 139 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

I can see that you assign minLedger to -1 in some places
Is it ok that you compare it to 0 here ? maybe it should be if lastLedger > 0 ?

For me it is not clear what is the logic behind -1 here

Actually both are OK, but agree if lastLedger > 0 is better. Updated.

miladz68
miladz68 previously approved these changes Apr 4, 2024
Copy link
Contributor

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @wojtek-coreum, and @ysv)

@dzmitryhil dzmitryhil requested a review from ysv April 5, 2024 09:53
ysv
ysv previously approved these changes Apr 5, 2024
Copy link
Collaborator

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @wojtek-coreum)

@dzmitryhil dzmitryhil dismissed stale reviews from ysv and miladz68 via 727767f April 5, 2024 11:50
@dzmitryhil dzmitryhil requested review from miladz68 and ysv April 5, 2024 11:51
Copy link
Contributor

@miladz68 miladz68 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh, @wojtek-coreum, and @ysv)

Copy link
Collaborator

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @wojtek-coreum)

@dzmitryhil dzmitryhil merged commit f0d44b3 into master Apr 5, 2024
8 checks passed
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.

3 participants