Skip to content

Commit 1279a86

Browse files
committed
f - reorder test
1 parent ec4adec commit 1279a86

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3000,22 +3000,10 @@ mod tests {
30003000
Ok(Some(gross_change - fees)),
30013001
);
30023002

3003-
// Larger fee, smaller change
3004-
let context = FundingNegotiationContext {
3005-
is_initiator: true,
3006-
funding_feerate_sat_per_1000_weight: funding_feerate_sat_per_1000_weight * 3,
3007-
..context
3008-
};
3009-
assert_eq!(
3010-
calculate_change_output_value(&context, None, &ScriptBuf::new(), &outputs, 300),
3011-
Ok(Some(4060)),
3012-
);
3013-
30143003
// Insufficient inputs, no leftover
30153004
let context = FundingNegotiationContext {
30163005
is_initiator: false,
30173006
our_funding_satoshis: 130_000,
3018-
funding_feerate_sat_per_1000_weight: funding_feerate_sat_per_1000_weight,
30193007
..context
30203008
};
30213009
assert_eq!(
@@ -3044,5 +3032,17 @@ mod tests {
30443032
calculate_change_output_value(&context, None, &ScriptBuf::new(), &outputs, 100),
30453033
Ok(Some(262)),
30463034
);
3035+
3036+
// Larger fee, smaller change
3037+
let context = FundingNegotiationContext {
3038+
is_initiator: true,
3039+
our_funding_satoshis: our_contributed,
3040+
funding_feerate_sat_per_1000_weight: funding_feerate_sat_per_1000_weight * 3,
3041+
..context
3042+
};
3043+
assert_eq!(
3044+
calculate_change_output_value(&context, None, &ScriptBuf::new(), &outputs, 300),
3045+
Ok(Some(4060)),
3046+
);
30473047
}
30483048
}

0 commit comments

Comments
 (0)