leapdao / exit-market-maker

3 stars 0 forks source link

do not mark tx as finalized until it is mined #12

Open troggy opened 5 years ago

troggy commented 5 years ago

EMM should only mark tx as finalized when corresponding exit tx is really landed into root chain.

Given:

  1. Fast exit is submitted
  2. EMM starts an exit transaction on a root network
  3. exit transaction is failed for whatever reason

Expected: transaction should not be marked as finalized in EMM database

Actual: transaction is marked as finalized

Consequences: when failed tx marked as processed, EMM won't retry exit and money will struck in exit handler.

Manual workaround: to push stuck txs through, set finalized attribute to 0 for corresponding database record