Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iignore the difference in state and seals of output assignments #255

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading