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

@@ -159,10 +159,8 @@ void towire_wirestring(u8 **pptr, const char *str)
void towire_bitcoin_tx(u8 **pptr, const struct bitcoin_tx *tx)
{
tal_t *tmpctx = tal_tmpctx(NULL);
u8 *lin = linearize_tx(tmpctx, tx);
towire_u8_array(pptr, lin, tal_len(lin));
tal_free(tmpctx);
}
void towire_siphash_seed(u8 **pptr, const struct siphash_seed *seed)