Skip to content

Commit

Permalink
contract: fix witness filter checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jul 29, 2024
1 parent b7a6648 commit a2ff52c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/contract/assignments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ impl<State: KnownState> OutputAssignment<State> {
pub fn check_witness(&self, filter: &HashMap<XWitnessId, WitnessOrd>) -> bool {
match self.witness {
AssignmentWitness::Absent => true,
AssignmentWitness::Present(witness_id) => filter.contains_key(&witness_id),
AssignmentWitness::Present(witness_id) => {
!matches!(filter.get(&witness_id), None | Some(WitnessOrd::Archived))
}
}
}
}
Expand Down

0 comments on commit a2ff52c

Please sign in to comment.