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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-10-12 16:31:40 +10:30
parent dbb9b0c077
commit ea4308ce52
1 changed files with 3 additions and 1 deletions

View File

@ -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",