From 2dd6da0e2afd3fcda8280e8d119c61a17c8a1a89 Mon Sep 17 00:00:00 2001 From: george-dorin Date: Wed, 27 Nov 2024 17:19:44 +0200 Subject: [PATCH] Add dualTransmission meta validation --- core/services/job/orm.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/services/job/orm.go b/core/services/job/orm.go index 92ec9b2e83c..514ab2aac7c 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -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") }