Skip to content

Commit 6778f32

Browse files
committed
openingd: make channel-type rejection message clearer.
For example, lnprototest got the error 'You gave bad parameters: Did not support channel_type ' which doesn't make it clear that it's rejecting the empty channel type. Signed-off-by: Rusty Russell <[email protected]>
1 parent b805899 commit 6778f32

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

openingd/dualopend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2433,7 +2433,7 @@ static void accepter_start(struct state *state, const u8 *oc2_msg)
24332433
state->channel_type = channel_type_from(state, open_tlv->channel_type);
24342434
} else {
24352435
negotiation_failed(state,
2436-
"Did not support channel_type %s",
2436+
"Did not support channel_type [%s]",
24372437
fmt_featurebits(tmpctx,
24382438
open_tlv->channel_type));
24392439
return;

openingd/openingd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ static u8 *fundee_channel(struct state *state, const u8 *open_channel_msg)
974974
state->channel_type = channel_type_from(state, open_tlvs->channel_type);
975975
} else {
976976
negotiation_failed(state,
977-
"Did not support channel_type %s",
977+
"Did not support channel_type [%s]",
978978
fmt_featurebits(tmpctx,
979979
open_tlvs->channel_type));
980980
return NULL;

tests/test_opening.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,7 @@ def test_opening_explicit_channel_type(node_factory, bitcoind):
26542654
l1.start()
26552655
l1.connect(l2)
26562656

2657-
with pytest.raises(RpcError, match=r'They sent ERROR .*: You gave bad parameters: Did not support channel_type 12,20'):
2657+
with pytest.raises(RpcError, match=r'They sent ERROR .*: You gave bad parameters: Did not support channel_type \[12,20\]'):
26582658
l1.rpc.fundchannel_start(l2.info['id'], FUNDAMOUNT, channel_type=[STATIC_REMOTEKEY, ANCHORS_OLD])
26592659

26602660
# Now make l2 accept it!

0 commit comments

Comments
 (0)