]> git.bitcoin.ninja Git - rust-lightning/commit
Implement `PartialEq` for `ChannelMonitor`
authorMatt Corallo <git@bluematt.me>
Thu, 26 Jan 2023 02:23:08 +0000 (02:23 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 26 Jan 2023 02:23:08 +0000 (02:23 +0000)
commitd9dfc16e4af43240fe419099ba7e62be6c852455
tree7be562a7657c1cf9bdaefc8823c9a70274d6fbcd
parentb536d01702bf126f97470a48a6be4f3c97057848
Implement `PartialEq` for `ChannelMonitor`

It turns out `#[derive(PartialEq)]` will automatically bound the
`PartialEq` implementation by any bounds on the struct also being
`PartialEq`. This means to use an auto-derived `ChannelMonitor`
`PartialEq` the `EcdsaSigner` used must also be `PartialEq`, but
for the use-cases we have today for a `ChannelMonitor` `PartialEq`
it doesn't really matter - we use it internally in tests and
downstream users wanted similar test-only usage.

Fixes #1912.
lightning/src/chain/channelmonitor.rs
lightning/src/chain/onchaintx.rs
lightning/src/util/enforcing_trait_impls.rs