From 5b454c8158e4e988196f61db143eac70c7930fab Mon Sep 17 00:00:00 2001 From: Sosthene Date: Fri, 20 Jun 2025 10:41:08 +0200 Subject: [PATCH] Add mark_output_mined to SpWallet --- src/silentpayments.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/silentpayments.rs b/src/silentpayments.rs index 93dcb18..63e8706 100644 --- a/src/silentpayments.rs +++ b/src/silentpayments.rs @@ -68,6 +68,12 @@ impl SpWallet { self.last_scan = last_scan; } + pub fn mark_output_mined(&mut self, outpoint: &OutPoint, blk_hash: [u8; 32]) { + if let Some(output) = self.outputs.get_mut(outpoint) { + output.spend_status = OutputSpendStatus::Spent(blk_hash); + } + } + pub fn update_with_transaction(&mut self, tx: &Transaction, public_tweak: &PublicKey, height: u32) -> Result> { let receiver = &self.get_sp_client().sp_receiver; let p2tr_outs: Vec<(usize, &TxOut)> = tx