File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
lib/ethereum-sync-protocol/src Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -182,21 +182,21 @@ pub fn validate_light_client_update<C: ChainSpec, V: BlsVerify>(
182
182
183
183
// Verify that if the update contains the next sync committee, and the signature periods do match,
184
184
// next sync committees match too.
185
- if let ( Some ( next_sync_committee ) , Some ( stored_next_sync_committee ) ) =
186
- ( & update . next_sync_committee , & next_sync_committee)
187
- {
188
- if update_attested_period == stored_period {
185
+ if let Some ( update_next_sync_committee ) = & update . next_sync_committee {
186
+ if let Some ( stored_next_sync_committee ) = & next_sync_committee
187
+ && update_attested_period == stored_period
188
+ {
189
189
ensure (
190
- & next_sync_committee == stored_next_sync_committee,
190
+ & update_next_sync_committee == stored_next_sync_committee,
191
191
Error :: NextSyncCommitteeMismatch {
192
192
expected : stored_next_sync_committee. aggregate_pubkey ,
193
- found : next_sync_committee . aggregate_pubkey ,
193
+ found : update_next_sync_committee . aggregate_pubkey ,
194
194
} ,
195
195
) ?;
196
196
}
197
197
// This validates the given next sync committee against the attested header's state root.
198
198
validate_merkle_branch (
199
- & TryInto :: < altair:: SyncCommitteeSsz < C > > :: try_into ( next_sync_committee . clone ( ) )
199
+ & TryInto :: < altair:: SyncCommitteeSsz < C > > :: try_into ( update_next_sync_committee . clone ( ) )
200
200
. unwrap ( )
201
201
. tree_hash_root ( ) ,
202
202
update
You can’t perform that action at this time.
0 commit comments