diff --git a/lightningd/channel/channel.c b/lightningd/channel/channel.c index 05c60b471..901f65342 100644 --- a/lightningd/channel/channel.c +++ b/lightningd/channel/channel.c @@ -83,6 +83,7 @@ struct peer { */ u64 htlc_id; + struct sha256_double chain_hash; struct channel_id channel_id; struct channel *channel; @@ -2004,6 +2005,7 @@ static void init_channel(struct peer *peer) msg = wire_sync_read(peer, REQ_FD); if (!fromwire_channel_init(peer, msg, NULL, + &peer->chain_hash, &funding_txid, &funding_txout, &funding_satoshi, &peer->conf[LOCAL], &peer->conf[REMOTE], diff --git a/lightningd/channel/channel_wire.csv b/lightningd/channel/channel_wire.csv index 9e9c45f9b..980302660 100644 --- a/lightningd/channel/channel_wire.csv +++ b/lightningd/channel/channel_wire.csv @@ -22,6 +22,7 @@ channel_normal_operation,1001 # Begin! (passes gossipd-client fd) channel_init,1 +channel_init,,chain_hash,struct sha256_double channel_init,,funding_txid,struct sha256_double channel_init,,funding_txout,2 channel_init,,funding_satoshi,8 diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 503f8b018..abae20c84 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -1643,6 +1643,7 @@ static bool peer_start_channeld(struct peer *peer, shutdown_scriptpubkey = NULL; initmsg = towire_channel_init(tmpctx, + &peer->ld->chainparams->genesis_blockhash, peer->funding_txid, peer->funding_outnum, peer->funding_satoshi,