File tree Expand file tree Collapse file tree
src/state_transition/epoch Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,12 +30,16 @@ pub fn processInactivityUpdates(
3030 const FLAG_PREV_TARGET_ATTESTER_UNSLASHED = attester_status_utils .FLAG_PREV_TARGET_ATTESTER_UNSLASHED ;
3131 const FLAG_ELIGIBLE_ATTESTER = attester_status_utils .FLAG_ELIGIBLE_ATTESTER ;
3232
33- // TODO for TreeView, we may want to convert to value and back
3433 var inactivity_scores = try state .inactivityScores ();
34+ try inactivity_scores .commit ();
35+ const allocator = state .baseView ().allocator ;
36+ const inactivity_scores_values = try inactivity_scores .getAll (allocator );
37+ defer allocator .free (inactivity_scores_values );
38+ std .debug .assert (flags .len <= inactivity_scores_values .len );
3539 for (0.. flags .len ) | i | {
3640 const flag = flags [i ];
3741 if (hasMarkers (flag , FLAG_ELIGIBLE_ATTESTER )) {
38- var inactivity_score = try inactivity_scores . get ( i ) ;
42+ var inactivity_score = inactivity_scores_values [ i ] ;
3943
4044 const prev_inactivity_score = inactivity_score ;
4145 if (hasMarkers (flag , FLAG_PREV_TARGET_ATTESTER_UNSLASHED )) {
You can’t perform that action at this time.
0 commit comments