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

@@ -222,12 +222,8 @@ static char const *stringify_route(const tal_t *ctx, struct route_hop *route)
static void log_route(struct pay *pay, struct route_hop *route)
{
const tal_t *tmpctx = tal_tmpctx(pay->try_parent);
log_info(pay->cmd->ld->log, "pay(%p): sendpay via route: %s",
pay, stringify_route(tmpctx, route));
tal_free(tmpctx);
}
static void json_pay_sendpay_resume(const struct sendpay_result *r,