mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
channeld: hand in chain_hash.
This will be needed for gossip messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
b3514d3430
commit
2b9d3bb0b7
@@ -83,6 +83,7 @@ struct peer {
|
|||||||
*/
|
*/
|
||||||
u64 htlc_id;
|
u64 htlc_id;
|
||||||
|
|
||||||
|
struct sha256_double chain_hash;
|
||||||
struct channel_id channel_id;
|
struct channel_id channel_id;
|
||||||
struct channel *channel;
|
struct channel *channel;
|
||||||
|
|
||||||
@@ -2004,6 +2005,7 @@ static void init_channel(struct peer *peer)
|
|||||||
|
|
||||||
msg = wire_sync_read(peer, REQ_FD);
|
msg = wire_sync_read(peer, REQ_FD);
|
||||||
if (!fromwire_channel_init(peer, msg, NULL,
|
if (!fromwire_channel_init(peer, msg, NULL,
|
||||||
|
&peer->chain_hash,
|
||||||
&funding_txid, &funding_txout,
|
&funding_txid, &funding_txout,
|
||||||
&funding_satoshi,
|
&funding_satoshi,
|
||||||
&peer->conf[LOCAL], &peer->conf[REMOTE],
|
&peer->conf[LOCAL], &peer->conf[REMOTE],
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ channel_normal_operation,1001
|
|||||||
|
|
||||||
# Begin! (passes gossipd-client fd)
|
# Begin! (passes gossipd-client fd)
|
||||||
channel_init,1
|
channel_init,1
|
||||||
|
channel_init,,chain_hash,struct sha256_double
|
||||||
channel_init,,funding_txid,struct sha256_double
|
channel_init,,funding_txid,struct sha256_double
|
||||||
channel_init,,funding_txout,2
|
channel_init,,funding_txout,2
|
||||||
channel_init,,funding_satoshi,8
|
channel_init,,funding_satoshi,8
|
||||||
|
|||||||
|
@@ -1643,6 +1643,7 @@ static bool peer_start_channeld(struct peer *peer,
|
|||||||
shutdown_scriptpubkey = NULL;
|
shutdown_scriptpubkey = NULL;
|
||||||
|
|
||||||
initmsg = towire_channel_init(tmpctx,
|
initmsg = towire_channel_init(tmpctx,
|
||||||
|
&peer->ld->chainparams->genesis_blockhash,
|
||||||
peer->funding_txid,
|
peer->funding_txid,
|
||||||
peer->funding_outnum,
|
peer->funding_outnum,
|
||||||
peer->funding_satoshi,
|
peer->funding_satoshi,
|
||||||
|
|||||||
Reference in New Issue
Block a user