Emurgo / project-icarus-importer

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

Store block hash for each transaction #7

Open vsubhuman opened 5 years ago

vsubhuman commented 5 years ago

Related: https://github.com/Emurgo/yoroi-backend-service/issues/14

Currently we store only the block "height" for each confirmed transaction. We need to add a block hash also in there. Storing rules are equal to the block height:

  1. When a pending tx first inserted - block hash is null
  2. If tx updated to failed - block hash remains null
  3. If tx updated to successful - block hash is replaced with a real value
  4. In case of a rollback if a tx is changed from successful back to pending - block hash is also replaced with null