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

tx_signer: speculatively increment sequence on error #178

Merged
merged 1 commit into from
Oct 17, 2020

Conversation

tony-iqlusion
Copy link
Member

When encountering an error broadcasting a transaction, speculatively retry the operation once with an incremented sequence number.

This is to handle the case where a transaction was successfully broadcast, but an error occurred returning the response.

In such a case, the sequence number may be out-of-sync with the chain, so if we replay the transaction in such cases we may get it to succeed.

When encountering an error broadcasting a transaction, speculatively
retry the operation once with an incremented sequence number.

This is to handle the case where a transaction was successfully
broadcast, but an error occurred returning the response.

In such a case, the sequence number may be out-of-sync with the chain,
so if we replay the transaction in such cases we may get it to succeed.
@tony-iqlusion tony-iqlusion requested a review from a team October 17, 2020 19:42
@codecov-io
Copy link

Codecov Report

Merging #178 into develop will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #178      +/-   ##
===========================================
- Coverage    22.83%   22.77%   -0.06%     
===========================================
  Files           63       63              
  Lines         2444     2450       +6     
===========================================
  Hits           558      558              
- Misses        1886     1892       +6     
Impacted Files Coverage Δ
src/tx_signer.rs 0.00% <0.00%> (ø)
src/tx_signer/sign_msg.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8514614...b690169. Read the comment docs.

@tony-iqlusion tony-iqlusion merged commit f1807f5 into develop Oct 17, 2020
@tony-iqlusion tony-iqlusion deleted the tx_signer/speculative-seq-incrementing branch October 17, 2020 19:54
@tony-iqlusion tony-iqlusion mentioned this pull request Oct 22, 2020
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