Browse Source

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.
fix-mocks
Rusty Russell 4 years ago
committed by Christian Decker
parent
commit
e9e6f72d7c
  1. 1
      bitcoin/tx.c

1
bitcoin/tx.c

@ -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;
}

Loading…
Cancel
Save