Skip to content

Commit 447b5fa

Browse files
committed
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.
1 parent 8ca6cb7 commit 447b5fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/features.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl<T: sealed::UpfrontShutdownScript> Features<T> {
272272
}
273273
#[cfg(test)]
274274
pub(crate) fn unset_upfront_shutdown_script(&mut self) {
275-
self.flags[0] ^= 1 << 5;
275+
self.flags[0] &= !(1 << 5);
276276
}
277277
}
278278

0 commit comments

Comments
 (0)