Unset upfront_shutdown_script using bit clearing
[rust-lightning] / lightning / src / ln / features.rs
index 5eb1bd909e80585408f6ce24853502e696cbc25f..1e52268ac351dffb67290ff073ef97d7c3953980 100644 (file)
@@ -272,7 +272,7 @@ impl<T: sealed::UpfrontShutdownScript> Features<T> {
        }
        #[cfg(test)]
        pub(crate) fn unset_upfront_shutdown_script(&mut self) {
-               self.flags[0] ^= 1 << 5;
+               self.flags[0] &= !(1 << 5);
        }
 }