]> git.bitcoin.ninja Git - rust-lightning/commit
Fix `Feature` eq + hash to ignore excess zero bytes
authorMatt Corallo <git@bluematt.me>
Sun, 24 Dec 2023 04:49:24 +0000 (04:49 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 24 Dec 2023 17:34:11 +0000 (17:34 +0000)
commitdf1f981627a9daa97b5e3b06bc90666206245309
treea9b6476207ec0fcea6935ad5897e68eadc92e5f6
parent4deb2631dccfe787c8bc1f34b44bcd6f77ad80cd
Fix `Feature` eq + hash to ignore excess zero bytes

If we get a `Feature` object which has excess zero bytes, we
shouldn't consider it a different `Feature` from another with the
same bits set, but no excess zero bytes. Here we fix both the
`Hash` and `PartialEq` implementation for `Features` to ignore
excess zero bytes.
lightning/src/ln/features.rs