commands: don't query unconfirmed coins when creating recovery tx

They would be discarded immediately in the filter below.
This commit is contained in:
Antoine Poinsot 2023-11-30 14:19:20 +01:00
parent c63a120794
commit 990b153107
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -989,7 +989,7 @@ impl DaemonControl {
timelock.unwrap_or_else(|| self.config.main_descriptor.first_timelock_value());
let height_delta: i32 = timelock.try_into().expect("Must fit, it's a u16");
let sweepable_coins: Vec<_> = db_conn
.coins(&[CoinStatus::Unconfirmed, CoinStatus::Confirmed], &[])
.coins(&[CoinStatus::Confirmed], &[])
.into_values()
.filter_map(|c| {
// We are interested in coins available at the *next* block