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

@@ -32,7 +32,6 @@ u8 *hsm_sync_read(const tal_t *ctx, struct lightningd *ld)
void hsm_init(struct lightningd *ld, bool newdir)
{
const tal_t *tmpctx = tal_tmpctx(ld);
u8 *msg;
bool create;
@@ -56,6 +55,4 @@ void hsm_init(struct lightningd *ld, bool newdir)
&ld->peer_seed,
ld->wallet->bip32_base))
errx(1, "HSM did not give init reply");
tal_free(tmpctx);
}