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: ensure that an invalid tezos txhash will not halt the sync command #9699

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

gdixon
Copy link
Contributor

@gdixon gdixon commented Nov 18, 2021

Description

This PR will ensure the sync command will continue even when presented with a malformed/missing (from chain) txhash

Refers/Fixes

Refers to: L2 issue (https://discord.com/channels/562828676480237578/910066042284429332/910686876329988147)

Testing

Tested locally

@@ -46,7 +46,8 @@ def get_tezos_txn_status(fulfillment):

tx_response = requests.get(f'{BASE_URL}/operations/{txnid}').json()

if tx_response:
# a valid response will return a list whereas an invalid response will return a dict
if tx_response and isinstance(tx_response, list) and len(tx_response) > 0:
Copy link
Member

Choose a reason for hiding this comment

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

Could we switch this to ensure that txn_status is set to expired for this scenarios. ?
That way the txn isn't stuck in pending forever

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can, are we sure that after a tx is made it will appear on this API instantly? If there is a delay then we risk setting non-propagated tx's to expired?

@thelostone-mc thelostone-mc merged commit ecabf0b into master Nov 18, 2021
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