[bug] fix broken validation_tokens deduplication
This commit is contained in:
parent
afd64e2172
commit
a169c99366
@ -306,8 +306,13 @@ fn process_validation(
|
||||
.validation_tokens
|
||||
.extend(commit_msg.validation_tokens.iter());
|
||||
|
||||
state_to_update.validation_tokens.sort_unstable();
|
||||
state_to_update.validation_tokens.dedup();
|
||||
// Sort by public key to group validations by signer
|
||||
state_to_update.validation_tokens.sort_unstable_by_key(|proof| proof.get_key());
|
||||
|
||||
// Remove duplicates where same key validates same message
|
||||
state_to_update.validation_tokens.dedup_by(|a, b| {
|
||||
a.get_key() == b.get_key() && a.get_message() == b.get_message()
|
||||
});
|
||||
}
|
||||
|
||||
let state_to_validate = updated_process.get_state_for_id(&new_state_id)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user