Browse Source

channeld: hand in chain_hash.

This will be needed for gossip messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
committed by Christian Decker
parent
commit
2b9d3bb0b7
  1. 2
      lightningd/channel/channel.c
  2. 1
      lightningd/channel/channel_wire.csv
  3. 1
      lightningd/peer_control.c

2
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],

1
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

Can't render this file because it has a wrong number of fields in line 2.

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

Loading…
Cancel
Save