opening: Pass network_index through to openingd

This is needed in order to open channels with the correct
genesis_blockhash.

Reported-By: @sstone
This commit is contained in:
Christian Decker
2017-07-10 13:35:43 +02:00
committed by Rusty Russell
parent 943b6526c7
commit fbc2b65a3d
3 changed files with 8 additions and 2 deletions

View File

@@ -1916,7 +1916,8 @@ void peer_fundee_open(struct peer *peer, const u8 *from_peer,
peer->seed = tal(peer, struct privkey);
derive_peer_seed(ld, peer->seed, &peer->id);
msg = towire_opening_init(peer, &peer->our_config,
msg = towire_opening_init(peer, ld->chainparams->index,
&peer->our_config,
max_to_self_delay,
min_effective_htlc_capacity_msat,
cs, peer->seed);
@@ -1986,7 +1987,8 @@ static bool gossip_peer_released(struct subd *gossip,
fc->peer->seed = tal(fc->peer, struct privkey);
derive_peer_seed(ld, fc->peer->seed, &fc->peer->id);
msg = towire_opening_init(fc, &fc->peer->our_config,
msg = towire_opening_init(fc, ld->chainparams->index,
&fc->peer->our_config,
max_to_self_delay,
min_effective_htlc_capacity_msat,
&cs, fc->peer->seed);