-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flamenco: no more custom votes anywhere #4202
Conversation
src/flamenco/stakes/fd_stakes.c
Outdated
// Insert into the temporary vote states cache | ||
fd_vote_info_pair_t_mapnode_t * new_vote_state_node = fd_vote_info_pair_t_map_acquire( temp_info->vote_states_pool ); | ||
fd_memcpy( &new_vote_state_node->elem.account, vote_account_pubkey, sizeof(fd_pubkey_t) ); | ||
fd_memcpy( &new_vote_state_node->elem.state, vote_state, sizeof(fd_vote_state_versioned_t) ); | ||
fd_vote_info_pair_t_map_insert( temp_info->vote_states_pool, &temp_info->vote_states_root, new_vote_state_node ); | ||
} else { | ||
FD_LOG_NOTICE(("WHATS HAPPENING HERE")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question
src/flamenco/stakes/fd_stakes.c
Outdated
@@ -347,13 +345,15 @@ fd_refresh_vote_accounts( fd_exec_slot_ctx_t * slot_ctx, | |||
fd_pubkey_t const * vote_account_pubkey = &elem->elem.key; | |||
fd_vote_state_versioned_t vote_state[1] = {0}; | |||
if( FD_LIKELY( !deserialize_and_update_vote_account( slot_ctx, elem, root, pool, vote_account_pubkey, vote_state, runtime_spad ) ) ) { | |||
FD_TEST( vote_state->inner.current.epoch_credits ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
switch( vsv->discriminant ) { | ||
case fd_vote_state_versioned_enum_v0_23_5: | ||
node_pubkey = vsv->inner.v0_23_5.node_pubkey; | ||
last_ts_slot = vsv->inner.v0_23_5.last_timestamp.slot; | ||
break; | ||
case fd_vote_state_versioned_enum_v1_14_11: | ||
node_pubkey = vsv->inner.v1_14_11.node_pubkey; | ||
last_ts_slot = vsv->inner.v1_14_11.last_timestamp.slot; | ||
break; | ||
case fd_vote_state_versioned_enum_current: | ||
node_pubkey = vsv->inner.current.node_pubkey; | ||
last_ts_slot = vsv->inner.current.last_timestamp.slot; | ||
break; | ||
default: | ||
__builtin_unreachable(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be nice in future prs to define getters for these fields, possibly in fd types
ff19b92
to
a7a3645
Compare
No description provided.