xmr-btc-swap/swap
Thomas Eizinger 25b123d6ed
Load wallet in monero-wallet-rpc on demand if necessary
Previously, we relied on the wallet in the `monero-wallet-rpc` daemon
to be loaded as we do on startup. As a consequence of this expectation,
restarting `monero-wallet-rpc` to fix bugs like #652 resulted in the
ASB no longer operating correctly.

To fix this, we now load the wallet on-demand in case the daemon responds
with the error code -13.

Ideally, we would implement this behaviour generically using the proxy
pattern on the `MoneroWalletRpc` trait. Unfortunately, when attempting
to do so we uncover a limitation in the design of `jsonrpc_client`.
This limitation is tracked in https://github.com/thomaseizinger/rust-jsonrpc-client/issues/47.
Once fixed, we can implement this logic in a more robust way that is not
tied to the `check_tx_key` RPC call but applies to any RPC call automatically.
2021-08-27 09:39:29 +10:00
..
proptest-regressions/bitcoin Add proptest for max_giveable and signing PSBT 2021-08-12 18:42:00 +10:00
src Load wallet in monero-wallet-rpc on demand if necessary 2021-08-27 09:39:29 +10:00
tests Add a mandatory --change-address parameter to buy-xmr 2021-07-06 20:07:53 +10:00
build.rs Provide a commit-specific version output 2021-07-07 17:55:13 +10:00
Cargo.toml Merge #631 #641 2021-08-20 07:56:38 +00:00