diff --git a/Makefile b/Makefile index ebc5081ac32..b633db70307 100644 --- a/Makefile +++ b/Makefile @@ -203,6 +203,7 @@ clean: devtools: # Notice! If you adding new binary - add it also to cmd/hack/binary-deps/main.go file $(GOBUILD) -o $(GOBIN)/gencodec github.com/fjl/gencodec + $(GOBUILD) -o $(GOBIN)/mockgen go.uber.org/mock/mockgen $(GOBUILD) -o $(GOBIN)/abigen ./cmd/abigen $(GOBUILD) -o $(GOBIN)/codecgen github.com/ugorji/go/codec/codecgen PATH=$(GOBIN):$(PATH) go generate ./common diff --git a/cmd/rpcdaemon/graphql/graph/schema.resolvers.go b/cmd/rpcdaemon/graphql/graph/schema.resolvers.go index 0bf234f9c0c..5ea84cbcedf 100644 --- a/cmd/rpcdaemon/graphql/graph/schema.resolvers.go +++ b/cmd/rpcdaemon/graphql/graph/schema.resolvers.go @@ -161,7 +161,6 @@ func (r *queryResolver) Block(ctx context.Context, number *string, hash *string) // Blocks is the resolver for the blocks field. func (r *queryResolver) Blocks(ctx context.Context, from *uint64, to *uint64) ([]*model.Block, error) { - var blocks []*model.Block const maxBlocks = 25 diff --git a/erigon-lib/direct/sentry_client_mock.go b/erigon-lib/direct/sentry_client_mock.go index bc5ab2f3f46..198fd149175 100644 --- a/erigon-lib/direct/sentry_client_mock.go +++ b/erigon-lib/direct/sentry_client_mock.go @@ -10,14 +10,14 @@ package direct import ( - context "context" - reflect "reflect" - - sentry "github.com/ledgerwatch/erigon-lib/gointerfaces/sentry" - types "github.com/ledgerwatch/erigon-lib/gointerfaces/types" - gomock "go.uber.org/mock/gomock" - grpc "google.golang.org/grpc" - emptypb "google.golang.org/protobuf/types/known/emptypb" + "context" + "reflect" + + "github.com/ledgerwatch/erigon-lib/gointerfaces/sentry" + "github.com/ledgerwatch/erigon-lib/gointerfaces/types" + "go.uber.org/mock/gomock" + "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/emptypb" ) // MockSentryClient is a mock of SentryClient interface. diff --git a/erigon-lib/go.mod b/erigon-lib/go.mod index 292f7a68626..7b66a4a6892 100644 --- a/erigon-lib/go.mod +++ b/erigon-lib/go.mod @@ -27,7 +27,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/hashicorp/golang-lru/v2 v2.0.6 github.com/holiman/uint256 v1.2.3 - github.com/matryer/moq v0.3.3 + github.com/matryer/moq v0.3.4 github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 github.com/pelletier/go-toml/v2 v2.1.0 github.com/prometheus/client_golang v1.18.0 @@ -129,7 +129,7 @@ require ( golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.16.0 // indirect + golang.org/x/tools v0.17.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/libc v1.24.1 // indirect diff --git a/erigon-lib/go.sum b/erigon-lib/go.sum index b06d91f0085..5ea19433598 100644 --- a/erigon-lib/go.sum +++ b/erigon-lib/go.sum @@ -266,8 +266,8 @@ github.com/ledgerwatch/secp256k1 v1.0.0 h1:Usvz87YoTG0uePIV8woOof5cQnLXGYa162rFf github.com/ledgerwatch/secp256k1 v1.0.0/go.mod h1:SPmqJFciiF/Q0mPt2jVs2dTr/1TZBTIA+kPMmKgBAak= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/matryer/moq v0.3.3 h1:pScMH9VyrdT4S93yiLpVyU8rCDqGQr24uOyBxmktG5Q= -github.com/matryer/moq v0.3.3/go.mod h1:RJ75ZZZD71hejp39j4crZLsEDszGk6iH4v4YsWFKH4s= +github.com/matryer/moq v0.3.4 h1:czCFIos9rI2tyOehN9ktc/6bQ76N9J4xQ2n3dk063ac= +github.com/matryer/moq v0.3.4/go.mod h1:wqm9QObyoMuUtH81zFfs3EK6mXEcByy+TjvSROOXJ2U= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -602,8 +602,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/erigon-lib/gointerfaces/downloader/downloader.pb.go b/erigon-lib/gointerfaces/downloader/downloader.pb.go index a8623ad7eea..dec9c5cc3e7 100644 --- a/erigon-lib/gointerfaces/downloader/downloader.pb.go +++ b/erigon-lib/gointerfaces/downloader/downloader.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: downloader/downloader.proto diff --git a/erigon-lib/gointerfaces/execution/execution.pb.go b/erigon-lib/gointerfaces/execution/execution.pb.go index ecbc561d689..28dea395889 100644 --- a/erigon-lib/gointerfaces/execution/execution.pb.go +++ b/erigon-lib/gointerfaces/execution/execution.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: execution/execution.proto diff --git a/erigon-lib/gointerfaces/execution/execution_grpc.pb.go b/erigon-lib/gointerfaces/execution/execution_grpc.pb.go index 9c82d255e47..ad2dd2fa94c 100644 --- a/erigon-lib/gointerfaces/execution/execution_grpc.pb.go +++ b/erigon-lib/gointerfaces/execution/execution_grpc.pb.go @@ -43,7 +43,6 @@ const ( // ExecutionClient is the client API for Execution service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. - type ExecutionClient interface { // Chain Putters. InsertBlocks(ctx context.Context, in *InsertBlocksRequest, opts ...grpc.CallOption) (*InsertionResult, error) diff --git a/erigon-lib/gointerfaces/remote/ethbackend.pb.go b/erigon-lib/gointerfaces/remote/ethbackend.pb.go index 684abb61c33..118a3f7637d 100644 --- a/erigon-lib/gointerfaces/remote/ethbackend.pb.go +++ b/erigon-lib/gointerfaces/remote/ethbackend.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: remote/ethbackend.proto diff --git a/erigon-lib/gointerfaces/remote/kv.pb.go b/erigon-lib/gointerfaces/remote/kv.pb.go index d1a45b6c44a..a7f659b68a7 100644 --- a/erigon-lib/gointerfaces/remote/kv.pb.go +++ b/erigon-lib/gointerfaces/remote/kv.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: remote/kv.proto diff --git a/erigon-lib/gointerfaces/sentinel/sentinel.pb.go b/erigon-lib/gointerfaces/sentinel/sentinel.pb.go index 82645d30d52..3feb6ff3531 100644 --- a/erigon-lib/gointerfaces/sentinel/sentinel.pb.go +++ b/erigon-lib/gointerfaces/sentinel/sentinel.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: p2psentinel/sentinel.proto diff --git a/erigon-lib/gointerfaces/sentry/sentry.pb.go b/erigon-lib/gointerfaces/sentry/sentry.pb.go index c577830dfb6..87710f44292 100644 --- a/erigon-lib/gointerfaces/sentry/sentry.pb.go +++ b/erigon-lib/gointerfaces/sentry/sentry.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: p2psentry/sentry.proto diff --git a/erigon-lib/gointerfaces/txpool/mining.pb.go b/erigon-lib/gointerfaces/txpool/mining.pb.go index a8993b510d4..20b3e0bd7e6 100644 --- a/erigon-lib/gointerfaces/txpool/mining.pb.go +++ b/erigon-lib/gointerfaces/txpool/mining.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: txpool/mining.proto diff --git a/erigon-lib/gointerfaces/txpool/txpool.pb.go b/erigon-lib/gointerfaces/txpool/txpool.pb.go index 3034cfcbdf8..52b9b02def1 100644 --- a/erigon-lib/gointerfaces/txpool/txpool.pb.go +++ b/erigon-lib/gointerfaces/txpool/txpool.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: txpool/txpool.proto diff --git a/erigon-lib/gointerfaces/types/types.pb.go b/erigon-lib/gointerfaces/types/types.pb.go index 56db8678d37..adae72de7ec 100644 --- a/erigon-lib/gointerfaces/types/types.pb.go +++ b/erigon-lib/gointerfaces/types/types.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.31.0 // protoc v4.24.2 // source: types/types.proto diff --git a/erigon-lib/tools.go b/erigon-lib/tools.go index 5188efdc85c..11fd6f3620b 100644 --- a/erigon-lib/tools.go +++ b/erigon-lib/tools.go @@ -27,5 +27,6 @@ import ( _ "github.com/ledgerwatch/interfaces/types" _ "github.com/ledgerwatch/interfaces/web3" _ "github.com/matryer/moq" + _ "go.uber.org/mock/mockgen/model" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" ) diff --git a/tools.go b/tools.go index 40a333de9d3..7a30b753e67 100644 --- a/tools.go +++ b/tools.go @@ -21,5 +21,6 @@ import ( _ "github.com/erigontech/mdbx-go/mdbxdist" _ "github.com/fjl/gencodec" _ "github.com/ugorji/go/codec/codecgen" + _ "go.uber.org/mock/mockgen/model" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" )