File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ pub fn get_attestation_performance<T: BeaconChainTypes>(
83
83
}
84
84
85
85
// Either use the global validator set, or the specified index.
86
+ //
87
+ // Does no further validation of the indices, so in the event an index has not yet been
88
+ // activated or does not yet exist (according to the head state), it will return all fields as
89
+ // `false`.
86
90
let index_range = if target. to_lowercase ( ) == "global" {
87
91
chain
88
92
. with_head ( |head| Ok ( ( 0 ..head. beacon_state . validators ( ) . len ( ) as u64 ) . collect ( ) ) )
@@ -159,11 +163,17 @@ pub fn get_attestation_performance<T: BeaconChainTypes>(
159
163
160
164
let is_active = summary. is_active_unslashed_in_previous_epoch ( index) ;
161
165
162
- let received_source_reward = summary. is_previous_epoch_source_attester ( index) ?;
166
+ let received_source_reward = summary
167
+ . is_previous_epoch_source_attester ( index)
168
+ . unwrap_or ( false ) ;
163
169
164
- let received_head_reward = summary. is_previous_epoch_head_attester ( index) ?;
170
+ let received_head_reward = summary
171
+ . is_previous_epoch_head_attester ( index)
172
+ . unwrap_or ( false ) ;
165
173
166
- let received_target_reward = summary. is_previous_epoch_target_attester ( index) ?;
174
+ let received_target_reward = summary
175
+ . is_previous_epoch_target_attester ( index)
176
+ . unwrap_or ( false ) ;
167
177
168
178
let inclusion_delay = summary
169
179
. previous_epoch_inclusion_info ( index)
You can’t perform that action at this time.
0 commit comments