gossip: Add local_channel_close message to disable channels upon close

This was failing some of our integration tests, i.e., the ones closing a channel
and not waiting for sigexchange. The remote node would often not be quick enough
to send us its disabling channel_update, and hence we'd still remember the
incoming direction. That could then be sent out as part of an invoice, and fail
subsequently. So just set both directions to be disabled and let the onchain
spend clean up once it happens.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2018-05-26 15:19:24 +02:00
committed by Rusty Russell
parent 573f1b58c8
commit 9982e24a1c
3 changed files with 34 additions and 0 deletions

View File

@@ -156,6 +156,7 @@ static unsigned gossip_msg(struct subd *gossip, const u8 *msg, const int *fds)
/* These are inter-daemon messages, not received by us */
case WIRE_GOSSIP_LOCAL_ADD_CHANNEL:
case WIRE_GOSSIP_LOCAL_CHANNEL_UPDATE:
case WIRE_GOSSIP_LOCAL_CHANNEL_CLOSE:
break;
case WIRE_GOSSIP_PEER_CONNECTED: