mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
ld: Fix a log message assuming that the channel->scid
was set
This is no longer true after we introduce `zeroconf`, so use the alias local alias instead if not set. Signed-off-by: Christian Decker <@cdecker>
This commit is contained in:
parent
ab1ca7f159
commit
65549a2931
2 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue