closingd: Tell closingd which chain we are working on

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2019-07-31 13:15:14 +02:00
committed by Rusty Russell
parent c5ac6c7b1f
commit 2537bd5afa
3 changed files with 4 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
#include <common/per_peer_state.h>
# 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,
1 #include <common/cryptomsg.h>
3 #include <common/per_peer_state.h>
4 # Begin! (passes peer fd, gossipd-client fd)
5 msgtype,closing_init,2001
6 msgdata,closing_init,chain_hash,chain_hash,
7 msgdata,closing_init,pps,per_peer_state,
8 msgdata,closing_init,funding_txid,bitcoin_txid,
9 msgdata,closing_init,funding_txout,u16,

View File

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

View File

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