utils: remove tal_tmpctx altogether, use global.

In particular, we now only free tmpctx at the end of main().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-03-15 16:40:20 +10:30
parent 40fe5b7bac
commit 0a6e3d1e13
45 changed files with 115 additions and 375 deletions

View File

@@ -229,7 +229,6 @@ static void opening_funder_finished(struct subd *openingd, const u8 *resp,
const int *fds,
struct funding_channel *fc)
{
tal_t *tmpctx = tal_tmpctx(fc);
u8 *msg, *linear;
struct channel_info channel_info;
struct bitcoin_tx *fundingtx;
@@ -412,7 +411,6 @@ static void opening_fundee_finished(struct subd *openingd,
u64 gossip_index;
secp256k1_ecdsa_signature remote_commit_sig;
struct bitcoin_tx *remote_commit;
const tal_t *tmpctx = tal_tmpctx(uc);
struct lightningd *ld = openingd->ld;
struct bitcoin_txid funding_txid;
u16 funding_outnum;