Skip to content

Commit 6d6511b

Browse files
committed
f - update comments and remove redundant check
1 parent 499165a commit 6d6511b

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

fuzz/src/full_stack.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,13 +1180,13 @@ fn two_peer_forwarding_seed() -> Vec<u8> {
11801180

11811181
// inbound read from peer id 1 of len 18
11821182
ext_from_hex("030112", &mut test);
1183-
// message header indicating message length 274
1183+
// message header indicating message length 278
11841184
ext_from_hex("0116 01000000000000000000000000000000", &mut test);
11851185
// inbound read from peer id 1 of len 255
11861186
ext_from_hex("0301ff", &mut test);
11871187
// beginning of accept_channel
11881188
ext_from_hex("0021 0000000000000000000000000000000000000000000000000000000000000e12 0000000000000162 00000000004c4b40 00000000000003e8 00000000000003e8 00000002 03f0 0005 030000000000000000000000000000000000000000000000000000000000000100 030000000000000000000000000000000000000000000000000000000000000200 030000000000000000000000000000000000000000000000000000000000000300 030000000000000000000000000000000000000000000000000000000000000400 030000000000000000000000000000000000000000000000000000000000000500 02660000000000000000000000000000", &mut test);
1189-
// inbound read from peer id 1 of len 35
1189+
// inbound read from peer id 1 of len 39
11901190
ext_from_hex("030127", &mut test);
11911191
// rest of accept_channel and mac
11921192
ext_from_hex(

lightning/src/ln/channel.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11982,12 +11982,6 @@ where
1198211982
let holder_selected_channel_reserve_satoshis = get_v2_channel_reserve_satoshis(
1198311983
channel_value_satoshis, MIN_CHAN_DUST_LIMIT_SATOSHIS);
1198411984

11985-
// First check the channel type is known, failing before we do anything else if we don't
11986-
// support this channel type.
11987-
if msg.common_fields.channel_type.is_none() {
11988-
return Err(ChannelError::close(format!("Rejecting V2 channel {} missing channel_type",
11989-
msg.common_fields.temporary_channel_id)))
11990-
}
1199111985
let channel_type = channel_type_from_open_channel(&msg.common_fields, our_supported_features)?;
1199211986

1199311987
let counterparty_pubkeys = ChannelPublicKeys {

lightning/src/ln/msgs.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,6 @@ pub struct CommonOpenChannelFields {
243243
/// collaboratively close
244244
pub shutdown_scriptpubkey: Option<ScriptBuf>,
245245
/// The channel type that this channel will represent
246-
///
247-
/// If this is `None`, we derive the channel type from the intersection of our
248-
/// feature bits with our counterparty's feature bits from the [`Init`] message.
249246
pub channel_type: Option<ChannelTypeFeatures>,
250247
}
251248

@@ -356,9 +353,7 @@ pub struct CommonAcceptChannelFields {
356353
/// Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
357354
/// collaboratively close
358355
pub shutdown_scriptpubkey: Option<ScriptBuf>,
359-
/// The channel type that this channel will represent. If none is set, we derive the channel
360-
/// type from the intersection of our feature bits with our counterparty's feature bits from
361-
/// the Init message.
356+
/// The channel type that this channel will represent
362357
///
363358
/// This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s
364359
/// [`CommonOpenChannelFields::channel_type`].

0 commit comments

Comments
 (0)