@@ -177,6 +177,8 @@ struct fd_repair_tile_ctx {
177
177
fd_blockstore_t * blockstore ;
178
178
179
179
fd_keyguard_client_t keyguard_client [1 ];
180
+
181
+ ulong * current_slot ;
180
182
};
181
183
typedef struct fd_repair_tile_ctx fd_repair_tile_ctx_t ;
182
184
@@ -920,6 +922,9 @@ after_frag( fd_repair_tile_ctx_t * ctx,
920
922
}
921
923
922
924
fd_shred_t * shred = (fd_shred_t * )fd_type_pun ( ctx -> buffer );
925
+ if ( fd_fseq_query ( ctx -> current_slot ) == ULONG_MAX ) {
926
+ fd_fseq_update ( ctx -> current_slot , shred -> slot );
927
+ }
923
928
if ( FD_UNLIKELY ( shred -> slot <= fd_forest_root_slot ( ctx -> forest ) ) ) return ; /* shred too old */
924
929
925
930
// FD_LOG_NOTICE(( "shred %lu %u", shred->slot, shred->idx ));
@@ -1439,6 +1444,13 @@ unprivileged_init( fd_topo_t * topo,
1439
1444
1440
1445
fd_repair_update_addr ( ctx -> repair , & ctx -> repair_intake_addr , & ctx -> repair_serve_addr );
1441
1446
1447
+ /* TODO: this is a hack so replay generates votes.
1448
+ Once we develop a better notion of 'caught up',
1449
+ remove all uses of current_slot in this file */
1450
+ ulong poh_slot_obj_id = fd_pod_query_ulong ( topo -> props , "poh_slot" , ULONG_MAX );
1451
+ FD_TEST ( poh_slot_obj_id != ULONG_MAX );
1452
+ ctx -> current_slot = fd_fseq_join ( fd_topo_obj_laddr ( topo , poh_slot_obj_id ) );
1453
+
1442
1454
fd_repair_settime ( ctx -> repair , fd_log_wallclock () );
1443
1455
fd_repair_start ( ctx -> repair );
1444
1456
0 commit comments