mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
onchaind: Pass genesis hash to onchaind so it knows the chainparams
It'll be creating quite a few transactions and we will have to know which params to use. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
dbc0265a5d
commit
15e73e3dc3
@@ -438,6 +438,7 @@ enum watch_result onchaind_funding_spent(struct channel *channel,
|
||||
struct pubkey final_key;
|
||||
int hsmfd;
|
||||
u32 feerate;
|
||||
const struct chainparams *chainparams;
|
||||
|
||||
channel_fail_permanent(channel, "Funding transaction spent");
|
||||
|
||||
@@ -507,8 +508,11 @@ enum watch_result onchaind_funding_spent(struct channel *channel,
|
||||
feerate = feerate_floor();
|
||||
}
|
||||
|
||||
chainparams = get_chainparams(channel->peer->ld);
|
||||
|
||||
msg = towire_onchain_init(channel,
|
||||
&channel->their_shachain.chain,
|
||||
&chainparams->genesis_blockhash,
|
||||
channel->funding,
|
||||
&channel->channel_info.old_remote_per_commit,
|
||||
&channel->channel_info.remote_per_commit,
|
||||
|
||||
Reference in New Issue
Block a user