diff --git a/pipeline/resolve.go b/pipeline/resolve.go index 0dc47a40..f4bfab3c 100644 --- a/pipeline/resolve.go +++ b/pipeline/resolve.go @@ -212,7 +212,10 @@ func resolveStartBlockNum(ctx context.Context, req *pbsubstreamsrpc.Request, res return 0, "", nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("StartCursor is invalid: LIB %d greater than Block %d", cursor.LIB.Num(), cursor.Block.Num())) } - reorgJunctionBlock, head, err := resolveCursor(ctx, cursor) + resolveCtx, resolveCancel := context.WithCancel(ctx) + defer resolveCancel() + + reorgJunctionBlock, head, err := resolveCursor(resolveCtx, cursor) if err != nil { return 0, "", nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("cannot resolve StartCursor %q: %s", cursor, err.Error())) }