mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
lightningd: don't crash listpeers if we're opening DF channel.
We call out to connectd to activate the peer, and while we do that, channel->owner is NULL. A better pattern would be to set up the unsaved channel once connectd has given us the peer, but this works for now. Fixes: #5204 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
f6e7d0c5dc
commit
98f64fb623
@ -120,6 +120,11 @@ void json_add_unsaved_channel(struct json_stream *response,
|
||||
if (!channel->open_attempt)
|
||||
return;
|
||||
|
||||
/* If we're calling out to connectd to activate peer to start the
|
||||
* process, this will be NULL */
|
||||
if (!channel->owner)
|
||||
return;
|
||||
|
||||
oa = channel->open_attempt;
|
||||
|
||||
json_object_start(response, NULL);
|
||||
|
@ -1798,7 +1798,7 @@ def test_multifunding_simple(node_factory, bitcoind):
|
||||
l1.rpc.pay(inv)
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
@pytest.mark.openchannel('v1')
|
||||
@pytest.mark.openchannel('v2')
|
||||
def test_listpeers_crash(node_factory, bitcoind, executor):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user