mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 12:44:26 +01:00
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:
committed by
Christian Decker
parent
f22d719d2c
commit
e9e6f72d7c
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user