@@ -1368,17 +1368,26 @@ fd_gui_try_insert_ranking( fd_gui_t * gui,
13681368 ulong dur = fd_gui_slot_duration ( gui , slot );
13691369 if ( FD_LIKELY ( dur != ULONG_MAX ) ) TRY_INSERT_SLOT ( duration , slot -> slot , dur );
13701370 TRY_INSERT_SLOT ( tips , slot -> slot , slot -> tips );
1371- TRY_INSERT_SLOT ( fees , slot -> slot , slot -> priority_fee );
1372- TRY_INSERT_SLOT ( rewards , slot -> slot , slot -> tips + slot -> priority_fee );
1373- TRY_INSERT_SLOT ( rewards_per_cu , slot -> slot , slot -> compute_units == 0UL ? 0UL : (slot -> tips + slot -> priority_fee ) / slot -> compute_units );
1371+ TRY_INSERT_SLOT ( fees , slot -> slot , slot -> priority_fee + slot -> transaction_fee );
1372+ TRY_INSERT_SLOT ( rewards , slot -> slot , slot -> tips + slot -> priority_fee + slot -> transaction_fee );
1373+ TRY_INSERT_SLOT ( rewards_per_cu , slot -> slot , slot -> compute_units == 0UL ? 0UL : (slot -> tips + slot -> priority_fee + slot -> transaction_fee ) / slot -> compute_units );
13741374 TRY_INSERT_SLOT ( compute_units , slot -> slot , slot -> compute_units );
13751375#undef TRY_INSERT_SLOT
13761376}
13771377
13781378static void
13791379fd_gui_update_slot_rankings ( fd_gui_t * gui ) {
1380- if ( FD_UNLIKELY ( gui -> summary .startup_progress .startup_ledger_max_slot == ULONG_MAX ) ) return ;
1381- if ( FD_UNLIKELY ( gui -> summary .slot_rooted == ULONG_MAX ) ) return ;
1380+ ulong first_replay_slot = ULONG_MAX ;
1381+ if ( FD_LIKELY ( gui -> summary .is_full_client ) ) {
1382+ ulong slot_caught_up = gui -> summary .slot_caught_up ;
1383+ ulong slot_incremental = gui -> summary .boot_progress .loading_snapshot [ FD_GUI_BOOT_PROGRESS_INCREMENTAL_SNAPSHOT_IDX ].slot ;
1384+ ulong slot_full = gui -> summary .boot_progress .loading_snapshot [ FD_GUI_BOOT_PROGRESS_FULL_SNAPSHOT_IDX ].slot ;
1385+ first_replay_slot = fd_ulong_if ( slot_caught_up != ULONG_MAX , fd_ulong_if ( slot_incremental != ULONG_MAX , slot_incremental + 1UL , fd_ulong_if ( slot_full != ULONG_MAX , slot_full + 1UL , ULONG_MAX ) ), ULONG_MAX );
1386+ } else {
1387+ first_replay_slot = gui -> summary .startup_progress .startup_ledger_max_slot ;
1388+ }
1389+ if ( FD_UNLIKELY ( first_replay_slot == ULONG_MAX ) ) return ;
1390+ if ( FD_UNLIKELY ( gui -> summary .slot_rooted == ULONG_MAX ) ) return ;
13821391
13831392 ulong epoch_start_slot = ULONG_MAX ;
13841393 ulong epoch = ULONG_MAX ;
@@ -1396,8 +1405,8 @@ fd_gui_update_slot_rankings( fd_gui_t * gui ) {
13961405 /* No new slots since the last update */
13971406 if ( FD_UNLIKELY ( gui -> epoch .epochs [ epoch_idx ].rankings_slot > gui -> summary .slot_rooted ) ) return ;
13981407
1399- /* Slots before startup_ledger_max_slot are unavailable. */
1400- gui -> epoch .epochs [ epoch_idx ].rankings_slot = fd_ulong_max ( gui -> epoch .epochs [ epoch_idx ].rankings_slot , gui -> summary . startup_progress . startup_ledger_max_slot + 1UL );
1408+ /* Slots before first_replay_slot are unavailable. */
1409+ gui -> epoch .epochs [ epoch_idx ].rankings_slot = fd_ulong_max ( gui -> epoch .epochs [ epoch_idx ].rankings_slot , first_replay_slot );
14011410
14021411 /* Update the rankings. Only look through slots we haven't already. */
14031412 for ( ulong s = gui -> summary .slot_rooted ; s >=gui -> epoch .epochs [ epoch_idx ].rankings_slot ; s -- ) {
0 commit comments