Fix bug, continue to next prd if unsuccessfully parsing pcd
This commit is contained in:
parent
8b65463cd3
commit
4d04e50a65
@ -1435,7 +1435,12 @@ pub fn get_update_proposals(process_outpoint: String) -> ApiResult<Vec<String>>
|
|||||||
let mut update_states = false;
|
let mut update_states = false;
|
||||||
for proposal in update_proposals {
|
for proposal in update_proposals {
|
||||||
// Is there a state that matches this proposal? If not, let's add it
|
// 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);
|
let pcd_hash = AnkPcdHash::from_value(&pcd);
|
||||||
// We look for a pending state for the exact same state as the one in the proposal
|
// 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()
|
if let None = relevant_process.get_latest_concurrent_states()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user