File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -466,16 +466,18 @@ during_frag( fd_shred_ctx_t * ctx,
466466 /* Reset batch count if we are in a new slot */
467467 ctx -> batch_cnt = 0UL ;
468468 ctx -> slot = target_slot ;
469- }
470469
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+ }
479481 }
480482 }
481483
You can’t perform that action at this time.
0 commit comments