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

[r2r] Retry tx wait confirmation if not on chain #1474

Merged
merged 8 commits into from
Sep 27, 2022

Conversation

borngraced
Copy link
Member

Enhanced wait_for_confirmations to retry a tx request if we get tx is not on chain anymore error.
fixes: #1473

@borngraced borngraced self-assigned this Sep 17, 2022
@borngraced borngraced changed the title Retry tx wait confirmation if not on chain [r2r] Retry tx wait confirmation if not on chain Sep 17, 2022
artemii235
artemii235 previously approved these changes Sep 19, 2022
Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

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

Thanks for the fast fix! Looks good to me. Though, @sergeyboyko0791 and @shamardy may have some notes 🙂

Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix! A few minor notes :)

mm2src/coins/utxo/rpc_clients.rs Outdated Show resolved Hide resolved
mm2src/coins/utxo/rpc_clients.rs Outdated Show resolved Hide resolved
mm2src/coins/utxo/rpc_clients.rs Outdated Show resolved Hide resolved
shamardy
shamardy previously approved these changes Sep 19, 2022
Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

Nice work! Only 2 non-blocker fixes needed

mm2src/coins/utxo/rpc_clients.rs Outdated Show resolved Hide resolved
mm2src/coins/utxo/rpc_clients.rs Show resolved Hide resolved
Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

LGTM!

@sergeyboyko0791 sergeyboyko0791 merged commit b7169e4 into dev Sep 27, 2022
@sergeyboyko0791 sergeyboyko0791 deleted the tx-wait-error-retry branch September 27, 2022 10:09
borngraced added a commit that referenced this pull request Sep 30, 2022
* enable retry if tx is not available onchain

* fixed review notes

* fixed failing tests

* pr review fixes

* set test timeout to 1
sergeyboyko0791 pushed a commit that referenced this pull request Oct 11, 2022
* pubkey and secret validation done

* Validate taker and maker coin contract

* impl scret_hash validation

* optimized swap_contract_addre validation

* unimplement negotiate_coin_contract_address for slp.rs

* removed coin contract addr validation — Postponed

* added unit test for parameters

* remove unused

* PR review fixes

* removed validate_secret_hash method from trait

* removed validate_secret_hash method from trait

* [r2r] Retry tx wait confirmation if not on chain (#1474)

* enable retry if tx is not available onchain

* fixed review notes

* fixed failing tests

* pr review fixes

* set test timeout to 1

* minor fixes

* fix tests

* fixed secret_hash check

* cargo fmt

* pr riview fix

* use real pubkey for test case

* use correct raw tx bytes for extract_secret test
@borngraced borngraced mentioned this pull request Feb 17, 2023
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.

4 participants