From 4d04e50a65f45da4cd1fdde93751f8d08e3a44e4 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Tue, 15 Oct 2024 11:52:50 +0200 Subject: [PATCH] Fix bug, continue to next prd if unsuccessfully parsing pcd --- src/api.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/api.rs b/src/api.rs index 943ff2f..8c518b3 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1435,7 +1435,12 @@ pub fn get_update_proposals(process_outpoint: String) -> ApiResult> let mut update_states = false; for proposal in update_proposals { // Is there a state that matches this proposal? If not, let's add it - let pcd = Value::from_str(&proposal.payload)?; + debug!("Trying proposal {:#?}", proposal); + let pcd = match Value::from_str(&proposal.payload) { + Ok(value) => value, + Err(e) => continue + }; + debug!("found pcd {:#?}", pcd); let pcd_hash = AnkPcdHash::from_value(&pcd); // We look for a pending state for the exact same state as the one in the proposal if let None = relevant_process.get_latest_concurrent_states()