Skip to content

Commit ffedf26

Browse files
committedSep 16, 2014
check_block: free up proofs when we add txhash.
We previously did it only when we add a full tx, but adding a txhash also means we don't need the proof any more (once we have them all). Otherwise check_block_shard() asserts after we recv_shard. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent f95349d commit ffedf26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎check_block.c

+4
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ bool put_txhash_in_shard(struct state *state,
287287
add_txhash_to_hashes(state, shard, block, shardnum, txoff,
288288
&txrefhash->txhash);
289289

290+
/* If we've just filled it, we don't need proofs any more. */
291+
if (shard_all_hashes(shard))
292+
shard->proof = tal_free(shard->proof);
293+
290294
/* This could eliminate a pending tx. */
291295
state->pending->needs_recheck = true;
292296

0 commit comments

Comments
 (0)
Please sign in to comment.