Skip to content

Commit

Permalink
Fix race
Browse files Browse the repository at this point in the history
  • Loading branch information
samsondav committed Mar 14, 2024
1 parent 12c35c0 commit e862d3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/services/relay/evm/mercury/orm.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,6 @@ func (o *orm) LatestReport(ctx context.Context, feedID [32]byte, qopts ...pg.QOp
}

func hashPayload(payload []byte) []byte {
h := sha256.New()
return h.Sum(payload)
checksum := sha256.Sum256(payload)
return checksum[:]
}
2 changes: 1 addition & 1 deletion core/services/relay/evm/mercury/persistence_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type PersistenceManager struct {

func NewPersistenceManager(lggr logger.Logger, serverURL string, orm ORM, jobID int32, maxTransmitQueueSize int, flushDeletesFrequency, pruneFrequency time.Duration) *PersistenceManager {
return &PersistenceManager{
lggr: lggr.Named("MercuryPersistenceManager"),
lggr: lggr.Named("MercuryPersistenceManager").With("serverURL", serverURL),
orm: orm,
serverURL: serverURL,
stopCh: make(services.StopChan),
Expand Down

0 comments on commit e862d3d

Please sign in to comment.