mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-24 14:15:55 -04:00
Merge b4fbf41419
into dc6ba84bbb
This commit is contained in:
commit
e7815d6f35
1 changed files with 5 additions and 1 deletions
|
@ -342,6 +342,7 @@ async fn wait_for_confirmations<C: monero_rpc::wallet::MoneroWalletRpc<reqwest::
|
|||
wallet_name: String,
|
||||
) -> Result<(), InsufficientFunds> {
|
||||
let mut seen_confirmations = 0u64;
|
||||
let mut monero_rpc_retries = 0;
|
||||
|
||||
while seen_confirmations < conf_target {
|
||||
check_interval.tick().await; // tick() at the beginning of the loop so every `continue` tick()s as well
|
||||
|
@ -363,8 +364,11 @@ async fn wait_for_confirmations<C: monero_rpc::wallet::MoneroWalletRpc<reqwest::
|
|||
message,
|
||||
data,
|
||||
})) => {
|
||||
monero_rpc_retries += 1;
|
||||
tracing::debug!(message, ?data);
|
||||
tracing::warn!(%txid, message, "`monero-wallet-rpc` failed to fetch transaction, may need to be restarted");
|
||||
if monero_rpc_retries > 5 {
|
||||
tracing::warn!(%txid, message, "`monero-wallet-rpc` failed to fetch transaction, may need to be restarted");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// TODO: Implement this using a generic proxy for each function call once https://github.com/thomaseizinger/rust-jsonrpc-client/issues/47 is fixed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue