[bug] No outpoint in process_commit_new_state
This commit is contained in:
parent
2da5bf7a71
commit
9a0746172f
@ -549,7 +549,7 @@ pub fn get_opreturn(transaction: String) -> ApiResult<String> {
|
|||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn process_commit_new_state(mut process: Process, state_id: String, new_tip: String) -> ApiResult<Process> {
|
pub fn process_commit_new_state(mut process: Process, state_id: String, new_tip: String) -> ApiResult<Process> {
|
||||||
let state_id_array: [u8; 32] = Vec::from_hex(&state_id)?.try_into().unwrap();
|
let state_id_array: [u8; 32] = Vec::from_hex(&state_id)?.try_into().unwrap();
|
||||||
let new_tip = OutPoint::from_str(&new_tip)?;
|
let new_tip = OutPoint::new(Txid::from_str(&new_tip)?, 0);
|
||||||
let new_state: ProcessState;
|
let new_state: ProcessState;
|
||||||
if let Ok(commited_state) = process.get_state_for_id(&state_id_array) {
|
if let Ok(commited_state) = process.get_state_for_id(&state_id_array) {
|
||||||
new_state = commited_state.clone();
|
new_state = commited_state.clone();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user