Skip to content

Commit f739e7e

Browse files
replay: fix behaviour when we fail to fetch vote state from funk
1 parent 10e026d commit f739e7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/discof/replay/fd_replay_tile.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,12 @@ buffer_vote_towers( fd_replay_tile_t * ctx,
617617
if( FD_UNLIKELY( vote_state->stake == 0 ) ) continue; /* skip unstaked vote accounts */
618618
fd_pubkey_t const * vote_account_pubkey = &vote_state->vote_account;
619619
if( FD_UNLIKELY( ctx->vote_tower_out_len >= (FD_REPLAY_TOWER_VOTE_ACC_MAX-1UL) ) ) FD_LOG_ERR(( "vote_tower_out_len too large" ));
620-
if( FD_UNLIKELY( fd_replay_out_vote_tower_from_funk( ctx->accdb,
621-
xid,
622-
vote_account_pubkey,
623-
vote_state->stake,
624-
&ctx->vote_tower_out[ctx->vote_tower_out_len++] ) ) ) {
620+
fd_replay_tower_t * vote_tower_out = &ctx->vote_tower_out[ ctx->vote_tower_out_len ];
621+
int err = fd_replay_out_vote_tower_from_funk( ctx->accdb, xid, vote_account_pubkey, vote_state->stake, vote_tower_out );
622+
if( FD_UNLIKELY( err ) ) {
625623
FD_LOG_DEBUG(( "failed to get vote state for vote account %s", FD_BASE58_ENC_32_ALLOCA( vote_account_pubkey->uc ) ));
624+
} else {
625+
ctx->vote_tower_out_len++;
626626
}
627627
}
628628
fd_bank_vote_states_prev_end_locking_query( bank );

0 commit comments

Comments
 (0)