Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Error handling submitting/cashing cheques #1635

Closed
Eknir opened this issue Aug 2, 2019 · 3 comments
Closed

Error handling submitting/cashing cheques #1635

Eknir opened this issue Aug 2, 2019 · 3 comments

Comments

@Eknir
Copy link
Contributor

Eknir commented Aug 2, 2019

Currently, we only log an error when we can't submit / cash a cheque.
Getting an error from the blockchain can mean two things:

  1. sending the transaction to the blockchain failed
  2. the transaction was send to the blockchain, but triggered a revert (smart-contract condition)

In the first case, it can be due to some local configuration (i.e. private key not set, no connection with testnet).
In the second case, it is because the cheque was incorrectly formatted or the cheque was already submitted.

Handling the error should strive towards cashing the cheque if possible. If not possible, the amount of the cheque should be added back to the peer balance.

@mortelli
Copy link
Contributor

mortelli commented Sep 4, 2019

See also #1601.

@mortelli
Copy link
Contributor

mortelli commented Sep 6, 2019

Marking this as on hold since we are waiting for:

  1. swap: refactor lastReceivedCheque, lastSentCheque, balances to peer #1725 to be finished first
  2. error flow specification and/or diagram to be elaborated

@holisticode
Copy link
Contributor

Duplicate of #1601

@holisticode holisticode marked this as a duplicate of #1601 Oct 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants