bitcoin_tx_check: don't rely on tmpctx.

We assert() this in onchaind while grinding fees; better to free newtx.

Before this we hit 530MB, after a mere 2.5MB.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: onchaind uses much less memory on unilateral closes for old channels.
This commit is contained in:
Rusty Russell
2020-12-03 11:52:01 +10:30
committed by Christian Decker
parent f22d719d2c
commit e9e6f72d7c

View File

@@ -256,6 +256,7 @@ bool bitcoin_tx_check(const struct bitcoin_tx *tx)
if (written != tal_bytelen(newtx))
return false;
tal_free(newtx);
return true;
}