Skip to content

Commit

Permalink
Merge pull request #255 from RGB-WG/fix/238
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky authored Aug 13, 2024
2 parents e3847bf + c6358c2 commit 91bf027
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/contract/assignments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,10 @@ pub struct OutputAssignment<State: KnownState> {

impl<State: KnownState> PartialEq for OutputAssignment<State> {
fn eq(&self, other: &Self) -> bool {
if self.opout == other.opout &&
(self.seal != other.seal ||
self.witness != other.witness ||
self.state != other.state)
{
panic!(
"RGB was provided with an updated operation using different witness transaction. \
This may happen for instance when some ephemeral state (like a commitment or \
HTLC transactions in the lightning channels) is added to the stash.\nThis error \
means the software uses RGB stash in an invalid way and has business logic bug \
which has to be fixed.\nOperation in stash: {:?}\nNew operation: {:?}\n",
self, other
)
}
// We ignore difference in witness transactions, state and seal definitions here
// 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
}
}
Expand Down

0 comments on commit 91bf027

Please sign in to comment.