Skip to content

Commit

Permalink
Merge pull request #268 from RGB-WG/fix/267
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky authored Sep 4, 2024
2 parents 0205bb2 + 76669b3 commit 11f08e8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/contract/assignments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ impl<State: KnownState> PartialEq for OutputAssignment<State> {
// in order to support updates from the ephemeral state of the lightning
// channels. See <https://github.com/RGB-WG/rgb-std/issues/238#issuecomment-2283822128>
// for the details.
self.opout == other.opout
let res = self.opout == other.opout && self.seal == other.seal;
#[cfg(debug_assertions)]
if res {
debug_assert_eq!(self.state, other.state);
}
res
}
}

Expand All @@ -84,7 +89,10 @@ impl<State: KnownState> Ord for OutputAssignment<State> {
if self == other {
return Ordering::Equal;
}
self.opout.cmp(&other.opout)
match self.opout.cmp(&other.opout) {
Ordering::Equal => self.seal.cmp(&other.seal),
ordering => ordering,
}
}
}

Expand Down

0 comments on commit 11f08e8

Please sign in to comment.