Fix wait for confirmation function #263
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the following issues with the wait for confirmation function:
pool-errorwas being ignoredpending_transaction_inforaises an HTTP error, that error should be ignored and the function should continue retrying ifwait_roundsallows it.wait_roundswhich allows indefinitely waiting. This is a dangerous feature, since your code might actually wait forever if it never sees the transaction fail. Instead a value of 1000 (the maximum txn life) is used to implement the same thing, and in reality is the longest you will ever have to wait. (Because v1.8.0 of this SDK was already released with this function, we can't get rid of the default value altogether without breaking the API).