Skip to content

Commit

Permalink
Add dualTransmission meta validation
Browse files Browse the repository at this point in the history
  • Loading branch information
george-dorin committed Nov 27, 2024
1 parent 2d71cfc commit 2dd6da0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/services/job/orm.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ func (o *orm) CreateJob(ctx context.Context, jb *Job) error {
return errors.New("invalid transmitter address in dual transmission config")
}

_, ok = dualTransmissionConfig["meta"].(map[string][]string)
if !ok || !common.IsHexAddress(dtTransmitterAddress) {
return errors.New("invalid dual transmission config")
}

if err = validateKeyStoreMatchForRelay(ctx, jb.OCR2OracleSpec.Relay, tx.keyStore, dtTransmitterAddress); err != nil {
return errors.Wrap(err, "unknown dual transmission transmitterAddress")
}
Expand Down

0 comments on commit 2dd6da0

Please sign in to comment.