mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-03 12:06:17 -04:00
Refactor monero::Wallet::watch_for_transfer
to not use backoff
Instead, we use a regular loop and extract everything into a function that can be independently tested. `backoff` would be useful to retry the actual call to the node.
This commit is contained in:
parent
f0a2134f76
commit
82738b111e
4 changed files with 182 additions and 62 deletions
|
@ -359,6 +359,7 @@ where
|
|||
electrs_rpc_port,
|
||||
electrs_http_port,
|
||||
alice_seed,
|
||||
execution_params,
|
||||
)
|
||||
.await;
|
||||
|
||||
|
@ -381,6 +382,7 @@ where
|
|||
electrs_rpc_port,
|
||||
electrs_http_port,
|
||||
bob_seed,
|
||||
execution_params,
|
||||
)
|
||||
.await;
|
||||
|
||||
|
@ -590,6 +592,7 @@ async fn init_test_wallets(
|
|||
electrum_rpc_port: u16,
|
||||
electrum_http_port: u16,
|
||||
seed: Seed,
|
||||
execution_params: ExecutionParams,
|
||||
) -> (Arc<bitcoin::Wallet>, Arc<monero::Wallet>) {
|
||||
monero
|
||||
.init(vec![(name, starting_balances.xmr.as_piconero())])
|
||||
|
@ -600,6 +603,7 @@ async fn init_test_wallets(
|
|||
monero.wallet(name).unwrap().client(),
|
||||
monero::Network::default(),
|
||||
name.to_string(),
|
||||
execution_params,
|
||||
);
|
||||
|
||||
let electrum_rpc_url = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue