From 8854bc8ae6d0fab569777f6ec96f27e170cfc6c8 Mon Sep 17 00:00:00 2001 From: lisa neigut Date: Wed, 28 Aug 2019 18:09:10 -0500 Subject: [PATCH] fundchannel_start: don't return null message When the peer sends back an error, we return null, but sending a NULL message back to lightningd causes a parsing error on their side. negotiation_failed already calls back the peer, all we need to do here is exit. --- openingd/openingd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openingd/openingd.c b/openingd/openingd.c index c9790fe58..8c076add8 100644 --- a/openingd/openingd.c +++ b/openingd/openingd.c @@ -1630,7 +1630,8 @@ static u8 *handle_master_in(struct state *state) msg = funder_channel_start(state, channel_flags); /* We want to keep openingd alive, since we're not done yet */ - wire_sync_write(REQ_FD, take(msg)); + if (msg) + wire_sync_write(REQ_FD, take(msg)); return NULL; case WIRE_OPENING_FUNDER_COMPLETE: if (!fromwire_opening_funder_complete(msg,