Skip to content

Commit

Permalink
Bind put payloads to external context (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukanus authored Mar 24, 2023
1 parent d6c4bd3 commit e977bc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relay/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (rs *Relay) storeSubmission(ctx context.Context, m *structs.MetricGroup, sb

tPutPayload := time.Now()

if err := rs.d.PutPayload(ctx, sbr.ToPayloadKey(), complete.Payload, rs.config.TTL); err != nil {
if err := rs.d.PutPayload(context.Background(), sbr.ToPayloadKey(), complete.Payload, rs.config.TTL); err != nil {
return false, fmt.Errorf("%w block as payload: %s", ErrStore, err.Error()) // TODO: multiple err wrapping in Go 1.20
}
m.AppendSince(tPutPayload, "submitBlock", "putPayload")
Expand All @@ -227,7 +227,7 @@ func (rs *Relay) storeSubmission(ctx context.Context, m *structs.MetricGroup, sb
newMax = rs.a.AddBlock(&complete)
m.AppendSince(tAddAuction, "submitBlock", "addAuction")

if err = rs.das.PutBuilderBlockSubmission(ctx, complete.Header.Trace, newMax); err != nil {
if err = rs.das.PutBuilderBlockSubmission(context.Background(), complete.Header.Trace, newMax); err != nil {
return newMax, fmt.Errorf("%w block as header: %s", ErrStore, err.Error()) // TODO: multiple err wrapping in Go 1.20
}

Expand Down

0 comments on commit e977bc5

Please sign in to comment.