tdex-network / tdex-daemon

Go implementation of the TDEX Beta Daemon
https://tdex.network
MIT License
11 stars 13 forks source link

Restore watch for trades and unspents after restart #600

Closed altafan closed 2 years ago

altafan commented 2 years ago

This makes the trade service restore the watch for accepted trades and locked utxos.

NOTE: if a trade is already expired, the service doesn't update it's status immediately and releases the lock of the utxos, but it waits for a minute before doing that. This to give the time to the bc listener to eventually be notified about a settled trade so that it can correctly update its status and spend the utxos instead.

Closes #564.

Please @tiero review this.