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

Adjust wait_for_transaction_acceptance for slow indexer #2210

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

Thoralf-M
Copy link
Member

Description of change

Adjust wait_for_transaction_acceptance for slow indexer

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How the change has been tested

cargo ci-tangle-test

@Thoralf-M Thoralf-M marked this pull request as ready for review March 28, 2024 20:51
Copy link

@DaughterOfMars DaughterOfMars left a comment

Choose a reason for hiding this comment

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

I need an explanation pls

@Thoralf-M
Copy link
Member Author

@DaughterOfMars in #2209 the private tangle tests fail because sometimes the indexer isn't updated fast enough (output exists, but is not returned by the indexer, because it wasn't processed yet)
This means when we call wait_for_transaction_acceptance() and afterwards right away sync the account, then we might don't get the new outputs
That's why I added the extra logic to wait until the output id is also returned from the indexer, so when we sync it will be there. I don't like it, but at the moment I don't see any other way to handle it better. If you can think of something better, please let me know

@DaughterOfMars
Copy link

Shouldn't we wait for that separately somehow?

@Thoralf-M
Copy link
Member Author

Shouldn't we wait for that separately somehow?

I don't think so, wait_for_transaction_acceptance is not very useful without this
However, we could rename it to wait_for_transaction_outputs() or similar, if you think that's better

@DaughterOfMars
Copy link

It's just that the indexer has nothing to do with the transaction acceptance, and we don't actually use any of the info we get from it here. It feels like this is not the proper place to have this logic.

@Thoralf-M
Copy link
Member Author

wait_for_transaction_acceptance() exists because we want to wait for the outputs to be available, which was true until recently
We still want to wait until the outputs are available, otherwise this function is useless as you can see in the failing tests

@thibault-martinez thibault-martinez merged commit 2ab2750 into iotaledger:2.0 Apr 2, 2024
37 checks passed
@Thoralf-M Thoralf-M deleted the handle-slow-indexer branch April 2, 2024 17:47
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