Skip to content

Commit

Permalink
fix(blockstore,forks,voter): change err to warn, remove interrupts
Browse files Browse the repository at this point in the history
  • Loading branch information
lidatong authored and yufeng-jump committed Jan 13, 2025
1 parent 18629d6 commit 839254a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/choreo/forks/fd_forks.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,6 @@ fd_forks_update( fd_forks_t * forks,

fd_voter_t * voter = &epoch_voters[i];
fd_voter_state_t const * state = fd_voter_state( funk, txn, &voter->rec );
if ( FD_UNLIKELY( state->discriminant == FD_VOTER_STATE_V0_23_5 ) ) {
FD_LOG_NOTICE(( "voter %s with ancient v0.23.5 state", FD_BASE58_ENC_32_ALLOCA(&voter->key) ));
__asm__("int $3");
}

/* Only process votes for slots >= root. Ghost requires vote slot
to already exist in the ghost tree. */
Expand Down
4 changes: 0 additions & 4 deletions src/choreo/voter/fd_voter.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ fd_voter_state( fd_funk_t * funk, fd_funk_txn_t const * txn, fd_funk_rec_key_t c
fd_account_meta_t const * meta = fd_funk_val_const( rec, fd_funk_wksp(funk) );
FD_TEST( meta->magic == FD_ACCOUNT_META_MAGIC );
fd_voter_state_t const * state = fd_type_pun_const( (uchar const *)meta + meta->hlen );
if (state->discriminant == FD_VOTER_STATE_V0_23_5 && fd_voter_state_cnt( state ) > 0 ) {
__asm__("int $3");
}

#if FD_VOTER_USE_HANDHOLDING
FD_TEST( state->discriminant <= fd_vote_state_versioned_enum_current );
#endif
Expand Down
8 changes: 5 additions & 3 deletions src/flamenco/runtime/fd_blockstore.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,13 @@ build_idx( fd_blockstore_t * blockstore, int fd ) {
blockstore->archiver.head = wrap_offset(&blockstore->archiver, blockstore->archiver.head + lrw_block.data_sz + sizeof(fd_block_map_t) + sizeof(fd_block_t));;
blockstore->archiver.num_blocks--;
}
if ( FD_UNLIKELY( fd_block_idx_query( block_idx, block_map_out.slot, NULL ) ) ) {
FD_LOG_ERR(( "[%s] existing archival file contained duplicates of slot %lu", __func__, block_map_out.slot ));
fd_block_idx_t * idx_entry = fd_block_idx_query( block_idx, block_map_out.slot, NULL );
if ( FD_UNLIKELY( idx_entry ) ) {
FD_LOG_WARNING(( "[%s] archival file contained duplicates of slot %lu", __func__, block_map_out.slot ));
fd_block_idx_remove( block_idx, idx_entry );
}

fd_block_idx_t * idx_entry = fd_block_idx_insert( block_idx, block_map_out.slot );
idx_entry = fd_block_idx_insert( block_idx, block_map_out.slot );
idx_entry->off = off;
idx_entry->block_hash = block_map_out.block_hash;
idx_entry->bank_hash = block_map_out.bank_hash;
Expand Down

0 comments on commit 839254a

Please sign in to comment.