@@ -530,11 +530,9 @@ restore_slot_ctx( fd_replay_tile_ctx_t * ctx,
530
530
531
531
fd_exec_slot_ctx_t * recovered_slot_ctx = fd_exec_slot_ctx_recover ( ctx -> slot_ctx ,
532
532
manifest_global );
533
- FD_LOG_WARNING (("ASDF" ));
534
533
if ( !recovered_slot_ctx ) {
535
534
FD_LOG_ERR (( "Failed to restore slot context from snapshot manifest!" ));
536
535
}
537
- FD_LOG_WARNING (("ASDF" ));
538
536
}
539
537
540
538
static void
@@ -697,10 +695,9 @@ init_after_snapshot( fd_replay_tile_ctx_t * ctx,
697
695
memset ( block_id , 0 , sizeof (fd_hash_t ) );
698
696
block_id -> key [0 ] = UCHAR_MAX ; /* TODO: would be good to have the actual block id of the snapshot slot */
699
697
700
- fd_vote_accounts_global_t const * vote_accounts = fd_bank_curr_epoch_stakes_locking_query ( ctx -> slot_ctx -> bank );
701
-
702
- fd_vote_accounts_pair_global_t_mapnode_t * vote_accounts_pool = fd_vote_accounts_vote_accounts_pool_join ( vote_accounts );
703
- fd_vote_accounts_pair_global_t_mapnode_t * vote_accounts_root = fd_vote_accounts_vote_accounts_root_join ( vote_accounts );
698
+ fd_vote_states_t const * vote_states = fd_bank_vote_states_locking_query ( ctx -> slot_ctx -> bank );
699
+ fd_vote_state_map_t * vote_state_map = fd_vote_states_get_map ( vote_states );
700
+ fd_vote_state_ele_t * vote_state_pool = fd_vote_states_get_pool ( vote_states );
704
701
705
702
/* Send to tower tile */
706
703
@@ -709,15 +706,16 @@ init_after_snapshot( fd_replay_tile_ctx_t * ctx,
709
706
memcpy ( chunk_laddr , block_id , sizeof (fd_hash_t ) );
710
707
711
708
ulong off = sizeof (fd_hash_t );
712
- for ( fd_vote_accounts_pair_global_t_mapnode_t * curr = fd_vote_accounts_pair_global_t_map_minimum ( vote_accounts_pool , vote_accounts_root );
713
- curr ;
714
- curr = fd_vote_accounts_pair_global_t_map_successor ( vote_accounts_pool , curr ) ) {
709
+ for ( fd_vote_state_map_iter_t iter = fd_vote_state_map_iter_init ( vote_state_map , vote_state_pool );
710
+ !fd_vote_state_map_iter_done ( iter , vote_state_map , vote_state_pool );
711
+ iter = fd_vote_state_map_iter_next ( iter , vote_state_map , vote_state_pool ) ) {
712
+ fd_vote_state_ele_t const * vote_state = fd_vote_state_map_iter_ele_const ( iter , vote_state_map , vote_state_pool );
715
713
716
- if ( FD_UNLIKELY ( curr -> elem . stake > 0UL ) ) {
717
- memcpy ( chunk_laddr + off , & curr -> elem . key , sizeof (fd_pubkey_t ) );
714
+ if ( FD_UNLIKELY ( vote_state -> stake > 0UL ) ) {
715
+ memcpy ( chunk_laddr + off , & vote_state -> vote_account , sizeof (fd_pubkey_t ) );
718
716
off += sizeof (fd_pubkey_t );
719
717
720
- memcpy ( chunk_laddr + off , & curr -> elem . stake , sizeof (ulong ) );
718
+ memcpy ( chunk_laddr + off , & vote_state -> stake , sizeof (ulong ) );
721
719
off += sizeof (ulong );
722
720
}
723
721
}
@@ -726,14 +724,15 @@ init_after_snapshot( fd_replay_tile_ctx_t * ctx,
726
724
}
727
725
728
726
fd_bank_hash_cmp_t * bank_hash_cmp = ctx -> bank_hash_cmp ;
729
- for ( fd_vote_accounts_pair_global_t_mapnode_t * curr = fd_vote_accounts_pair_global_t_map_minimum ( vote_accounts_pool , vote_accounts_root );
730
- curr ;
731
- curr = fd_vote_accounts_pair_global_t_map_successor ( vote_accounts_pool , curr ) ) {
732
- bank_hash_cmp -> total_stake += curr -> elem .stake ;
727
+ for ( fd_vote_state_map_iter_t iter = fd_vote_state_map_iter_init ( vote_state_map , vote_state_pool );
728
+ !fd_vote_state_map_iter_done ( iter , vote_state_map , vote_state_pool );
729
+ iter = fd_vote_state_map_iter_next ( iter , vote_state_map , vote_state_pool ) ) {
730
+ fd_vote_state_ele_t const * vote_state = fd_vote_state_map_iter_ele_const ( iter , vote_state_map , vote_state_pool );
731
+ bank_hash_cmp -> total_stake += vote_state -> stake ;
733
732
}
734
733
bank_hash_cmp -> watermark = snapshot_slot ;
735
734
736
- fd_bank_curr_epoch_stakes_end_locking_query ( ctx -> slot_ctx -> bank );
735
+ fd_bank_vote_states_end_locking_query ( ctx -> slot_ctx -> bank );
737
736
738
737
ulong root = snapshot_slot ;
739
738
if ( FD_LIKELY ( root > fd_fseq_query ( ctx -> published_wmark ) ) ) {
0 commit comments