Skip to content

Commit 25d831f

Browse files
committed
flameco/genesis_rent: Slot 0 always needs to be handled in the genesis case
1 parent 15da258 commit 25d831f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/flamenco/runtime/fd_runtime.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ fd_runtime_update_rent_epoch( fd_exec_slot_ctx_t * slot_ctx ) {
436436
return;
437437
}
438438

439-
ulong slot0 = slot_ctx->slot_bank.prev_slot;
439+
ulong slot0 = (slot_ctx->slot_bank.prev_slot == 0) ? 0 :
440+
slot_ctx->slot_bank.prev_slot + 1; /* Accomodate skipped slots */
440441
ulong slot1 = slot_ctx->slot_bank.slot;
441442

442-
/* Accomodate skipped slots */
443-
for( ulong s = slot0 + 1; s <= slot1; ++s ) {
443+
for( ulong s = slot0; s <= slot1; ++s ) {
444444

445445
ulong partition = fd_runtime_get_rent_partition( slot_ctx, s );
446446

0 commit comments

Comments
 (0)