[bug] deadlock in commit
This commit is contained in:
parent
18da6da177
commit
7c634ae0ed
@ -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<OutPoint> {
|
||||
// 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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user