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

@@ -169,7 +169,6 @@ u32 feerate_max(struct lightningd *ld)
static void sign_last_tx(struct channel *channel)
{
const tal_t *tmpctx = tal_tmpctx(channel);
u8 *funding_wscript;
struct pubkey local_funding_pubkey;
struct secrets secrets;
@@ -197,8 +196,6 @@ static void sign_last_tx(struct channel *channel)
&sig,
&channel->channel_info.remote_fundingkey,
&local_funding_pubkey);
tal_free(tmpctx);
}
static void remove_sig(struct bitcoin_tx *signed_tx)