From 1c6542121a45bc58704092f7f8b0a1046515ca51 Mon Sep 17 00:00:00 2001 From: chris-belcher Date: Thu, 3 Feb 2022 19:04:40 +0000 Subject: [PATCH] Handle failure of getmempoolentry without aborting Previously if the call to getmempoolentry failed then the whole taker coinswap run would fail, clearly an overreaction --- src/taker_protocol.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/taker_protocol.rs b/src/taker_protocol.rs index 62e45976..7b8aebed 100644 --- a/src/taker_protocol.rs +++ b/src/taker_protocol.rs @@ -800,7 +800,10 @@ async fn wait_for_funding_tx_confirmation( if !txids_seen_once.contains(txid) { txids_seen_once.insert(*txid); if gettx.info.confirmations == 0 { - let mempool_tx = rpc.get_mempool_entry(txid)?; + let mempool_tx = match rpc.get_mempool_entry(txid) { + Ok(m) => m, + Err(_e) => continue, + }; log::info!( "Seen in mempool: {} [{:.1} sat/vbyte]", txid,