coblox / nectar

GNU General Public License v3.0
0 stars 1 forks source link

Investigate nectar missing swap events (that are properly detected on cnd's side) #108

Closed da-kami closed 4 years ago

da-kami commented 4 years ago

Setup:

  1. Take SELL order in taker UI
  2. Swap started between taker cnd and nectar.
  3. cnd redeems Bitcoin and yields swap finished
  4. Nectar gets stuck looking for cnd's redeem.

The redeem is properly detected on on cnd's side (yielded swap finished). Nectar kept looking for the transaction.

I noticed this behaviour on multiple occasions. My hunch, that Nectar somehow does not properly initializes the timestamp for watching transactions for btsieve, could not be proven to be the problem, we seem to set that correctly:

https://github.com/coblox/nectar/blob/e873a482c0242e5de32e9cfb46cf60e0b81a622b/src/network.rs#L449-L529

It could be, that we somehow set the timestamp different when starting to look for redeem?

Did not investigate further.

D4nte commented 4 years ago

comit lib expects UTC time (blockchain time) but we get the local time! Hence the issue. Fixing it now.