diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index 80d81745c..a9d74e6c9 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -660,6 +660,7 @@ static void forward_htlc(struct htlc_in *hin, struct lightningd *ld = hin->key.channel->peer->ld; struct channel *next; struct htlc_out *hout = NULL; + struct short_channel_id *altscid; /* This is a shortcut for specifying next peer; doesn't mean * the actual channel! */ @@ -687,10 +688,14 @@ static void forward_htlc(struct htlc_in *hin, channel->channel_info.their_config.htlc_minimum)) continue; + altscid = channel->scid != NULL ? channel->scid + : channel->alias[LOCAL]; + /* OK, it's better! */ log_debug(next->log, "Chose a better channel: %s", - type_to_string(tmpctx, struct short_channel_id, - channel->scid)); + type_to_string(tmpctx, + struct short_channel_id, + altscid)); next = channel; } } diff --git a/tests/test_opening.py b/tests/test_opening.py index edad2f181..abbdac365 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -1577,7 +1577,6 @@ def test_scid_alias_private(node_factory, bitcoind): l1.rpc.waitsendpay(inv['payment_hash']) -@pytest.mark.xfail("Reproducing a crash", strict=True) def test_zeroconf_multichan_forward(node_factory): """The freedom to choose the forward channel bytes us when it is 0conf