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

Handle duplicate transactions correctly by using consensus_ns as the key #210

Merged
merged 1 commit into from
Sep 6, 2019

Conversation

atul-hedera
Copy link
Contributor

@atul-hedera atul-hedera commented Sep 5, 2019

instead of transaction-id since the transaction-ids are not unique.

Signed-off-by: atul mahamuni atulmahamuni@hedera.com

Detailed description:
If the user submits the same transaction to more than one nodes, the first one succeeds, and the other copies (duplicates) are still charged the transaction processing fees, and hence they show up in the record stream. So the record stream could have multiple entries for the same transaction-ids. Currently, the code had assumed that the transaction-id is unique. Made the change to use consensus_ns as a unique key.

Which issue(s) this PR fixes:
Fixes #205

Checklist

  • Documentation added - Informed the doc writer to update the documentation.
  • Tests updated - Not Applicable

instead of transaction-id since the transaction-ids are not unique.

Signed-off-by: atul mahamuni <atulmahamuni@hedera.com>
Copy link
Contributor

@mike-burrage-hedera mike-burrage-hedera left a comment

Choose a reason for hiding this comment

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

LGTM

@mike-burrage-hedera mike-burrage-hedera merged commit f6e13fe into master Sep 6, 2019
@delete-merged-branch delete-merged-branch bot deleted the 205-duplicate-transactions branch September 6, 2019 14:52
@steven-sheehy steven-sheehy added rest Area: REST API bug Type: Something isn't working P1 labels Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Something isn't working P1 rest Area: REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate the possible failure in transaction monitoring test on testnet
3 participants