From ea4308ce5260a50a5d64c99860bac1b7cf3d4fec Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 12 Oct 2018 16:31:40 +1030 Subject: [PATCH] channeld: allow WIRE_ANNOUNCEMENT_SIGNATURES before funding_locked. LND does this, and we get upset with it. I had assumed we would only do this after funding_locked (since we don't consider the channel shortid stable until that point), but TBH 6 confirms is probably enough. Fixes: #1985 Signed-off-by: Rusty Russell --- channeld/channeld.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channeld/channeld.c b/channeld/channeld.c index 8efcbf824..0e082539f 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -1630,7 +1630,9 @@ static void peer_in(struct peer *peer, const u8 *msg) if (!peer->funding_locked[REMOTE]) { if (type != WIRE_FUNDING_LOCKED && type != WIRE_PONG - && type != WIRE_SHUTDOWN) { + && type != WIRE_SHUTDOWN + /* lnd sends this early; it's harmless. */ + && type != WIRE_ANNOUNCEMENT_SIGNATURES) { peer_failed(&peer->cs, &peer->channel_id, "%s (%u) before funding locked",