Unset upfront_shutdown_script using bit clearing

The test_upfront_shutdown_script functional test clears this feature
flag. However, the method used to clear the flag is implemented by bit
toggling. Thus, if the flag is not set the method would actually set it.
Implement the method using bit clearing instead.
This commit is contained in:
Jeffrey Czyz 2020-04-10 11:36:47 -07:00
parent 12e2a81e1d
commit c1db30d5be

View file

@ -272,7 +272,7 @@ impl<T: sealed::UpfrontShutdownScript> Features<T> {
} }
#[cfg(test)] #[cfg(test)]
pub(crate) fn unset_upfront_shutdown_script(&mut self) { pub(crate) fn unset_upfront_shutdown_script(&mut self) {
self.flags[0] ^= 1 << 5; self.flags[0] &= !(1 << 5);
} }
} }