From 66248a460080cfb8a37cb8cffea12c530fd4e060 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Tue, 24 Jun 2025 15:07:01 +0200 Subject: [PATCH] [bug] fix improper mark_output_mined --- src/main.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3baa6e8..7188462 100644 --- a/src/main.rs +++ b/src/main.rs @@ -288,13 +288,7 @@ async fn handle_state_updates( let mut sp_wallet = WALLET.get().unwrap().lock_anyhow().unwrap(); // inputs first for outpoint in found_inputs { - if let Some(output) = sp_wallet.get_mut_outputs().get_mut(&outpoint) { - output.spend_status = - OutputSpendStatus::Mined(blkhash.as_raw_hash().to_byte_array()); - } else { - // We found an input that we don't have in our wallet, that shouldn't happen - error!("Spent unknown output: {:?}", outpoint); - } + sp_wallet.mark_output_mined(&outpoint, blkhash); } sp_wallet.get_mut_outputs().extend(found_outputs); sp_wallet.set_last_scan(blkheight.to_consensus_u32());