-
Notifications
You must be signed in to change notification settings - Fork 198
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
standard tx status responses #2289
Conversation
// TxStatusPending = received and maybe executed on source shard, but not on destination shard | ||
TxStatusPending TxStatus = "pending" | ||
// TxStatusSuccessful = received and executed | ||
TxStatusSuccessful TxStatus = "successful" |
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.
Breaking change for the exchanges consuming the API. But we will deal with in on the Proxy side somwhow 🥳
Perhaps we can introduce a v2
prefix in the URL on the Proxy (and re-map to old names in v1 URLs).
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.
added a jira ticket with ID EN-7718
failReason := "" | ||
retCode, err := ts.txProcessor.ProcessTransaction(tx) | ||
if err != nil { | ||
failReason = err.Error() | ||
txStatus = transaction.TxStatusNotExecuted | ||
txStatus = transaction.TxStatusUnsuccessful |
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.
Actually, here it is really non-executed
. But Unsuccessful
should be all right for most purposes, correct?
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.
yes, it can remain like this. this type of status would have been returned also on the normal transaction sending
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.
System tests passed.
Changed transactions' statuses for indexer and API transaction status fetcher. Now they use the same messages from the same place.
Changes:
Elastic Search responses:
API transaction status responses:
Meanings:
Invalid/invalid: the transaction is invalid and won't be processed. will be changed to invalid
partially-executed: executed only in sender shard. in order to abstract sharding terminology, it will be changed to pending
received: in the pool on sender shard, but not executed yet. will be changed to pending
Not Executed/not-executed: processing of the transaction failed. will be changed to unsuccessful
Success/executed: fully-executed transaction. will be changed to successful for consistency