input-output-hk / project-icarus-importer

Icarus, a reference implementation for a lightweight wallet developed by the IOHK Engineering Team.
Other
13 stars 10 forks source link

Fix double-transaction bug #6

Closed SebastienGllmt closed 6 years ago

SebastienGllmt commented 6 years ago

Description

Sending the same valid transaction twice (such as may happen under poor networking conditions) will cause one transaction to succeed and the other to fail. This is expected behavior but the problem is that the resulting DB state is that the transaction "failed" despite it being properly included in the blockchain.

Fix: Since a transition from "successful" -> "failed" is not possible in our spec, we simply make it impossible for a "failed" transaction to change the DB status from "failed" -> "successful"

Linked issue

N/A

Type of change

SebastienGllmt commented 6 years ago

Abandon in favor of #7