From d6f24e1c6a20d961128aa9c95367bd62aa8cb229 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Mon, 17 Oct 2022 09:40:35 +0200 Subject: [PATCH] bitcoind: don't return spent coins with unfetchable spending tx as spent It seems less bad to be able to check again at the next poll. --- src/bitcoin/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bitcoin/mod.rs b/src/bitcoin/mod.rs index 0682af9e..babb67e6 100644 --- a/src/bitcoin/mod.rs +++ b/src/bitcoin/mod.rs @@ -9,7 +9,7 @@ use d::LSBlockEntry; use std::collections::HashMap; use std::sync; -use miniscript::bitcoin::{self, hashes::Hash}; +use miniscript::bitcoin; /// Information about the best block in the chain #[derive(Debug, Clone, Eq, PartialEq, Copy)] @@ -139,10 +139,10 @@ impl BitcoinInterface for d::BitcoinD { } else { // TODO: better handling of this edge case. log::error!( - "Could not get spender of '{}'. Using a dummy spending txid.", + "Could not get spender of '{}'. Not reporting it as spending.", op ); - bitcoin::Txid::from_slice(&[0; 32][..]).unwrap() + continue; }; spent.push((*op, spending_txid));