onchaind: Eliminate a chicken-and-egg problem with msg parsing

Turns out that if we have the init message contain both the chainparams as
well as a transaction that needs to be parsed we need to set the parser to
elements mode before we reach the transaction...
This commit is contained in:
Christian Decker
2019-07-31 19:47:50 +02:00
committed by Rusty Russell
parent fad9a74662
commit 314622028f
5 changed files with 7 additions and 3 deletions

View File

@@ -513,6 +513,7 @@ enum watch_result onchaind_funding_spent(struct channel *channel,
msg = towire_onchain_init(channel,
&channel->their_shachain.chain,
chainparams->is_elements,
&chainparams->genesis_blockhash,
channel->funding,
&channel->channel_info.old_remote_per_commit,