From 2537bd5afaddc52c9a44c8c83c2bf9c9843ffa13 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 31 Jul 2019 13:15:14 +0200 Subject: [PATCH] closingd: Tell closingd which chain we are working on Signed-off-by: Christian Decker --- closingd/closing_wire.csv | 1 + closingd/closingd.c | 2 ++ lightningd/closing_control.c | 1 + 3 files changed, 4 insertions(+) diff --git a/closingd/closing_wire.csv b/closingd/closing_wire.csv index a85cee41e..fece9bf35 100644 --- a/closingd/closing_wire.csv +++ b/closingd/closing_wire.csv @@ -3,6 +3,7 @@ #include # Begin! (passes peer fd, gossipd-client fd) msgtype,closing_init,2001 +msgdata,closing_init,chain_hash,chain_hash, msgdata,closing_init,pps,per_peer_state, msgdata,closing_init,funding_txid,bitcoin_txid, msgdata,closing_init,funding_txout,u16, diff --git a/closingd/closingd.c b/closingd/closingd.c index 337ce44fc..a2b812c5f 100644 --- a/closingd/closingd.c +++ b/closingd/closingd.c @@ -550,6 +550,7 @@ int main(int argc, char *argv[]) enum side whose_turn; u8 *channel_reestablish; struct secret last_remote_per_commit_secret; + struct bitcoin_blkid chain_hash; subdaemon_setup(argc, argv); @@ -557,6 +558,7 @@ int main(int argc, char *argv[]) msg = wire_sync_read(tmpctx, REQ_FD); if (!fromwire_closing_init(ctx, msg, + &chain_hash, &pps, &funding_txid, &funding_txout, &funding, diff --git a/lightningd/closing_control.c b/lightningd/closing_control.c index 0429249ac..a19b3264a 100644 --- a/lightningd/closing_control.c +++ b/lightningd/closing_control.c @@ -264,6 +264,7 @@ void peer_start_closingd(struct channel *channel, return; } initmsg = towire_closing_init(tmpctx, + &get_chainparams(ld)->genesis_blockhash, pps, &channel->funding_txid, channel->funding_outnum,