-
Notifications
You must be signed in to change notification settings - Fork 84
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
eth: refactor tx montoring, handle tx resubmissions better, general refactoring #2752
Conversation
Not ready for testing quite yet. |
It's ready again. |
d6973fa
to
7b8ba91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. Let's get this merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client/core/trade.go
Outdated
case errors.Is(err, asset.ErrTxLost): | ||
// The transaction was nonce-replaced or otherwise lost without | ||
// rejection or with user acknowlegement. Try again if we're the taker. | ||
// If we're the maker we'll give up and try to refund. | ||
c.log.Infof("Redemption %s (%s) has been noted as lost.", match.MetaData.Proof.TakerRedeem, unbip(toWallet.AssetID)) | ||
if match.Side == order.Taker { | ||
match.MetaData.Proof.TakerRedeem = nil | ||
match.Status = order.MakerRedeemed | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case the counterparty of the maker could have also got the secret. You didn't set match.MetaData.Proof.SelfRevoked = true
over there though.. so will it refund?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added commented tests for all actions now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This work accomplishes a number of goals required for putting eth and polygon into production.
Hand-tested. Will do some self-review asap.