Skip to content

Commit e470601

Browse files
committed
gui: firedancer opt confimation
1 parent 8ff0dac commit e470601

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

src/disco/gui/fd_gui.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,9 +2059,7 @@ fd_gui_handle_rooted_slot_legacy( fd_gui_t * gui,
20592059

20602060
static void
20612061
fd_gui_handle_optimistically_confirmed_slot( fd_gui_t * gui,
2062-
ulong * msg ) {
2063-
ulong _slot = msg[ 0 ];
2064-
2062+
ulong _slot ) {
20652063
/* Slot 0 is always rooted. No need to iterate all the way back to
20662064
i==_slot */
20672065
for( ulong i=0UL; i<fd_ulong_min( _slot, FD_GUI_SLOTS_CNT ); i++ ) {
@@ -2516,6 +2514,14 @@ fd_gui_handle_rooted_slot( fd_gui_t * gui, ulong root_slot ) {
25162514
fd_http_server_ws_broadcast( gui->http );
25172515
}
25182516

2517+
void
2518+
fd_gui_handle_notarization_update( fd_gui_t * gui,
2519+
fd_tower_slot_confirmed_t const * notar ) {
2520+
if( FD_UNLIKELY( notar->slot!=ULONG_MAX && gui->summary.slot_optimistically_confirmed!=notar->slot && notar->kind==FD_TOWER_SLOT_CONFIRMED_CLUSTER ) ) {
2521+
fd_gui_handle_optimistically_confirmed_slot( gui, notar->slot );
2522+
}
2523+
}
2524+
25192525
/* fd_gui_handle_tower_update handles updates from the tower tile, which
25202526
manages consensus related fork switching, rooting, slot confirmation. */
25212527
void
@@ -2646,7 +2652,7 @@ fd_gui_plugin_message( fd_gui_t * gui,
26462652
fd_gui_handle_rooted_slot_legacy( gui, (ulong *)msg );
26472653
break;
26482654
case FD_PLUGIN_MSG_SLOT_OPTIMISTICALLY_CONFIRMED:
2649-
fd_gui_handle_optimistically_confirmed_slot( gui, (ulong *)msg );
2655+
fd_gui_handle_optimistically_confirmed_slot( gui, ((ulong *)msg)[0] );
26502656
break;
26512657
case FD_PLUGIN_MSG_SLOT_COMPLETED: {
26522658
fd_gui_handle_completed_slot( gui, (ulong *)msg, now );

src/disco/gui/fd_gui.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,10 @@ fd_gui_handle_leader_schedule( fd_gui_t * gui,
844844
fd_stake_weight_msg_t const * leader_schedule,
845845
long now );
846846

847+
void
848+
fd_gui_handle_notarization_update( fd_gui_t * gui,
849+
fd_tower_slot_confirmed_t const * notar );
850+
847851
void
848852
fd_gui_handle_tower_update( fd_gui_t * gui,
849853
fd_tower_slot_done_t const * msg,

src/disco/gui/fd_gui_tile.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ after_frag( fd_gui_ctx_t * ctx,
455455
fd_tower_slot_done_t const * tower = (fd_tower_slot_done_t const *)src;
456456
fd_gui_handle_tower_update( ctx->gui, tower, fd_clock_now( ctx->clock ) );
457457
}
458+
if( FD_UNLIKELY( sig==FD_TOWER_SIG_SLOT_CONFIRMED ) ) {
459+
fd_gui_handle_notarization_update( ctx->gui, (fd_tower_slot_confirmed_t const *)ctx->buf );
460+
}
458461
break;
459462
}
460463
case IN_KIND_SHRED_OUT: {

0 commit comments

Comments
 (0)