Skip to content

Commit

Permalink
Handle failure of getmempoolentry without aborting
Browse files Browse the repository at this point in the history
Previously if the call to getmempoolentry failed then the whole
taker coinswap run would fail, clearly an overreaction
  • Loading branch information
chris-belcher committed Feb 3, 2022
1 parent 87f6e3f commit 1c65421
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/taker_protocol.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 1c65421

Please sign in to comment.