Update process when commiting new state
This commit is contained in:
parent
23fcbe25eb
commit
75ac468a84
@ -279,7 +279,7 @@ fn commit_new_transaction(
|
||||
return Err(Error::msg(format!("Missing next commitment outpoint for process {}", updated_process.get_process_id()?)));
|
||||
};
|
||||
|
||||
let commitment_payload = Vec::from_hex(state_to_commit.state_id)?;
|
||||
let commitment_payload = Vec::from_hex(state_to_commit.state_id.clone())?;
|
||||
|
||||
let psbt = create_transaction(
|
||||
vec![mandatory_input],
|
||||
@ -297,6 +297,8 @@ fn commit_new_transaction(
|
||||
let commited_in = OutPoint::new(txid, 0);
|
||||
|
||||
freezed_utxos.insert(commited_in);
|
||||
updated_process.remove_all_concurrent_states()?;
|
||||
updated_process.insert_concurrent_state(state_to_commit)?;
|
||||
updated_process.update_states_tip(commited_in)?;
|
||||
|
||||
Ok(commited_in)
|
||||
|
Loading…
x
Reference in New Issue
Block a user