channeld: remove chainparams local parameter.

Use global everywhere.  This leaks into openingd a little, too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-11-20 12:25:35 +10:30
committed by Christian Decker
parent 5a95e9f29a
commit ce1049115a
13 changed files with 41 additions and 81 deletions

View File

@@ -360,8 +360,6 @@ int main(int argc, char *argv[])
&remotebase, &funding_remotekey, commitnum);
channel = new_full_channel(NULL,
&chainparams_for_network("regtest")
->genesis_blockhash,
&funding_txid, funding_outnum, 1,
funding_amount,
local_msat,
@@ -384,7 +382,7 @@ int main(int argc, char *argv[])
if (!per_commit_point(&localseed, &local_per_commit_point, commitnum))
errx(1, "Bad deriving local per-commitment-point");
local_txs = channel_txs(NULL, chainparams, &htlcmap, &wscripts, channel,
local_txs = channel_txs(NULL, &htlcmap, &wscripts, channel,
&local_per_commit_point, commitnum, LOCAL);
printf("## local_commitment\n"
@@ -485,7 +483,7 @@ int main(int argc, char *argv[])
/* Create the remote commitment tx */
if (!per_commit_point(&remoteseed, &remote_per_commit_point, commitnum))
errx(1, "Bad deriving remote per-commitment-point");
remote_txs = channel_txs(NULL, chainparams, &htlcmap, &wscripts, channel,
remote_txs = channel_txs(NULL, &htlcmap, &wscripts, channel,
&remote_per_commit_point, commitnum, REMOTE);
remote_txs[0]->input_amounts[0]
= tal_dup(remote_txs[0], struct amount_sat, &funding_amount);