You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During testsing, we check that a `ChannelMonitor` will round-trip
through serialization exactly. However, we recently added a fix to
change a value in `PackageTemplate` on reload to fix some issues in
the field in 0.1. This can cause the round-trip tests to fail as a
field is modified during read.
We fix it here by simply exempting the field from the equality test
in the condition where it would be updated on read.
We also make the `ChannelMonitor` `PartialEq` trait implementation
non-public as weird workarounds like this make clear that such a
comparison is a britle API at best.
Backport of a8ec966
Resolved `use` and `rustfmt` conflicts in:
* lightning/src/chain/channelmonitor.rs
In the upstream version of this commit, the `PartialEq`
implementation for `ChannelMonitor` was made test-only however to
avoid breaking a public API we do not do so here. However, the
changes to `PartialEq` for `PackageTemplate` are `test`-only, so
it shouldn't result in any behavioral change (not that the marginal
`PartialEq` changes are likely to impact downstream crates in any
case).
0 commit comments