@@ -232,33 +232,38 @@ func (v *ValidatorSyncer) insertEvents(ctx context.Context, tx pgx.Tx, events []
232
232
return nil
233
233
}
234
234
235
- func checkStaticRegistrationMessageFields (msg * validatorregistry.RegistrationMessage , chainID uint64 , validatorRegistryAddress common.Address , log zerolog.Logger ) bool {
235
+ func checkStaticRegistrationMessageFields (
236
+ msg * validatorregistry.RegistrationMessage ,
237
+ chainID uint64 ,
238
+ validatorRegistryAddress common.Address ,
239
+ logger zerolog.Logger ,
240
+ ) bool {
236
241
if msg .Version != ValidatorRegistrationMessageVersion {
237
- log .Warn ().
242
+ logger .Warn ().
238
243
Uint8 ("version" , msg .Version ).
239
244
Uint8 ("expected-version" , ValidatorRegistrationMessageVersion ).
240
245
Uint64 ("validator-index" , msg .ValidatorIndex ).
241
246
Msg ("ignoring registration message with invalid version" )
242
247
return false
243
248
}
244
249
if msg .ChainID != chainID {
245
- log .Warn ().
250
+ logger .Warn ().
246
251
Uint64 ("chain-id" , msg .ChainID ).
247
252
Uint64 ("expected-chain-id" , chainID ).
248
253
Uint64 ("validator-index" , msg .ValidatorIndex ).
249
254
Msg ("ignoring registration message with invalid chain ID" )
250
255
return false
251
256
}
252
257
if msg .ValidatorRegistryAddress != validatorRegistryAddress {
253
- log .Warn ().
258
+ logger .Warn ().
254
259
Hex ("validator-registry-address" , msg .ValidatorRegistryAddress .Bytes ()).
255
260
Hex ("expected-validator-registry-address" , validatorRegistryAddress .Bytes ()).
256
261
Uint64 ("validator-index" , msg .ValidatorIndex ).
257
262
Msg ("ignoring registration message with invalid validator registry address" )
258
263
return false
259
264
}
260
265
if msg .ValidatorIndex > math .MaxInt64 {
261
- log .Warn ().
266
+ logger .Warn ().
262
267
Uint64 ("validator-index" , msg .ValidatorIndex ).
263
268
Msg ("ignoring registration message with invalid validator index" )
264
269
return false
0 commit comments