From 7e4af68cba13c90a6693c24e870e922417f9fc18 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Wed, 3 Aug 2022 13:56:04 +0200 Subject: [PATCH] feat: add debugging info for failed to fetch transaction Add the jsonrpc error message and data to tracing calls to try debug #1061 "monero-wallet-rpc failed to fetch transaction" --- swap/src/monero/wallet.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/swap/src/monero/wallet.rs b/swap/src/monero/wallet.rs index 859b451b..0d3d3389 100644 --- a/swap/src/monero/wallet.rs +++ b/swap/src/monero/wallet.rs @@ -314,8 +314,13 @@ async fn wait_for_confirmations proof, - Err(jsonrpc::Error::JsonRpc(jsonrpc::JsonRpcError { code: -1, .. })) => { - tracing::warn!(%txid, "`monero-wallet-rpc` failed to fetch transaction, may need to be restarted"); + Err(jsonrpc::Error::JsonRpc(jsonrpc::JsonRpcError { + code: -1, + message, + data, + })) => { + tracing::debug!(message, ?data); + 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.