diff --git a/plugins/libplugin.c b/plugins/libplugin.c index a2acab60485c..5b8cdfde63b3 100644 --- a/plugins/libplugin.c +++ b/plugins/libplugin.c @@ -2113,11 +2113,6 @@ static struct listpeers_channel *json_to_listpeers_channel(const tal_t *ctx, chan = tal(ctx, struct listpeers_channel); - json_to_node_id(buffer, idtok, &chan->id); - json_to_bool(buffer, conntok, &chan->connected); - json_to_bool(buffer, privtok, &chan->private); - chan->state = json_strdup(chan, buffer, statetok); - json_to_txid(buffer, ftxidtok, &chan->funding_txid); if (scidtok != NULL) { assert(dirtok != NULL); chan->scid = tal(chan, struct short_channel_id); @@ -2154,6 +2149,12 @@ static struct listpeers_channel *json_to_listpeers_channel(const tal_t *ctx, if (!chan->scid && !chan->alias[LOCAL]) return tal_free(chan); + json_to_node_id(buffer, idtok, &chan->id); + json_to_bool(buffer, conntok, &chan->connected); + json_to_bool(buffer, privtok, &chan->private); + chan->state = json_strdup(chan, buffer, statetok); + json_to_txid(buffer, ftxidtok, &chan->funding_txid); + json_to_int(buffer, dirtok, &chan->direction); json_to_msat(buffer, tmsattok, &chan->total_msat); json_to_msat(buffer, smsattok, &chan->spendable_msat); diff --git a/tests/test_pay.py b/tests/test_pay.py index 48534202dc2e..188d0c87cc0c 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -5590,7 +5590,6 @@ def test_pay_partial_msat(node_factory, executor): l3pay.result(TIMEOUT) -@pytest.mark.xfail(strict=True) def test_pay_while_opening_channel(node_factory, bitcoind, executor): delay_plugin = {'plugin': os.path.join(os.getcwd(), 'tests/plugins/openchannel_hook_delay.py'),