-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Funds Lost - JSON-RPC request failed with code -4: No unlocked balance in the specified account #848
Comments
This may be of help #767 (comment) |
It worked @4eMaLo |
Glad to hear! This may be because I interrupted the swap. This may be solved if we store the current block height before doing anything, then using this height to create the wallet. |
I think you are correct. It's definitely related to the restore height. This just happened to me as well. In my case the restore height was 979530 and the transaction as included in block 979527 xmr-btc-swap/swap/src/protocol/bob/swap.rs Lines 100 to 112 in 9ea73a8
This code is executed every time the swap is resumed and the last action of the cli was that Bob locked his bitcoin. This is a problem when Bob locks his bitcoin and then goes offline. Alice then locks her Monero while he is offline. When Bob comes back online, he uses the current Monero block height to create the Monero redeem wallet. When he then tries to redeem the Monero, an error is thrown because the monero-wallet-rpc instance can't detect the lock transaction and therefore can't spend its outputs.
|
@AlaattinK02 / @rishflab would you mind reopening this issue? I think this bug is still an issue |
I just had a look and can confirm that it can be a problem if Bob goes offline before the Bitcoin are confirmed. (Because then the height might be incorrect). I will see to put another PR up that moves this to an earlier point. This is somewhat less efficient when generating the wallet, but it should not be noticeable from a UX point of view. |
see: #881 Sidenote: The CLI was designed under the impression that one would wait for confirmations (and resume in case of failures) and not just turn it off. But that is not immediately obvious, so the above fix should add more resilience - but is a bit less efficient when generating the monero wallet, because we will scan more blocks. Should be negligible though. |
Describe the bug
Swap is on "btc is redeemed" state but i cant resume the transaction and get my funds back, when i try to it says:
Lost/trapped Funds
Yes
Debug logs
Platform (please complete the following information):
The text was updated successfully, but these errors were encountered: