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 {
1319013190 do_test_supports_channel_type(config, expected_channel_type)
1319113191 }
1319213192
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+
1319313208 fn do_test_supports_channel_type(config: UserConfig, expected_channel_type: ChannelTypeFeatures) {
1319413209 let secp_ctx = Secp256k1::new();
1319513210 let fee_estimator = LowerBoundedFeeEstimator::new(&TestFeeEstimator{fee_est: 15000});
You can’t perform that action at this time.
0 commit comments