@@ -268,28 +268,6 @@ static void set_remote_upfront_shutdown(struct state *state,
268
268
peer_failed_err (state -> pps , & state -> channel_id , "%s" , err );
269
269
}
270
270
271
- /* Since we can't send OPT_SCID_ALIAS due to compat issues, intuit whether
272
- * we really actually want it anyway, we just can't say that. */
273
- static bool intuit_scid_alias_type (struct state * state , u8 channel_flags )
274
- {
275
- /* Don't need to intuit if actually set */
276
- if (channel_type_has (state -> channel_type , OPT_SCID_ALIAS ))
277
- return false;
278
-
279
- /* Modern peer: no intuit hacks necessary. */
280
- if (channel_type_has (state -> channel_type , OPT_ANCHORS_ZERO_FEE_HTLC_TX ))
281
- return false;
282
-
283
- /* Public channel: don't want OPT_SCID_ALIAS which means "only use
284
- * alias". */
285
- if (channel_flags & CHANNEL_FLAGS_ANNOUNCE_CHANNEL )
286
- return false;
287
-
288
- /* If we both support it, presumably we want it? */
289
- return feature_negotiated (state -> our_features , state -> their_features ,
290
- OPT_SCID_ALIAS );
291
- }
292
-
293
271
/* We start the 'open a channel' negotation with the supplied peer, but
294
272
* stop when we get to the part where we need the funding txid */
295
273
static u8 * funder_channel_start (struct state * state , u8 channel_flags ,
@@ -431,34 +409,12 @@ static u8 *funder_channel_start(struct state *state, u8 channel_flags,
431
409
}
432
410
433
411
/* Simple case: caller specified, don't allow any variants */
434
- if (ctype ) {
435
- if (!featurebits_eq (accept_tlvs -> channel_type , state -> channel_type -> features )) {
436
- negotiation_failed (state ,
437
- "Return unoffered channel_type: %s" ,
438
- fmt_featurebits (tmpctx ,
439
- accept_tlvs -> channel_type ));
440
- return NULL ;
441
- }
442
- } else {
443
- /* Except that v23.05 could set OPT_SCID_ALIAS in reply! */
444
- struct channel_type * atype ;
445
-
446
- atype = channel_type_from (tmpctx , accept_tlvs -> channel_type );
447
- if (!channel_type_has (atype , OPT_ANCHORS_ZERO_FEE_HTLC_TX ))
448
- featurebits_unset (& atype -> features , OPT_SCID_ALIAS );
449
-
450
- if (!channel_type_eq (atype , state -> channel_type )) {
451
- negotiation_failed (state ,
452
- "Return unoffered channel_type: %s" ,
453
- fmt_featurebits (tmpctx ,
454
- accept_tlvs -> channel_type ));
455
- return NULL ;
456
- }
457
-
458
- /* If they "accepted" SCID_ALIAS, roll with it. */
459
- tal_free (state -> channel_type );
460
- state -> channel_type = channel_type_from (state ,
461
- accept_tlvs -> channel_type );
412
+ if (!featurebits_eq (accept_tlvs -> channel_type , state -> channel_type -> features )) {
413
+ negotiation_failed (state ,
414
+ "Return unoffered channel_type: %s" ,
415
+ fmt_featurebits (tmpctx ,
416
+ accept_tlvs -> channel_type ));
417
+ return NULL ;
462
418
}
463
419
464
420
/* BOLT #2:
@@ -564,11 +520,6 @@ static u8 *funder_channel_start(struct state *state, u8 channel_flags,
564
520
"Funding channel start: awaiting funding_txid with output to %s" ,
565
521
tal_hex (tmpctx , funding_output_script ));
566
522
567
- /* Backwards/cross compat hack */
568
- if (!ctype && intuit_scid_alias_type (state , channel_flags )) {
569
- channel_type_set_scid_alias (state -> channel_type );
570
- }
571
-
572
523
return towire_openingd_funder_start_reply (state ,
573
524
funding_output_script ,
574
525
feature_negotiated (
@@ -1163,11 +1114,6 @@ static u8 *fundee_channel(struct state *state, const u8 *open_channel_msg)
1163
1114
& state -> channel_id ),
1164
1115
fmt_channel_id (msg , & id_in ));
1165
1116
1166
- /* Backwards/cross compat hack */
1167
- if (intuit_scid_alias_type (state , channel_flags )) {
1168
- channel_type_set_scid_alias (state -> channel_type );
1169
- }
1170
-
1171
1117
/*~ Channel is ready; Report the channel parameters to the signer. */
1172
1118
msg = towire_hsmd_setup_channel (NULL ,
1173
1119
false, /* is_outbound */
0 commit comments