prysm-pulse/tools/analyzers/ineffassign/testdata/ctx_assignment.go
Victor Farazdagi ecfdb354a7
Add new static analyzer: ineffassign (#7413)
* test defined

* first working impl

* register analyzer

* cleanup

* removes unused code

* secure rand in slasher/detection/testing

* Updates test

* fixes ineffassign type checks

* one more

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-02 23:56:18 +03:00

19 lines
346 B
Go

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
}