From 8d7a6c740020a2f2862b7ffe22b1c2577ba683d4 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Sun, 12 Jan 2025 14:11:18 +0100 Subject: [PATCH] Load freezed utxos at startup --- src/main.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.rs b/src/main.rs index d60d40a..f76a0b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -433,6 +433,17 @@ async fn main() -> Result<()> { } }; + { + let utxo_to_freeze: HashSet = cached_processes.iter() + .map(|(_, process)| { + process.get_last_unspent_outpoint().unwrap() + }) + .collect(); + + let mut freezed_utxos = lock_freezed_utxos()?; + *freezed_utxos = utxo_to_freeze; + } + let our_sp_address = sp_wallet.get_client().get_receiving_address(); log::info!(