AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
344 stars 44 forks source link

XMR Taker showing wrong status of past swap #385

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

I just had a stagenet token swap. Both sides completed successfully. Server was restarted before querying the past swaps. (That may or may not be relevant, I can't go back and time and query the past swap before restarting.) The Maker is showing that the swap completed successfully when running swapcli past, but the taker is showing that the status is ContractReady:

Proof that taker side completed successfully:

$ ./bin/swapcli take --peer-id 12D3KooWNseb7Ei8Xx1aBKjSFoZ9PGfdxN9MwQxfSRxsBAyA8op4 --offer-id 0x91d8a21a6a7682def6507d4e70d37e12cdfa991d9e7a777077bc815a9708db94 --provides-amount 15 --swapd-port 5001
Initiated swap with offer ID 0x91d8a21a6a7682def6507d4e70d37e12cdfa991d9e7a777077bc815a9708db94
2023-04-16-01:05:44 > Stage updated: ExpectingKeys
2023-04-16-01:06:13 > Stage updated: ETHLocked
2023-04-16-01:33:37 > Stage updated: ContractReady
2023-04-16-01:40:26 > Stage updated: Success

Here's the swapcli past swap query against the same taker server (after restart). Note that the End Time is also missing:

$ ./bin/swapcli past --offer-id 0x91d8a21a6a7682def6507d4e70d37e12cdfa991d9e7a777077bc815a9708db94 --swapd-port 5001
Past swaps:
ID: 0x91d8a21a6a7682def6507d4e70d37e12cdfa991d9e7a777077bc815a9708db94
Start time: 2023-04-16-01:05:43
End time: -
Provided: 15 "NOOT"
Received: 10 XMR
Exchange Rate: 1.5 ETH/XMR
Status: ContractReady

This test was in the dimalinux/erc20-balance development branch, but I do not think the incorrect status could be related to branch changes.

noot commented 1 year ago

did you see the completed successfully log on the taker side before shutting down the server, or was it still sweeping the monero? also what are the debug logs on starting up the taker again?

noot commented 1 year ago

duplicate / related to #374