diff --git a/src/flamenco/runtime/fd_runtime.c b/src/flamenco/runtime/fd_runtime.c index b6c377c5bf..7db194b053 100644 --- a/src/flamenco/runtime/fd_runtime.c +++ b/src/flamenco/runtime/fd_runtime.c @@ -2731,15 +2731,15 @@ void fd_process_new_epoch( fd_exec_slot_ctx_t * slot_ctx, /* Change the speed of the poh clock https://github.com/anza-xyz/agave/blob/v2.1.0/runtime/src/bank.rs#L6627-L6649 */ - if( FD_FEATURE_ACTIVE( slot_ctx, update_hashes_per_tick6 ) ) { + if( FD_FEATURE_JUST_ACTIVATED( slot_ctx, update_hashes_per_tick6 ) ) { epoch_bank->hashes_per_tick = UPDATED_HASHES_PER_TICK6; - } else if( FD_FEATURE_ACTIVE(slot_ctx, update_hashes_per_tick5 ) ) { + } else if( FD_FEATURE_JUST_ACTIVATED(slot_ctx, update_hashes_per_tick5 ) ) { epoch_bank->hashes_per_tick = UPDATED_HASHES_PER_TICK5; - } else if( FD_FEATURE_ACTIVE( slot_ctx, update_hashes_per_tick4 ) ) { + } else if( FD_FEATURE_JUST_ACTIVATED( slot_ctx, update_hashes_per_tick4 ) ) { epoch_bank->hashes_per_tick = UPDATED_HASHES_PER_TICK4; - } else if( FD_FEATURE_ACTIVE(slot_ctx, update_hashes_per_tick3 ) ) { + } else if( FD_FEATURE_JUST_ACTIVATED(slot_ctx, update_hashes_per_tick3 ) ) { epoch_bank->hashes_per_tick = UPDATED_HASHES_PER_TICK3; - } else if( FD_FEATURE_ACTIVE(slot_ctx, update_hashes_per_tick2 ) ) { + } else if( FD_FEATURE_JUST_ACTIVATED(slot_ctx, update_hashes_per_tick2 ) ) { epoch_bank->hashes_per_tick = UPDATED_HASHES_PER_TICK2; } diff --git a/src/flamenco/runtime/fd_runtime.h b/src/flamenco/runtime/fd_runtime.h index ef63df22ae..202ec0a798 100644 --- a/src/flamenco/runtime/fd_runtime.h +++ b/src/flamenco/runtime/fd_runtime.h @@ -38,6 +38,7 @@ #define FD_RUNTIME_NUM_ROOT_BLOCKS (32UL) #define FD_FEATURE_ACTIVE(_slot_ctx, _feature_name) (_slot_ctx->slot_bank.slot >= _slot_ctx->epoch_ctx->features. _feature_name) +#define FD_FEATURE_JUST_ACTIVATED(_slot_ctx, _feature_name) (_slot_ctx->slot_bank.slot == _slot_ctx->epoch_ctx->features. _feature_name) #define FD_BLOCKHASH_QUEUE_MAX_ENTRIES (300UL) #define FD_RECENT_BLOCKHASHES_MAX_ENTRIES (150UL)