Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/disco/gui/fd_gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -2075,9 +2075,7 @@ fd_gui_handle_rooted_slot_legacy( fd_gui_t * gui,

static void
fd_gui_handle_optimistically_confirmed_slot( fd_gui_t * gui,
ulong * msg ) {
ulong _slot = msg[ 0 ];

ulong _slot ) {
/* Slot 0 is always rooted. No need to iterate all the way back to
i==_slot */
for( ulong i=0UL; i<fd_ulong_min( _slot, FD_GUI_SLOTS_CNT ); i++ ) {
Expand Down Expand Up @@ -2532,6 +2530,14 @@ fd_gui_handle_rooted_slot( fd_gui_t * gui, ulong root_slot ) {
fd_http_server_ws_broadcast( gui->http );
}

void
fd_gui_handle_notarization_update( fd_gui_t * gui,
fd_tower_slot_confirmed_t const * notar ) {
if( FD_UNLIKELY( notar->slot!=ULONG_MAX && gui->summary.slot_optimistically_confirmed!=notar->slot && notar->kind==FD_TOWER_SLOT_CONFIRMED_CLUSTER ) ) {
fd_gui_handle_optimistically_confirmed_slot( gui, notar->slot );
}
}

/* fd_gui_handle_tower_update handles updates from the tower tile, which
manages consensus related fork switching, rooting, slot confirmation. */
void
Expand Down Expand Up @@ -2662,7 +2668,7 @@ fd_gui_plugin_message( fd_gui_t * gui,
fd_gui_handle_rooted_slot_legacy( gui, (ulong *)msg );
break;
case FD_PLUGIN_MSG_SLOT_OPTIMISTICALLY_CONFIRMED:
fd_gui_handle_optimistically_confirmed_slot( gui, (ulong *)msg );
fd_gui_handle_optimistically_confirmed_slot( gui, ((ulong *)msg)[0] );
break;
case FD_PLUGIN_MSG_SLOT_COMPLETED: {
fd_gui_handle_completed_slot( gui, (ulong *)msg, now );
Expand Down
4 changes: 4 additions & 0 deletions src/disco/gui/fd_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,10 @@ fd_gui_handle_leader_schedule( fd_gui_t * gui,
fd_stake_weight_msg_t const * leader_schedule,
long now );

void
fd_gui_handle_notarization_update( fd_gui_t * gui,
fd_tower_slot_confirmed_t const * notar );

void
fd_gui_handle_tower_update( fd_gui_t * gui,
fd_tower_slot_done_t const * msg,
Expand Down
3 changes: 3 additions & 0 deletions src/disco/gui/fd_gui_tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ after_frag( fd_gui_ctx_t * ctx,
fd_tower_slot_done_t const * tower = (fd_tower_slot_done_t const *)ctx->buf;
fd_gui_handle_tower_update( ctx->gui, tower, fd_clock_now( ctx->clock ) );
}
if( FD_UNLIKELY( sig==FD_TOWER_SIG_SLOT_CONFIRMED ) ) {
fd_gui_handle_notarization_update( ctx->gui, (fd_tower_slot_confirmed_t const *)ctx->buf );
}
break;
}
case IN_KIND_SHRED_OUT: {
Expand Down
Loading