You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xmr-btc-swap/swap/src
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.
3 years ago
..
asb Move "Lost connection" log line from WARN to Debug 3 years ago
bin Merge #618 3 years ago
bitcoin Upgrade to bdk 0.10 3 years ago
cli Instruct `Ping` to keep the connection alive 3 years ago
database Add a mandatory `--change-address` parameter to `buy-xmr` 3 years ago
monero Load wallet in `monero-wallet-rpc` on demand if necessary 3 years ago
network Remove empty modules 3 years ago
protocol Utilize tracing's fields more 3 years ago
asb.rs Add isolated test for `list_sellers` function 3 years ago
bitcoin.rs Introduce WalletBuilder for creating test instances of wallet 3 years ago
cli.rs Include unreachable nodes in table output 3 years ago
database.rs Store Monero receive address in database and load it on resume 3 years ago
env.rs ASB aborts if CLI does not lock BTC 3 years ago
fs.rs Improve logging by adding details as fields instead of into the msg. 3 years ago
kraken.rs Make price ticker ws url configurable 3 years ago
lib.rs Ensure the size of our locking script never changes 3 years ago
libp2p_ext.rs Merge `--seller-addr` and `--seller-peer-id` into `--seller` parameter 3 years ago
monero.rs `swap_setup` instead of `spot_price` and `execution_setup` 3 years ago
monero_ext.rs Upgrade to bdk 4.0 3 years ago
network.rs Remove empty modules 3 years ago
proptest.rs Add proptest for max_giveable and signing PSBT 3 years ago
protocol.rs Dynamically chose fee for TxCancel. 3 years ago
seed.rs Tidy up log messages across the codebase 3 years ago
tor.rs Make use of torut's errors implementing `std::error::Error` 3 years ago
tracing_ext.rs Make `capture_logs` available for the whole crate 3 years ago