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.
This commit is contained in:
Antoine Poinsot 2022-10-17 09:40:35 +02:00
parent 99ab0d7add
commit d6f24e1c6a
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -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));