Skip to content

Commit 255e24c

Browse files
committed
clean
1 parent 6fc59d2 commit 255e24c

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/discof/forest/fd_forest.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ fd_forest_data_shred_insert( fd_forest_t * forest, ulong slot, ushort parent_off
443443
}
444444

445445
if( !fd_forest_ele_idxs_test( ele->idxs, shred_idx ) ) { /* newly seen shred */
446-
ele->turbine_cnt += src == TURBINE;
447-
ele->repair_cnt += src == REPAIR;
446+
ele->turbine_cnt += (src==TURBINE);
447+
ele->repair_cnt += (src==REPAIR);
448448
}
449449
if( FD_UNLIKELY( !slot_complete && ele->first_ts == 0 ) ) ele->first_ts = fd_tickcount();
450450

@@ -460,16 +460,17 @@ fd_forest_ele_t *
460460
fd_forest_code_shred_insert( fd_forest_t * forest, ulong slot, uint shred_idx ) {
461461
//fd_forest_ele_t * pool = fd_forest_pool( forest );
462462
fd_forest_ele_t * ele = query( forest, slot );
463-
if( FD_UNLIKELY( !ele ) ) { /* very annoying, but if coding shred is the first shred in a slot, we can't create its ele without the parent */
463+
if( FD_UNLIKELY( !ele ) ) {
464+
/* very annoying, but if coding shred is the first shred in a slot,
465+
we can't create its ele without the parent_off. But slight
466+
in-accuracies in metrics are ok for now */
464467
return NULL;
465-
//ele = acquire( forest, slot );
466-
//fd_forest_ancestry_ele_insert( fd_forest_orphaned( forest ), ele, pool );
467468
}
468469

469-
if( !fd_forest_ele_idxs_test( ele->code, shred_idx ) ) { /* newly seen shred */
470+
if( FD_LIKELY( !fd_forest_ele_idxs_test( ele->code, shred_idx ) ) ) { /* newly seen shred */
470471
ele->turbine_cnt += 1;
472+
fd_forest_ele_idxs_insert( ele->code, shred_idx );
471473
}
472-
fd_forest_ele_idxs_insert( ele->code, shred_idx );
473474
return ele;
474475
}
475476

src/discof/reasm/fd_reasm.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,6 @@ fd_reasm_insert( fd_reasm_t * reasm,
270270
}
271271

272272
if( FD_LIKELY( parent ) ) link( reasm, parent, fec );
273-
// check if cmr is all 0s
274-
fd_hash_t hash_null = { 0 };
275-
if( FD_UNLIKELY( memcmp( chained_merkle_root->uc, hash_null.uc, sizeof(fd_hash_t) ) == 0 ) ) {
276-
FD_LOG_WARNING(( "Slot %lu fec_set_idx %u chains off an invalid { 0 } merkle root. Expect replay to stall soon.", slot, fec_set_idx ));
277-
}
278273

279274
/* Second, we search for children of this new FEC and link them to it.
280275
By definition any children must be orphaned (a child cannot be part

0 commit comments

Comments
 (0)