File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -13190,6 +13190,21 @@ mod tests {
13190
13190
do_test_supports_channel_type(config, expected_channel_type)
13191
13191
}
13192
13192
13193
+ #[test]
13194
+ fn test_supports_zero_fee_commitments_and_htlc_tx_fee() {
13195
+ // Tests that if both sides support and negotiate `anchors_zero_fee_commitments` and
13196
+ // `anchors_zero_fee_htlc_tx`, the resulting `channel_type` is
13197
+ // `anchors_zero_fee_commitments`.
13198
+ let mut config = UserConfig::default();
13199
+ config.channel_handshake_config.negotiate_anchors_zero_fee_htlc_tx = true;
13200
+ config.channel_handshake_config.negotiate_anchor_zero_fee_commitments = true;
13201
+
13202
+ let mut expected_channel_type = ChannelTypeFeatures::empty();
13203
+ expected_channel_type.set_anchor_zero_fee_commitments_required();
13204
+
13205
+ do_test_supports_channel_type(config, expected_channel_type)
13206
+ }
13207
+
13193
13208
fn do_test_supports_channel_type(config: UserConfig, expected_channel_type: ChannelTypeFeatures) {
13194
13209
let secp_ctx = Secp256k1::new();
13195
13210
let fee_estimator = LowerBoundedFeeEstimator::new(&TestFeeEstimator{fee_est: 15000});
You can’t perform that action at this time.
0 commit comments