@@ -224,6 +224,7 @@ fd_gui_new( void * shmem,
224224 gui -> summary .slot_rooted = ULONG_MAX ;
225225 gui -> summary .slot_optimistically_confirmed = ULONG_MAX ;
226226 gui -> summary .slot_completed = ULONG_MAX ;
227+ gui -> summary .startup_slot = ULONG_MAX ;
227228 gui -> summary .slot_estimated = ULONG_MAX ;
228229 gui -> summary .slot_caught_up = ULONG_MAX ;
229230 gui -> summary .slot_repair = ULONG_MAX ;
@@ -1319,17 +1320,17 @@ fd_gui_try_insert_ranking( fd_gui_t * gui,
13191320 ulong dur = fd_gui_slot_duration ( gui , slot );
13201321 if ( FD_LIKELY ( dur != ULONG_MAX ) ) TRY_INSERT_SLOT ( duration , slot -> slot , dur );
13211322 TRY_INSERT_SLOT ( tips , slot -> slot , slot -> tips );
1322- TRY_INSERT_SLOT ( fees , slot -> slot , slot -> priority_fee );
1323- TRY_INSERT_SLOT ( rewards , slot -> slot , slot -> tips + slot -> priority_fee );
1324- TRY_INSERT_SLOT ( rewards_per_cu , slot -> slot , slot -> compute_units == 0UL ? 0UL : (slot -> tips + slot -> priority_fee ) / slot -> compute_units );
1323+ TRY_INSERT_SLOT ( fees , slot -> slot , slot -> priority_fee + slot -> transaction_fee );
1324+ TRY_INSERT_SLOT ( rewards , slot -> slot , slot -> tips + slot -> priority_fee + slot -> transaction_fee );
1325+ TRY_INSERT_SLOT ( rewards_per_cu , slot -> slot , slot -> compute_units == 0UL ? 0UL : (slot -> tips + slot -> priority_fee + slot -> transaction_fee ) / slot -> compute_units );
13251326 TRY_INSERT_SLOT ( compute_units , slot -> slot , slot -> compute_units );
13261327#undef TRY_INSERT_SLOT
13271328}
13281329
13291330static void
13301331fd_gui_update_slot_rankings ( fd_gui_t * gui ) {
1331- if ( FD_UNLIKELY ( gui -> summary .startup_progress . startup_ledger_max_slot == ULONG_MAX ) ) return ;
1332- if ( FD_UNLIKELY ( gui -> summary .slot_rooted == ULONG_MAX ) ) return ;
1332+ if ( FD_UNLIKELY ( gui -> summary .startup_slot == ULONG_MAX ) ) return ;
1333+ if ( FD_UNLIKELY ( gui -> summary .slot_rooted == ULONG_MAX ) ) return ;
13331334
13341335 ulong epoch_start_slot = ULONG_MAX ;
13351336 ulong epoch = ULONG_MAX ;
@@ -1347,8 +1348,8 @@ fd_gui_update_slot_rankings( fd_gui_t * gui ) {
13471348 /* No new slots since the last update */
13481349 if ( FD_UNLIKELY ( gui -> epoch .epochs [ epoch_idx ].rankings_slot > gui -> summary .slot_rooted ) ) return ;
13491350
1350- /* Slots before startup_ledger_max_slot are unavailable. */
1351- 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 );
1351+ /* Slots before gui->summary.startup_slot are unavailable. */
1352+ gui -> epoch .epochs [ epoch_idx ].rankings_slot = fd_ulong_max ( gui -> epoch .epochs [ epoch_idx ].rankings_slot , gui -> summary .startup_slot );
13521353
13531354 /* Update the rankings. Only look through slots we haven't already. */
13541355 for ( ulong s = gui -> summary .slot_rooted ; s >=gui -> epoch .epochs [ epoch_idx ].rankings_slot ; s -- ) {
@@ -1497,6 +1498,8 @@ static fd_gui_slot_t *
14971498fd_gui_clear_slot ( fd_gui_t * gui ,
14981499 ulong _slot ,
14991500 ulong _parent_slot ) {
1501+ gui -> summary .startup_slot = fd_ulong_if ( gui -> summary .startup_slot == ULONG_MAX , _slot , gui -> summary .startup_slot );
1502+
15001503 fd_gui_slot_t * slot = gui -> slots [ _slot % FD_GUI_SLOTS_CNT ];
15011504
15021505 int mine = 0 ;
0 commit comments