Skip to content

Commit

Permalink
Add debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
george-dorin committed Nov 28, 2024
1 parent 298ee81 commit e8058f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/services/relay/evm/dual_contract_transmitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func NewOCRDualContractTransmitter(
transmittedEventSig: transmitted.ID,
lp: lp,
contractReader: caller,
lggr: logger.Named(lggr, "OCRContractTransmitter"),
lggr: logger.Named(lggr, "OCRDualContractTransmitter"),
transmitterOptions: &transmitterOps{
reportToEvmTxMeta: reportToEvmTxMetaNoop,
excludeSigs: false,
Expand Down Expand Up @@ -125,7 +125,9 @@ func (oc *dualContractTransmitter) Transmit(ctx context.Context, reportCtx ocrty
return errors.Wrap(err, "abi.Pack failed")
}

transactionErr := errors.Wrap(oc.transmitter.CreateEthTransaction(ctx, oc.contractAddress, payload, txMeta), "failed to send Eth transaction")
transactionErr := errors.Wrap(oc.transmitter.CreateEthTransaction(ctx, oc.contractAddress, payload, txMeta), "failed to send primary Eth transaction")

oc.lggr.Debugw("Created primary transaction", "error", transactionErr)

// Secondary transmission
secondaryPayload, err := oc.dualTransmissionABI.Pack("transmitSecondary", rawReportCtx, []byte(report), rs, ss, vs)
Expand All @@ -134,7 +136,7 @@ func (oc *dualContractTransmitter) Transmit(ctx context.Context, reportCtx ocrty
}

err = errors.Wrap(oc.transmitter.CreateSecondaryEthTransaction(ctx, secondaryPayload, txMeta), "failed to send secondary Eth transaction")

oc.lggr.Debugw("Created secondary transaction", "error", err)
return errors2.Join(transactionErr, err)
}

Expand Down

0 comments on commit e8058f8

Please sign in to comment.