This repository was archived by the owner on Aug 2, 2021. It is now read-only.
This repository was archived by the owner on Aug 2, 2021. It is now read-only.
Error handling submitting/cashing cheques #1635
Closed
Description
Currently, we only log an error when we can't submit / cash a cheque.
Getting an error from the blockchain can mean two things:
- sending the transaction to the blockchain failed
- 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.