diff --git a/src/commit.rs b/src/commit.rs index ef6a4f7..7ed0278 100644 --- a/src/commit.rs +++ b/src/commit.rs @@ -13,7 +13,7 @@ use sdk_common::sp_client::bitcoin::{Amount, Transaction, OutPoint}; use sdk_common::process::{Process, ProcessState, CACHEDPROCESSES}; use serde_json::json; -use crate::{lock_freezed_utxos, MutexExt, DAEMON, WALLET}; +use crate::{lock_freezed_utxos, MutexExt, DAEMON, LISTS, WALLET}; pub(crate) fn handle_commit_request(commit_msg: CommitMessage) -> Result { // Attempt to process the initial transaction or reference @@ -193,7 +193,7 @@ fn commit_new_transaction( .checked_div(1000) .unwrap(); - let freezed_utxos = lock_freezed_utxos()?; + let mut freezed_utxos = lock_freezed_utxos()?; let psbt = create_transaction( vec![mandatory_input], @@ -211,7 +211,7 @@ fn commit_new_transaction( let txid = daemon.broadcast(&new_tx)?; let commited_in = OutPoint::new(txid, 0); - lock_freezed_utxos()?.insert(commited_in); + freezed_utxos.insert(commited_in); commitment.update_states_tip(commited_in)?; Ok(commited_in)