File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -466,16 +466,18 @@ during_frag( fd_shred_ctx_t * ctx,
466
466
/* Reset batch count if we are in a new slot */
467
467
ctx -> batch_cnt = 0UL ;
468
468
ctx -> slot = target_slot ;
469
- }
470
469
471
- if ( FD_UNLIKELY ( SHOULD_PROCESS_THESE_SHREDS ) ) {
472
- /* chained_merkle_root is set as the merkle root of the last FEC set
473
- of the parent block (and passed in by POH tile) */
474
- if ( FD_LIKELY ( entry_meta -> parent_block_id_valid ) ) {
475
- memcpy ( ctx -> chained_merkle_root , entry_meta -> parent_block_id , FD_SHRED_MERKLE_ROOT_SZ );
476
- } else {
477
- ctx -> metrics -> invalid_block_id_cnt ++ ;
478
- memset ( ctx -> chained_merkle_root , 0 , FD_SHRED_MERKLE_ROOT_SZ );
470
+ /* Only copy parent_block_id to chained_merkle_root at the beginning
471
+ of a new slot*/
472
+ if ( FD_UNLIKELY ( SHOULD_PROCESS_THESE_SHREDS ) ) {
473
+ /* chained_merkle_root is set as the merkle root of the last FEC set
474
+ of the parent block (and passed in by POH tile) */
475
+ if ( FD_LIKELY ( entry_meta -> parent_block_id_valid ) ) {
476
+ memcpy ( ctx -> chained_merkle_root , entry_meta -> parent_block_id , FD_SHRED_MERKLE_ROOT_SZ );
477
+ } else {
478
+ ctx -> metrics -> invalid_block_id_cnt ++ ;
479
+ memset ( ctx -> chained_merkle_root , 0 , FD_SHRED_MERKLE_ROOT_SZ );
480
+ }
479
481
}
480
482
}
481
483
You can’t perform that action at this time.
0 commit comments