Skip to content

Commit 32b1264

Browse files
committed
f! simplify
1 parent 710c7e2 commit 32b1264

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

lightning/src/chain/package.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -652,15 +652,17 @@ impl PackageTemplate {
652652
// another output type, we'll likely end up with an incorrect transaction locktime since
653653
// the counterparty has included it in its HTLC signature. This should never happen unless
654654
// we decide to aggregate outputs across different channel commitments.
655-
#[cfg(debug_assertions)] if self.inputs.iter().find(|(_, outp)|
656-
if let PackageSolvingData::HolderHTLCOutput(outp) = outp {
657-
outp.preimage.is_some()
658-
} else {
659-
false
660-
}
661-
).is_some() {
662-
debug_assert_eq!(timelock, 0);
663-
};
655+
#[cfg(debug_assertions)] {
656+
if self.inputs.iter().any(|(_, outp)|
657+
if let PackageSolvingData::HolderHTLCOutput(outp) = outp {
658+
outp.preimage.is_some()
659+
} else {
660+
false
661+
}
662+
) {
663+
debug_assert_eq!(timelock, 0);
664+
};
665+
}
664666
timelock
665667
}
666668
pub(crate) fn package_weight(&self, destination_script: &Script) -> usize {

0 commit comments

Comments
 (0)