prysm-pulse/tools/analyzers/ineffassign/testdata/ctx_assignment.go

19 lines
346 B
Go
Raw Normal View History

package testdata
import (
"context"
"fmt"
)
// This returns the head state.
// It does a full copy on head state for immutability.
func headState(ctx context.Context) {
ctx, span := StartSpan(ctx, "blockChain.headState")
fmt.Print(span)
return
}
func StartSpan(ctx context.Context, name string) (context.Context, int) {
return ctx, 42
}