Skip to content

Commit 1f2ad62

Browse files
runtime: removing slot field from slot_ctx
1 parent 17b6220 commit 1f2ad62

28 files changed

+149
-1133
lines changed

src/app/ledger/main.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ runtime_replay( fd_ledger_args_t * ledger_args ) {
164164

165165
fd_features_restore( ledger_args->slot_ctx, ledger_args->runtime_spad );
166166

167-
fd_runtime_update_leaders( ledger_args->slot_ctx->bank, ledger_args->slot_ctx->slot, ledger_args->runtime_spad );
167+
fd_runtime_update_leaders( ledger_args->slot_ctx->bank, ledger_args->slot_ctx->bank->slot, ledger_args->runtime_spad );
168168

169169
fd_calculate_epoch_accounts_hash_values( ledger_args->slot_ctx );
170170

@@ -173,8 +173,8 @@ runtime_replay( fd_ledger_args_t * ledger_args ) {
173173
ulong slot_cnt = 0;
174174
fd_blockstore_t * blockstore = ledger_args->blockstore;
175175

176-
ulong prev_slot = ledger_args->slot_ctx->slot;
177-
ulong start_slot = ledger_args->slot_ctx->slot + 1;
176+
ulong prev_slot = ledger_args->slot_ctx->bank->slot;
177+
ulong start_slot = ledger_args->slot_ctx->bank->slot + 1;
178178

179179
/* On demand rocksdb ingest */
180180
fd_rocksdb_t rocks_db = {0};
@@ -519,7 +519,7 @@ fd_ledger_main_setup( fd_ledger_args_t * args ) {
519519

520520
/* Finish other runtime setup steps */
521521
fd_features_restore( args->slot_ctx, args->runtime_spad );
522-
fd_runtime_update_leaders( args->slot_ctx->bank, args->slot_ctx->slot, args->runtime_spad );
522+
fd_runtime_update_leaders( args->slot_ctx->bank, args->slot_ctx->bank->slot, args->runtime_spad );
523523
fd_calculate_epoch_accounts_hash_values( args->slot_ctx );
524524

525525
/* After both snapshots have been loaded in, we can determine if we should
@@ -926,11 +926,11 @@ ingest( fd_ledger_args_t * args ) {
926926

927927
/* At this point the account state has been ingested into funk. Intake rocksdb */
928928
if( args->start_slot == 0 ) {
929-
args->start_slot = slot_ctx->slot + 1;
929+
args->start_slot = slot_ctx->bank->slot + 1;
930930
}
931931
fd_blockstore_t * blockstore = args->blockstore;
932932
if( blockstore ) {
933-
blockstore->shmem->lps = blockstore->shmem->hcs = blockstore->shmem->wmk = slot_ctx->slot;
933+
blockstore->shmem->lps = blockstore->shmem->hcs = blockstore->shmem->wmk = slot_ctx->bank->slot;
934934
}
935935

936936
if( args->funk_only ) {
@@ -939,8 +939,8 @@ ingest( fd_ledger_args_t * args ) {
939939
FD_LOG_NOTICE(( "using shredcap" ));
940940
fd_shredcap_populate_blockstore( args->shredcap, blockstore, args->start_slot, args->end_slot );
941941
} else if( args->rocksdb_list[ 0UL ] ) {
942-
if( args->end_slot >= slot_ctx->slot + args->slot_history_max ) {
943-
args->end_slot = slot_ctx->slot + args->slot_history_max - 1;
942+
if( args->end_slot >= slot_ctx->bank->slot + args->slot_history_max ) {
943+
args->end_slot = slot_ctx->bank->slot + args->slot_history_max - 1;
944944
}
945945
ingest_rocksdb( args->rocksdb_list[ 0UL ], args->start_slot, args->end_slot,
946946
blockstore, args->trash_hash, args->valloc );
@@ -1107,7 +1107,7 @@ replay( fd_ledger_args_t * args ) {
11071107
fd_blockstore_init( args->blockstore,
11081108
-1,
11091109
FD_BLOCKSTORE_ARCHIVE_MIN_SIZE,
1110-
args->slot_ctx->slot );
1110+
args->slot_ctx->bank->slot );
11111111
fd_buf_shred_pool_reset( args->blockstore->shred_pool, 0 );
11121112

11131113
FD_LOG_WARNING(( "setup done" ));

src/choreo/forks/fd_forks.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@ fd_forks_query_const( fd_forks_t const * forks, ulong slot ) {
158158
// // fork is advancing
159159
// FD_LOG_DEBUG(( "new block execution - slot: %lu, parent_slot: %lu", curr_slot, parent_slot ));
160160

161-
// fork->slot_ctx->slot_bank.prev_slot = fork->slot_ctx->slot;
162-
// fork->slot_ctx->slot = curr_slot;
163-
164161
// fork->slot_ctx.status_cache = status_cache;
165162
// fd_funk_txn_xid_t xid;
166163

src/discof/consensus/Local.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
ifdef FD_HAS_INT128
22
ifdef FD_HAS_SECP256K1
3-
$(call make-unit-test,test_consensus,test_consensus,fd_disco fd_choreo fd_flamenco fd_funk fd_tango fd_util fd_ballet fd_reedsol fd_waltz,$(SECP256K1_LIBS))
43
$(call make-unit-test,test_gossip_echo_vote,test_gossip_echo_vote,fd_disco fd_choreo fd_flamenco fd_funk fd_tango fd_util fd_ballet fd_reedsol fd_waltz,$(SECP256K1_LIBS))
54
endif
65
endif

0 commit comments

Comments
 (0)