Skip to content

Commit 9017817

Browse files
committed
f add assertion the output is broadcastable
1 parent f0e72bc commit 9017817

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning/src/chain/package.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ impl PackageTemplate {
646646
{
647647
debug_assert!(self.malleability == PackageMalleability::Malleable, "The package output is fixed for non-malleable packages");
648648
let input_amounts = self.package_amount();
649+
assert!(dust_limit_sats as i64 > 0, "Output script must be broadcastable/have a 'real' dust limit.");
649650
// If old feerate is 0, first iteration of this claim, use normal fee calculation
650651
if self.feerate_previous != 0 {
651652
if let Some((new_fee, feerate)) = feerate_bump(predicted_weight, input_amounts, self.feerate_previous, fee_estimator, logger) {

0 commit comments

Comments
 (0)