Fix bug, continue to next prd if unsuccessfully parsing pcd

This commit is contained in:
NicolasCantu 2024-10-15 11:52:50 +02:00
parent 8b65463cd3
commit 4d04e50a65

View File

@ -1435,7 +1435,12 @@ pub fn get_update_proposals(process_outpoint: String) -> ApiResult<Vec<String>>
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()