From 08d27b768c819a9e5005d7ea27340a5502799c51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 08:24:54 +0000 Subject: [PATCH 01/16] build(deps): Bump github.com/vektra/mockery/v2 from 2.41.0 to 2.46.2 Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.41.0 to 2.46.2. - [Release notes](https://github.com/vektra/mockery/releases) - [Changelog](https://github.com/vektra/mockery/blob/master/docs/changelog.md) - [Commits](https://github.com/vektra/mockery/compare/v2.41.0...v2.46.2) --- updated-dependencies: - dependency-name: github.com/vektra/mockery/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 3 ++- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a59367852b..74d2bd5232 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,7 @@ module github.com/dashpay/tenderdash go 1.22 +toolchain go1.23.2 require ( github.com/BurntSushi/toml v1.3.2 @@ -52,7 +53,7 @@ require ( github.com/creachadair/taskgroup v0.3.2 github.com/go-pkgz/jrpc v0.2.0 github.com/google/go-cmp v0.6.0 - github.com/vektra/mockery/v2 v2.41.0 + github.com/vektra/mockery/v2 v2.46.2 ) require ( diff --git a/go.sum b/go.sum index 7a9a021a71..ac7e5195c9 100644 --- a/go.sum +++ b/go.sum @@ -942,8 +942,8 @@ github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvni github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= -github.com/vektra/mockery/v2 v2.41.0 h1:miv6vazLja/sknB/Rv1ZyKzxOG24QJgIPNN1renwkrs= -github.com/vektra/mockery/v2 v2.41.0/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= +github.com/vektra/mockery/v2 v2.46.2 h1:bpUncWvkiDzqn+aWwt4dY1aS0F8Ob4k8+WJrWU/Kh4s= +github.com/vektra/mockery/v2 v2.46.2/go.mod h1:dDivqi0ShM8A29mLgZn13yZ14MdXlTM4V360u8JDWCQ= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= From ed05eeaf1aaff0c636f749645cf723ddaca79bcc Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:31:03 +0200 Subject: [PATCH 02/16] chore: update deps --- .github/workflows/check-generated.yml | 2 +- go.mod | 3 ++- scripts/mockery_generate.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 3f555aed1e..96e876f8dc 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -31,7 +31,7 @@ jobs: run: | set -euo pipefail - readonly MOCKERY=2.41.0 # N.B. no leading "v" + readonly MOCKERY=2.46.2 # N.B. no leading "v" curl -sL "https://github.com/vektra/mockery/releases/download/v${MOCKERY}/mockery_${MOCKERY}_Linux_x86_64.tar.gz" | tar -C /usr/local/bin -xzf - make mockery 2>/dev/null diff --git a/go.mod b/go.mod index 74d2bd5232..36ee9dc4bd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,7 @@ module github.com/dashpay/tenderdash -go 1.22 +go 1.23 + toolchain go1.23.2 require ( diff --git a/scripts/mockery_generate.sh b/scripts/mockery_generate.sh index 1d00aef13f..022f8c1367 100755 --- a/scripts/mockery_generate.sh +++ b/scripts/mockery_generate.sh @@ -6,7 +6,7 @@ # runs the published Docker container. This legerdemain is so that the CI build # and a local build can work off the same script. # -VERSION=v2.41.0 +VERSION=v2.46.2 if ! mockery --version 2>/dev/null | grep $VERSION; then echo "Please install mockery $VERSION" From 35627d951c635b0e9786d60414e34f46e0747f30 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:37:22 +0200 Subject: [PATCH 03/16] build(deps): Upgrade go to 1.23 --- .github/actions/bls/action.yml | 2 +- .github/workflows/build.yml | 6 +++--- .github/workflows/check-generated.yml | 4 ++-- .github/workflows/e2e.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 2 +- DOCKER/Dockerfile | 2 +- README.md | 2 +- docs/tutorials/go-built-in.md | 4 ++-- docs/tutorials/go.md | 2 +- go.mod | 2 +- test/e2e/docker/Dockerfile | 2 +- test/fuzz/README.md | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/actions/bls/action.yml b/.github/actions/bls/action.yml index ff0c6c0e65..442dc78b89 100644 --- a/.github/actions/bls/action.yml +++ b/.github/actions/bls/action.yml @@ -15,7 +15,7 @@ runs: steps: - uses: actions/setup-go@v2 with: - go-version: "1.22" + go-version: "1.23" - uses: actions/checkout@v2 with: submodules: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc64049a83..633e5fd3f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.22" + go-version: "1.23" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -54,7 +54,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.22" + go-version: "1.23" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -79,7 +79,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.22" + go-version: "1.23" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 3f555aed1e..851259d025 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.22" + go-version: "1.23" - uses: actions/checkout@v4 @@ -49,7 +49,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.22" + go-version: "1.23" - uses: actions/checkout@v4 with: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 1328683812..78d73d22c0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.22" + go-version: "1.23" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.7.1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 261056eb48..2aef6d7497 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,7 +32,7 @@ jobs: submodules: true - uses: actions/setup-go@v5.0.1 with: - go-version: "^1.22" + go-version: "^1.23" - uses: technote-space/get-diff-action@v6 with: PATTERNS: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b982c6c528..972ac03089 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.22" + go-version: "1.23" - name: Build uses: goreleaser/goreleaser-action@v6 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b84ea85ac1..2bb4cc2ada 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.22" + go-version: "1.23" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 6092fa6007..cf8f111753 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -5,7 +5,7 @@ # * image - creates final image of minimal size ARG ALIPNE_VERSION=3.19 -ARG GOLANG_VERSION=1.22 +ARG GOLANG_VERSION=1.23 ################################# # STAGE 1: install dependencies # ################################# diff --git a/README.md b/README.md index 11484783d5..4f4ee8cfcb 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ requirements if installing from source. | Requirement | Notes | |-------------|------------------| -| Go version | Go1.22 or higher | +| Go version | Go1.23 or higher | ## Versioning diff --git a/docs/tutorials/go-built-in.md b/docs/tutorials/go-built-in.md index 3568be7736..9048130e15 100644 --- a/docs/tutorials/go-built-in.md +++ b/docs/tutorials/go-built-in.md @@ -43,7 +43,7 @@ Verify that you have the latest version of Go installed: ```sh $ go version -go version go1.22.x darwin/amd64 +go version go1.23.x darwin/amd64 ``` Note that the exact patch number may differ as Go releases come out. @@ -596,7 +596,7 @@ This will populate the `go.mod` with a release number followed by a hash for Ten ```go module github.com//kvstore -go 1.22 +go 1.23 require ( github.com/dgraph-io/badger/v3 v3.2103.2 diff --git a/docs/tutorials/go.md b/docs/tutorials/go.md index 25b4deb6a4..8ca6f23a8c 100644 --- a/docs/tutorials/go.md +++ b/docs/tutorials/go.md @@ -454,7 +454,7 @@ This will populate the `go.mod` with a release number followed by a hash for Ten ```go module github.com//kvstore -go 1.22 +go 1.23 require ( github.com/dgraph-io/badger/v3 v3.2103.2 diff --git a/go.mod b/go.mod index a59367852b..83b35dd872 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/dashpay/tenderdash -go 1.22 +go 1.23 require ( github.com/BurntSushi/toml v1.3.2 diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index db5c852c71..6bc47707fe 100644 --- a/test/e2e/docker/Dockerfile +++ b/test/e2e/docker/Dockerfile @@ -1,6 +1,6 @@ ## Stage 1 and 2 is copied from /DOCKER/Dockerfile ARG ALIPNE_VERSION=3.19 -ARG GOLANG_VERSION=1.22 +ARG GOLANG_VERSION=1.23 ################################# # STAGE 1: install dependencies # ################################# diff --git a/test/fuzz/README.md b/test/fuzz/README.md index 2a16020eba..c0d1414924 100644 --- a/test/fuzz/README.md +++ b/test/fuzz/README.md @@ -1,7 +1,7 @@ # fuzz Fuzzing for various packages in Tendermint using the fuzzing infrastructure included in -Go 1.22. +Go 1.23. Inputs: From e924ddc7d15e8fd12b6898c85931b7c027c166a9 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:40:38 +0200 Subject: [PATCH 04/16] chore: trigger workflow --- internal/state/mocks/store.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go index 006a8b4e03..3dd34f27d3 100644 --- a/internal/state/mocks/store.go +++ b/internal/state/mocks/store.go @@ -1,5 +1,6 @@ // Code generated by mockery. DO NOT EDIT. + package mocks import ( From f7430f287b1539d0bd28c57225f9a08b4dd24d2e Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:06:48 +0200 Subject: [PATCH 05/16] chore: make mockery --- internal/p2p/client/mocks/block_client.go | 4 ++-- internal/p2p/mocks/connection.go | 17 +++++++---------- internal/p2p/mocks/transport.go | 7 ++----- internal/state/mocks/store.go | 1 - libs/store/mocks/store.go | 4 ++-- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/internal/p2p/client/mocks/block_client.go b/internal/p2p/client/mocks/block_client.go index 5d1e5a90ce..5afae1d30a 100644 --- a/internal/p2p/client/mocks/block_client.go +++ b/internal/p2p/client/mocks/block_client.go @@ -68,7 +68,7 @@ func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { } // Send provides a mock function with given fields: ctx, msg -func (_m *BlockClient) Send(ctx context.Context, msg interface{}) error { +func (_m *BlockClient) Send(ctx context.Context, msg any) error { ret := _m.Called(ctx, msg) if len(ret) == 0 { @@ -76,7 +76,7 @@ func (_m *BlockClient) Send(ctx context.Context, msg interface{}) error { } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, any) error); ok { r0 = rf(ctx, msg) } else { r0 = ret.Error(0) diff --git a/internal/p2p/mocks/connection.go b/internal/p2p/mocks/connection.go index 879950b6a1..8555ef9e34 100644 --- a/internal/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -5,10 +5,7 @@ package mocks import ( context "context" - conn "github.com/dashpay/tenderdash/internal/p2p/conn" - crypto "github.com/dashpay/tenderdash/crypto" - mock "github.com/stretchr/testify/mock" p2p "github.com/dashpay/tenderdash/internal/p2p" @@ -97,23 +94,23 @@ func (_m *Connection) LocalEndpoint() p2p.Endpoint { } // ReceiveMessage provides a mock function with given fields: _a0 -func (_m *Connection) ReceiveMessage(_a0 context.Context) (conn.ChannelID, []byte, error) { +func (_m *Connection) ReceiveMessage(_a0 context.Context) (p2p.ChannelID, []byte, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for ReceiveMessage") } - var r0 conn.ChannelID + var r0 p2p.ChannelID var r1 []byte var r2 error - if rf, ok := ret.Get(0).(func(context.Context) (conn.ChannelID, []byte, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context) (p2p.ChannelID, []byte, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(context.Context) conn.ChannelID); ok { + if rf, ok := ret.Get(0).(func(context.Context) p2p.ChannelID); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(conn.ChannelID) + r0 = ret.Get(0).(p2p.ChannelID) } if rf, ok := ret.Get(1).(func(context.Context) []byte); ok { @@ -152,7 +149,7 @@ func (_m *Connection) RemoteEndpoint() p2p.Endpoint { } // SendMessage provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Connection) SendMessage(_a0 context.Context, _a1 conn.ChannelID, _a2 []byte) error { +func (_m *Connection) SendMessage(_a0 context.Context, _a1 p2p.ChannelID, _a2 []byte) error { ret := _m.Called(_a0, _a1, _a2) if len(ret) == 0 { @@ -160,7 +157,7 @@ func (_m *Connection) SendMessage(_a0 context.Context, _a1 conn.ChannelID, _a2 [ } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, conn.ChannelID, []byte) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, p2p.ChannelID, []byte) error); ok { r0 = rf(_a0, _a1, _a2) } else { r0 = ret.Error(0) diff --git a/internal/p2p/mocks/transport.go b/internal/p2p/mocks/transport.go index 6fbaccacaa..5ffc747d2a 100644 --- a/internal/p2p/mocks/transport.go +++ b/internal/p2p/mocks/transport.go @@ -5,11 +5,8 @@ package mocks import ( context "context" - conn "github.com/dashpay/tenderdash/internal/p2p/conn" - - mock "github.com/stretchr/testify/mock" - p2p "github.com/dashpay/tenderdash/internal/p2p" + mock "github.com/stretchr/testify/mock" ) // Transport is an autogenerated mock type for the Transport type @@ -48,7 +45,7 @@ func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error) { } // AddChannelDescriptors provides a mock function with given fields: _a0 -func (_m *Transport) AddChannelDescriptors(_a0 []*conn.ChannelDescriptor) { +func (_m *Transport) AddChannelDescriptors(_a0 []*p2p.ChannelDescriptor) { _m.Called(_a0) } diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go index 3dd34f27d3..006a8b4e03 100644 --- a/internal/state/mocks/store.go +++ b/internal/state/mocks/store.go @@ -1,6 +1,5 @@ // Code generated by mockery. DO NOT EDIT. - package mocks import ( diff --git a/libs/store/mocks/store.go b/libs/store/mocks/store.go index f8d1989f64..4a2b232fb5 100644 --- a/libs/store/mocks/store.go +++ b/libs/store/mocks/store.go @@ -8,7 +8,7 @@ import ( ) // Store is an autogenerated mock type for the Store type -type Store[K comparable, V interface{}] struct { +type Store[K comparable, V any] struct { mock.Mock } @@ -168,7 +168,7 @@ func (_m *Store[K, V]) Update(key K, updates ...store.UpdateFunc[K, V]) { // NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. -func NewStore[K comparable, V interface{}](t interface { +func NewStore[K comparable, V any](t interface { mock.TestingT Cleanup(func()) }) *Store[K, V] { From 19ddf576b6237c9cb4e0ad7b36a3bf0f49ae882b Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:09:54 +0200 Subject: [PATCH 06/16] chore: fix typo --- DOCKER/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index cf8f111753..57b3b6b083 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -4,12 +4,12 @@ # * compile - builds final binaries # * image - creates final image of minimal size -ARG ALIPNE_VERSION=3.19 +ARG ALPINE_VERSION=3.19 ARG GOLANG_VERSION=1.23 ################################# # STAGE 1: install dependencies # ################################# -FROM golang:${GOLANG_VERSION}-alpine${ALIPNE_VERSION} AS base +FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION} AS base RUN apk update && \ apk upgrade && \ @@ -55,7 +55,7 @@ RUN rm -r /src/tenderdash/third_party && ln -s /src/bls/third_party /src/tenderd ######################## # STAGE 4: FINAL IMAGE # ######################## -FROM alpine:${ALIPNE_VERSION} AS image +FROM alpine:${ALPINE_VERSION} AS image LABEL maintainer="developers@dash.org" From 809073e7ac62dd405c5013f3256d562d910122e3 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:23:40 +0200 Subject: [PATCH 07/16] build(deps): upgrade golangci-lint to 1.61 --- .github/workflows/lint.yml | 2 +- Makefile | 2 +- go.mod | 183 ++++++++------- go.sum | 448 ++++++++++++++++--------------------- 4 files changed, 292 insertions(+), 343 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2aef6d7497..ea36a25b26 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -53,7 +53,7 @@ jobs: # Required: the version of golangci-lint is required and # must be specified without patch version: we always use the # latest patch version. - version: v1.55 + version: v1.61 args: --timeout 10m github-token: ${{ secrets.github_token }} if: env.GIT_DIFF diff --git a/Makefile b/Makefile index 288a5741de..9dd5f0384e 100644 --- a/Makefile +++ b/Makefile @@ -292,7 +292,7 @@ format: lint: @echo "--> Running linter" - go run github.com/golangci/golangci-lint/cmd/golangci-lint run + go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 run .PHONY: lint DESTINATION = ./index.html.md diff --git a/go.mod b/go.mod index 0439c383e7..0cce90ef68 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/dashpay/tenderdash go 1.23 require ( - github.com/BurntSushi/toml v1.3.2 + github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c github.com/adlio/schema v1.3.3 github.com/btcsuite/btcd v0.22.1 github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce @@ -18,7 +18,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.4 github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/golangci/golangci-lint v1.55.2 + github.com/golangci/golangci-lint v1.61.0 github.com/google/btree v1.1.2 // indirect github.com/google/gopacket v1.1.19 github.com/google/orderedcode v0.0.1 @@ -40,9 +40,9 @@ require ( github.com/stretchr/testify v1.9.0 github.com/tendermint/tm-db v0.6.6 golang.org/x/crypto v0.28.0 - golang.org/x/net v0.27.0 + golang.org/x/net v0.28.0 golang.org/x/sync v0.8.0 - google.golang.org/grpc v1.64.1 + google.golang.org/grpc v1.66.0 pgregory.net/rapid v0.4.8 ) @@ -63,14 +63,17 @@ require ( connectrpc.com/connect v1.16.2 // indirect connectrpc.com/otelconnect v0.7.1 // indirect dario.cat/mergo v1.0.0 // indirect - github.com/4meepo/tagalign v1.3.3 // indirect - github.com/Abirdcfly/dupword v0.0.13 // indirect - github.com/Antonboom/testifylint v0.2.3 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect - github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect - github.com/alecthomas/go-check-sumtype v0.1.3 // indirect - github.com/alexkohler/nakedret/v2 v2.0.2 // indirect + github.com/4meepo/tagalign v1.3.4 // indirect + github.com/Abirdcfly/dupword v0.1.1 // indirect + github.com/Antonboom/testifylint v1.4.3 // indirect + github.com/Crocmagnon/fatcontext v0.5.2 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect + github.com/alecthomas/go-check-sumtype v0.1.4 // indirect + github.com/alexkohler/nakedret/v2 v2.0.4 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect + github.com/bombsimon/wsl/v4 v4.4.1 // indirect github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect @@ -78,10 +81,11 @@ require ( github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee // indirect github.com/bufbuild/protovalidate-go v0.6.3 // indirect github.com/bufbuild/protoyaml-go v0.1.9 // indirect - github.com/butuzov/mirror v1.1.0 // indirect - github.com/catenacyber/perfsprint v0.2.0 // indirect - github.com/ccojocar/zxcvbn-go v1.0.1 // indirect + github.com/butuzov/mirror v1.2.0 // indirect + github.com/catenacyber/perfsprint v0.7.1 // indirect + github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/chigopher/pathlib v0.19.1 // indirect + github.com/ckaznocha/intrange v0.2.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/dashpay/dashd-go/btcutil v1.2.0 // indirect @@ -95,65 +99,71 @@ require ( github.com/docker/docker-credential-helpers v0.8.2 // indirect github.com/felixge/fgprof v0.9.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/ghostiam/protogetter v0.2.3 // indirect + github.com/ghostiam/protogetter v0.3.6 // indirect github.com/go-chi/chi/v5 v5.1.0 // indirect github.com/go-chi/render v1.0.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-pkgz/expirable-cache v0.0.3 // indirect github.com/go-pkgz/rest v1.5.0 // indirect - github.com/go-viper/mapstructure/v2 v2.0.0 // indirect + github.com/go-viper/mapstructure/v2 v2.1.0 // indirect github.com/gofrs/uuid/v5 v5.2.0 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.1 // indirect + github.com/golangci/modinfo v0.3.4 // indirect + github.com/golangci/plugin-module-register v0.1.1 // indirect github.com/google/cel-go v0.20.1 // indirect github.com/google/go-containerregistry v0.20.1 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8 // indirect + github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/jdx/go-netrc v1.0.0 // indirect github.com/jinzhu/copier v0.3.5 // indirect - github.com/kkHAIKE/contextcheck v1.1.4 // indirect - github.com/macabu/inamedparam v0.1.2 // indirect + github.com/jjti/go-spancheck v0.6.2 // indirect + github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect + github.com/kkHAIKE/contextcheck v1.1.5 // indirect + github.com/lasiar/canonicalheader v1.1.1 // indirect + github.com/macabu/inamedparam v0.1.3 // indirect github.com/maratori/testableexamples v1.0.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/nunnatsa/ginkgolinter v0.14.1 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/nunnatsa/ginkgolinter v0.16.2 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect + github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect github.com/rivo/uniseg v0.2.0 // indirect + github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect - github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/tendermint v0.34.21 // indirect github.com/timonwong/loggercheck v0.9.4 // indirect github.com/vbatts/tar-split v0.11.5 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect - github.com/ykadowak/zerologlint v0.1.3 // indirect - go-simpler.org/sloglint v0.1.2 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect + go-simpler.org/musttag v0.12.2 // indirect + go-simpler.org/sloglint v0.7.2 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel v1.29.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect - go.tmz.dev/musttag v0.7.2 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a // indirect + go.opentelemetry.io/otel/trace v1.29.0 // indirect + go.uber.org/automaxprocs v1.5.3 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect ) require ( 4d63.com/gochecknoglobals v0.2.1 // indirect - github.com/Antonboom/errname v0.1.12 // indirect - github.com/Antonboom/nilnil v0.1.7 // indirect + github.com/Antonboom/errname v0.1.13 // indirect + github.com/Antonboom/nilnil v0.1.9 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/DataDog/zstd v1.4.5 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/Masterminds/semver v1.5.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect @@ -163,93 +173,85 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v3 v3.4.0 // indirect github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect - github.com/butuzov/ireturn v0.2.2 // indirect + github.com/butuzov/ireturn v0.3.0 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/daixiang0/gci v0.11.2 // indirect + github.com/daixiang0/gci v0.13.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/denis-tingaikin/go-header v0.4.3 // indirect + github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/dgraph-io/badger/v2 v2.2007.2 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/esimonov/ifshort v1.0.4 // indirect - github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/ettle/strcase v0.2.0 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/fatih/structtag v1.2.0 // indirect - github.com/firefart/nonamedreturns v1.0.4 // indirect + github.com/firefart/nonamedreturns v1.0.5 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/go-critic/go-critic v0.9.0 // indirect + github.com/go-critic/go-critic v0.11.4 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect - github.com/go-toolsmith/astequal v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.2.0 // indirect github.com/go-toolsmith/astfmt v1.1.0 // indirect github.com/go-toolsmith/astp v1.1.0 // indirect github.com/go-toolsmith/strparse v1.1.0 // indirect github.com/go-toolsmith/typep v1.1.0 // indirect github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/flock v0.8.1 // indirect - github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect + github.com/gofrs/flock v0.12.1 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect - github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect - github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect - github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect - github.com/golangci/misspell v0.4.1 // indirect - github.com/golangci/revgrep v0.5.2 // indirect - github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect + github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 // indirect + github.com/golangci/misspell v0.6.0 // indirect + github.com/golangci/revgrep v0.5.3 // indirect + github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect + github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect github.com/gostaticanalysis/comment v1.4.2 // indirect github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jgautheron/goconst v1.6.0 // indirect + github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/julz/importas v0.1.0 // indirect - github.com/kisielk/errcheck v1.6.3 // indirect - github.com/kisielk/gotool v1.0.0 // indirect + github.com/kisielk/errcheck v1.7.0 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.8 // indirect + github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect - github.com/ldez/gomoddirectives v0.2.3 // indirect + github.com/ldez/gomoddirectives v0.2.4 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect - github.com/leonklingele/grouper v1.1.1 // indirect + github.com/leonklingele/grouper v1.1.2 // indirect github.com/lufeee/execinquery v1.2.1 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/maratori/testpackage v1.1.1 // indirect github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.3.4 // indirect + github.com/mgechev/revive v1.3.9 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moricho/tparallel v0.3.1 // indirect + github.com/moricho/tparallel v0.3.2 // indirect github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nishanths/exhaustive v0.11.0 // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -259,27 +261,26 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.4.5 // indirect + github.com/polyfloyd/go-errorlint v1.6.0 // indirect github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a github.com/prometheus/common v0.37.0 github.com/prometheus/procfs v0.8.0 // indirect - github.com/quasilyte/go-ruleguard v0.4.0 // indirect + github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/ryancurrah/gomodguard v1.3.0 // indirect + github.com/ryancurrah/gomodguard v1.3.5 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect - github.com/securego/gosec/v2 v2.18.2 // indirect + github.com/securego/gosec/v2 v2.21.2 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sivchari/nosnakecase v1.7.0 // indirect - github.com/sivchari/tenv v1.7.1 // indirect + github.com/sivchari/tenv v1.10.0 // indirect github.com/sonatard/noctx v0.0.2 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/spf13/afero v1.9.3 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect @@ -288,36 +289,34 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.15 // indirect + github.com/tetafro/godot v1.4.17 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect + github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect - github.com/ultraware/whitespace v0.0.5 // indirect - github.com/uudashr/gocognit v1.1.2 // indirect + github.com/ultraware/whitespace v0.1.1 // indirect + github.com/uudashr/gocognit v1.1.3 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/yagipy/maintidx v1.0.0 // indirect - github.com/yeya24/promlinter v0.2.0 // indirect - gitlab.com/bosi/decorder v0.4.1 // indirect + github.com/yeya24/promlinter v0.3.0 // indirect + gitlab.com/bosi/decorder v0.4.2 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/mod v0.19.0 // indirect + golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect + golang.org/x/mod v0.21.0 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/term v0.25.0 golang.org/x/text v0.19.0 // indirect - golang.org/x/tools v0.23.0 // indirect + golang.org/x/tools v0.24.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.4.6 // indirect - mvdan.cc/gofumpt v0.5.0 // indirect - mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect - mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect + honnef.co/go/tools v0.5.1 // indirect + mvdan.cc/gofumpt v0.7.0 // indirect + mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect ) require ( @@ -328,6 +327,6 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/tendermint/go-amino v0.16.0 github.com/tyler-smith/go-bip39 v1.1.0 - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 - golang.org/x/time v0.5.0 + golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e + golang.org/x/time v0.6.0 ) diff --git a/go.sum b/go.sum index ac7e5195c9..0c13d91704 100644 --- a/go.sum +++ b/go.sum @@ -13,7 +13,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -24,9 +23,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -44,7 +40,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= connectrpc.com/otelconnect v0.7.1 h1:scO5pOb0i4yUE66CnNrHeK1x51yq0bE0ehPg6WvzXJY= @@ -52,22 +47,24 @@ connectrpc.com/otelconnect v0.7.1/go.mod h1:dh3bFgHBTb2bkqGCeVVOtHJreSns7uu9wwL2 dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/4meepo/tagalign v1.3.3 h1:ZsOxcwGD/jP4U/aw7qeWu58i7dwYemfy5Y+IF1ACoNw= -github.com/4meepo/tagalign v1.3.3/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= -github.com/Abirdcfly/dupword v0.0.13 h1:SMS17YXypwP000fA7Lr+kfyBQyW14tTT+nRv9ASwUUo= -github.com/Abirdcfly/dupword v0.0.13/go.mod h1:Ut6Ue2KgF/kCOawpW4LnExT+xZLQviJPE4klBPMK/5Y= -github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClDcQY= -github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= -github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow= -github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= -github.com/Antonboom/testifylint v0.2.3 h1:MFq9zyL+rIVpsvLX4vDPLojgN7qODzWsrnftNX2Qh60= -github.com/Antonboom/testifylint v0.2.3/go.mod h1:IYaXaOX9NbfAyO+Y04nfjGI8wDemC1rUyM/cYolz018= +github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= +github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= +github.com/Abirdcfly/dupword v0.1.1 h1:Bsxe0fIw6OwBtXMIncaTxCLHYO5BB+3mcsR5E8VXloY= +github.com/Abirdcfly/dupword v0.1.1/go.mod h1:B49AcJdTYYkpd4HjgAcutNGG9HZ2JWwKunH9Y2BA6sM= +github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHOVvM= +github.com/Antonboom/errname v0.1.13/go.mod h1:uWyefRYRN54lBg6HseYCFhs6Qjcy41Y3Jl/dVhA87Ns= +github.com/Antonboom/nilnil v0.1.9 h1:eKFMejSxPSA9eLSensFmjW2XTgTwJMjZ8hUHtV4s/SQ= +github.com/Antonboom/nilnil v0.1.9/go.mod h1:iGe2rYwCq5/Me1khrysB4nwI7swQvjclR8/YRPl5ihQ= +github.com/Antonboom/testifylint v1.4.3 h1:ohMt6AHuHgttaQ1xb6SSnxCeK4/rnK7KKzbvs7DmEck= +github.com/Antonboom/testifylint v1.4.3/go.mod h1:+8Q9+AOLsz5ZiQiiYujJKs9mNz398+M6UgslP4qgJLA= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Crocmagnon/fatcontext v0.5.2 h1:vhSEg8Gqng8awhPju2w7MKHqMlg4/NI+gSDHtR3xgwA= +github.com/Crocmagnon/fatcontext v0.5.2/go.mod h1:87XhRMaInHP44Q7Tlc7jkgKKB7kZAOPiDkFMdKCC+74= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= @@ -75,18 +72,18 @@ github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 h1:3ZBs7LAezy8gh0uECsA6CGU43FF3zsx5f4eah5FxTMA= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0/go.mod h1:rZLTje5A9kFBe0pzhpe2TdhRniBF++PRHQuRpR8esVc= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0/go.mod h1:ONJg5sxcbsdQQ4pOW8TGdTidT2TMAUy/2Xhr8mrYaao= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= @@ -94,8 +91,8 @@ github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= -github.com/alecthomas/go-check-sumtype v0.1.3 h1:M+tqMxB68hcgccRXBMVCPI4UJ+QUfdSx0xdbypKCqA8= -github.com/alecthomas/go-check-sumtype v0.1.3/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= +github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= +github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -103,8 +100,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/nakedret/v2 v2.0.2 h1:qnXuZNvv3/AxkAb22q/sEsEpcA99YxLFACDtEw9TPxE= -github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= +github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= +github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= @@ -125,8 +122,8 @@ github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJ github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= -github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= -github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= +github.com/bombsimon/wsl/v4 v4.4.1 h1:jfUaCkN+aUpobrMO24zwyAMwMAV5eSziCkOKEauOLdw= +github.com/bombsimon/wsl/v4 v4.4.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= @@ -158,14 +155,14 @@ github.com/bufbuild/protovalidate-go v0.6.3 h1:wxQyzW035zM16Binbaz/nWAzS12dRIXhZ github.com/bufbuild/protovalidate-go v0.6.3/go.mod h1:J4PtwP9Z2YAGgB0+o+tTWEDtLtXvz/gfhFZD8pbzM/U= github.com/bufbuild/protoyaml-go v0.1.9 h1:anV5UtF1Mlvkkgp4NWA6U/zOnJFng8Orq4Vf3ZUQHBU= github.com/bufbuild/protoyaml-go v0.1.9/go.mod h1:KCBItkvZOK/zwGueLdH1Wx1RLyFn5rCH7YjQrdty2Wc= -github.com/butuzov/ireturn v0.2.2 h1:jWI36dxXwVrI+RnXDwux2IZOewpmfv930OuIRfaBUJ0= -github.com/butuzov/ireturn v0.2.2/go.mod h1:RfGHUvvAuFFxoHKf4Z8Yxuh6OjlCw1KvR2zM1NFHeBk= -github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= -github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= -github.com/catenacyber/perfsprint v0.2.0 h1:azOocHLscPjqXVJ7Mf14Zjlkn4uNua0+Hcg1wTR6vUo= -github.com/catenacyber/perfsprint v0.2.0/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= -github.com/ccojocar/zxcvbn-go v1.0.1 h1:+sxrANSCj6CdadkcMnvde/GWU1vZiiXRbqYSCalV4/4= -github.com/ccojocar/zxcvbn-go v1.0.1/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= +github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= +github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= +github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= +github.com/butuzov/mirror v1.2.0/go.mod h1:DqZZDtzm42wIAIyHXeN8W/qb1EPlb9Qn/if9icBOpdQ= +github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= +github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= +github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= +github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -176,8 +173,8 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= @@ -195,9 +192,10 @@ github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObk github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= +github.com/ckaznocha/intrange v0.2.0 h1:FykcZuJ8BD7oX93YbO1UY9oZtkRbp+1/kJcDjkefYLs= +github.com/ckaznocha/intrange v0.2.0/go.mod h1:r5I7nUlAAG56xmkOpw4XVr16BXhwYTUdcuRFeevn1oE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -230,8 +228,8 @@ github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/daixiang0/gci v0.11.2 h1:Oji+oPsp3bQ6bNNgX30NBAVT18P4uBH4sRZnlOlTj7Y= -github.com/daixiang0/gci v0.11.2/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= +github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c= +github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/dashpay/bls-signatures/go-bindings v0.0.0-20230207105415-06df92693ac8 h1:v4K3CiDoFY1gjcWL/scRcwzyjBwh8TVG3ek8cWolK1g= github.com/dashpay/bls-signatures/go-bindings v0.0.0-20230207105415-06df92693ac8/go.mod h1:auvGS60NBZ+a21aCCQh366PdsjDvHinsCvl28VrYPu4= github.com/dashpay/dashd-go v0.25.0 h1:tswVRmM2fLHC/JhpuAZ5Oa0TpOO6L+tqiE+QLTCvIQc= @@ -248,8 +246,8 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= -github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= -github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= +github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= @@ -283,24 +281,21 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= -github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= -github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= +github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= +github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= @@ -308,8 +303,8 @@ github.com/felixge/fgprof v0.9.4 h1:ocDNwMFlnA0NU0zSB3I52xkO4sFXk80VK9lXjLClu88= github.com/felixge/fgprof v0.9.4/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= -github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= +github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6tUTYIdRA= +github.com/firefart/nonamedreturns v1.0.5/go.mod h1:gHJjDqhGM4WyPt639SOZs+G89Ko7QKH5R5BhnO6xJhw= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -324,8 +319,8 @@ github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrt github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghostiam/protogetter v0.2.3 h1:qdv2pzo3BpLqezwqfGDLZ+nHEYmc5bUpIdsMbBVwMjw= -github.com/ghostiam/protogetter v0.2.3/go.mod h1:KmNLOsy1v04hKbvZs8EfGI1fk39AgTdRDxWNYPfXVc4= +github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= +github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= github.com/go-chi/chi v4.1.1+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec= github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= @@ -333,8 +328,8 @@ github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/render v1.0.1 h1:4/5tis2cKaNdnv9zFLfXzcquC9HbeZgCnxGnKrltBS8= github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= -github.com/go-critic/go-critic v0.9.0 h1:Pmys9qvU3pSML/3GEQ2Xd9RZ/ip+aXHKILuxczKGV/U= -github.com/go-critic/go-critic v0.9.0/go.mod h1:5P8tdXL7m/6qnyG6oRAlYLORvoXH0WDypYgAEmagT40= +github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU= +github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -359,18 +354,22 @@ github.com/go-pkgz/jrpc v0.2.0 h1:CLy/eZyekjraVrxZV18N2R1mYLMJ/nWrgdfyIOGPY/E= github.com/go-pkgz/jrpc v0.2.0/go.mod h1:wd8vtQ4CgtCnuqua6x2b1SKIgv0VSOh5Dn0uUITbiUE= github.com/go-pkgz/rest v1.5.0 h1:C8SxXcXza4GiUUAn/95iCkvoIrGbS30qpwK19iqlrWQ= github.com/go-pkgz/rest v1.5.0/go.mod h1:nQaM3RhSTUAmbBZWY4hfe4buyeC9VckvhoCktiQXJxI= +github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= +github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= @@ -382,8 +381,8 @@ github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQi github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= -github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= -github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= +github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -393,8 +392,8 @@ github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM= github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -405,8 +404,8 @@ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2V github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -440,26 +439,22 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= -github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= -github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= -github.com/golangci/golangci-lint v1.55.2 h1:yllEIsSJ7MtlDBwDJ9IMBkyEUz2fYE0b5B8IUgO1oP8= -github.com/golangci/golangci-lint v1.55.2/go.mod h1:H60CZ0fuqoTwlTvnbyjhpZPWp7KmsjwV2yupIMiMXbM= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g= -github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= -github.com/golangci/revgrep v0.5.2 h1:EndcWoRhcnfj2NHQ+28hyuXpLMF+dQmCN+YaeeIl4FU= -github.com/golangci/revgrep v0.5.2/go.mod h1:bjAMA+Sh/QUfTDcHzxfyHxr4xKvllVr/0sCv2e7jJHA= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME= +github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9/go.mod h1:Oesb/0uFAyWoaw1U1qS5zyjCg5NP9C9iwjnI4tIsXEE= +github.com/golangci/golangci-lint v1.61.0 h1:VvbOLaRVWmyxCnUIMTbf1kDsaJbTzH20FAMXTAlQGu8= +github.com/golangci/golangci-lint v1.61.0/go.mod h1:e4lztIrJJgLPhWvFPDkhiMwEFRrWlmFbrZea3FsJyN8= +github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= +github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= +github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA= +github.com/golangci/modinfo v0.3.4/go.mod h1:wytF1M5xl9u0ij8YSvhkEVPP3M5Mc7XLl1pxH3B2aUM= +github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= +github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc= +github.com/golangci/revgrep v0.5.3 h1:3tL7c1XBMtWHHqVpS5ChmiAAoe4PF/d5+ULzV9sLAzs= +github.com/golangci/revgrep v0.5.3/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -491,7 +486,6 @@ github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -501,13 +495,10 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8 h1:ssNFCCVmib/GQSzx3uCWyfMgOamLGWuGqlMS77Y1m3Y= -github.com/google/pprof v0.0.0-20240722153945-304e4f0156b8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= +github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -516,9 +507,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= +github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= @@ -548,8 +538,8 @@ github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -562,7 +552,6 @@ github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -571,8 +560,8 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jgautheron/goconst v1.6.0 h1:gbMLWKRMkzAc6kYsQL6/TxaoBUg3Jm9LSF/Ih1ADWGA= -github.com/jgautheron/goconst v1.6.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= +github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+TBDg= github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= @@ -581,6 +570,8 @@ github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jjti/go-spancheck v0.6.2 h1:iYtoxqPMzHUPp7St+5yA8+cONdyXD3ug6KK15n7Pklk= +github.com/jjti/go-spancheck v0.6.2/go.mod h1:+X7lvIrR5ZdUTkxFYqzJ0abr8Sb5LOo80uOhWNqIrYA= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg= @@ -598,13 +589,14 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/karamaru-alpha/copyloopvar v1.1.0 h1:x7gNyKcC2vRBO1H2Mks5u1VxQtYvFiym7fCjIP8RPos= +github.com/karamaru-alpha/copyloopvar v1.1.0/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= -github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= +github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= -github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= +github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= +github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= @@ -612,7 +604,6 @@ github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -624,25 +615,27 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.8 h1:Ul2KsqtzFxTlSU7IP0JusWlLiNqQaloB9vguyjbE558= -github.com/kunwardeep/paralleltest v1.0.8/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs= +github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= -github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= -github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/lasiar/canonicalheader v1.1.1 h1:wC+dY9ZfiqiPwAexUApFush/csSPXeIi4QqyxXmng8I= +github.com/lasiar/canonicalheader v1.1.1/go.mod h1:cXkb3Dlk6XXy+8MVQnF23CYKWlyA7kfQhSw2CcZtZb0= +github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= +github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= -github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= -github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= +github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= -github.com/macabu/inamedparam v0.1.2 h1:RR5cnayM6Q7cDhQol32DE2BGAPGMnffJ31LFE+UklaU= -github.com/macabu/inamedparam v0.1.2/go.mod h1:Xg25QvY7IBRl1KLPV9Rbml8JOMZtF/iAkNkmV7eQgjw= +github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= +github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= @@ -660,8 +653,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -670,10 +663,8 @@ github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/revive v1.3.4 h1:k/tO3XTaWY4DEHal9tWBkkUMJYO/dLDVyMmAQxmIMDc= -github.com/mgechev/revive v1.3.4/go.mod h1:W+pZCMu9qj8Uhfs1iJMQsEFLRozUfvwFwqVvRbSNLVw= +github.com/mgechev/revive v1.3.9 h1:18Y3R4a2USSBF+QZKFQwVkBROUda7uoBlkEuBD+YD1A= +github.com/mgechev/revive v1.3.9/go.mod h1:+uxEIr5UH0TjXWHTno3xh4u7eg6jDpXKzQccA9UGhHU= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -689,8 +680,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= -github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= +github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= +github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mroth/weightedrand v0.4.1 h1:rHcbUBopmi/3x4nnrvwGJBhX9d0vk+KgoLUZeDP6YyI= @@ -700,12 +691,12 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= -github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.14.1 h1:khx0CqR5U4ghsscjJ+lZVthp3zjIFytRXPTaQ/TMiyA= -github.com/nunnatsa/ginkgolinter v0.14.1/go.mod h1:nY0pafUSst7v7F637e7fymaMlQqI9c0Wka2fGsDkzWg= +github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= +github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -721,13 +712,13 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.28.1 h1:MijcGUbfYuznzK/5R4CPNoUP/9Xvuo20sXfEm6XxoTA= -github.com/onsi/gomega v1.28.1/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= +github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -743,15 +734,15 @@ github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnh github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/copy v1.11.0 h1:OKBD80J/mLBrwnzXqGtFCzprFSGioo30JcmR4APsNwc= -github.com/otiai10/copy v1.11.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= @@ -762,11 +753,12 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.4.5 h1:70YWmMy4FgRHehGNOUask3HtSFSOLKgmDn7ryNe7LqI= -github.com/polyfloyd/go-errorlint v1.4.5/go.mod h1:sIZEbFoDOCnTYYZoVkjc4hTnM459tuWA9H/EkdXwsKk= +github.com/polyfloyd/go-errorlint v1.6.0 h1:tftWV9DE7txiFzPpztTAwyoRLKNj9gpVm2cg8/OwcYY= +github.com/polyfloyd/go-errorlint v1.6.0/go.mod h1:HR7u8wuP1kb1NeN1zqTd1ZMlqUKPPHF+Id4vIPvDqVw= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= @@ -793,8 +785,10 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= -github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= +github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 h1:+Wl/0aFp0hpuHM3H//KMft64WQ1yX9LdJY64Qm/gFCo= +github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= +github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= +github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= @@ -805,8 +799,8 @@ github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -816,21 +810,23 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= -github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= +github.com/ryancurrah/gomodguard v1.3.5 h1:cShyguSwUEeC0jS7ylOiG/idnd1TpJ1LfHGpV3oJmPU= +github.com/ryancurrah/gomodguard v1.3.5/go.mod h1:MXlEPQRxgfPQa62O8wzK3Ozbkv9Rkqr+wKjSxTdsNJE= github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.24.0 h1:MKNzmXtGh5N0y74Z/CIaJh4GlB364l0K1RUT08WSWAc= -github.com/sashamelentyev/usestdlibvars v1.24.0/go.mod h1:9cYkq+gYJ+a5W2RPdhfaSCnTVUC1OQP/bSiiBhq3OZE= +github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32ZrusyurIGT9E5wAvXQnI= +github.com/sashamelentyev/usestdlibvars v1.27.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/securego/gosec/v2 v2.18.2 h1:DkDt3wCiOtAHf1XkiXZBhQ6m6mK/b9T/wD257R3/c+I= -github.com/securego/gosec/v2 v2.18.2/go.mod h1:xUuqSF6i0So56Y2wwohWAmB07EdBkUN6crbLlHwbyJs= +github.com/securego/gosec/v2 v2.21.2 h1:deZp5zmYf3TWwU7A7cR2+SolbTpZ3HQiwFqnzQyEl3M= +github.com/securego/gosec/v2 v2.21.2/go.mod h1:au33kg78rNseF5PwPnTWhuYBFf534bvJRvOrgZ/bFzU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= @@ -844,10 +840,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= -github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= -github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= -github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= +github.com/sivchari/tenv v1.10.0 h1:g/hzMA+dBCKqGXgW8AV/1xIWhAvDrx0zFKNR48NFMg0= +github.com/sivchari/tenv v1.10.0/go.mod h1:tdY24masnVoZFxYrHv/nD6Tc8FbkEtAQEEziXpyMgqY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= @@ -858,8 +852,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= @@ -904,8 +898,6 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= @@ -920,14 +912,14 @@ github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.15 h1:QzdIs+XB8q+U1WmQEWKHQbKmCw06QuQM7gLx/dky2RM= -github.com/tetafro/godot v1.4.15/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetafro/godot v1.4.17 h1:pGzu+Ye7ZUEFx7LHU0dAKmCOXWsPjl7qA6iMGndsjPs= +github.com/tetafro/godot v1.4.17/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= -github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= -github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= +github.com/tomarrell/wrapcheck/v2 v2.9.0 h1:801U2YCAjLhdN8zhZ/7tdjB3EnAoRlJHt/s+9hijLQ4= +github.com/tomarrell/wrapcheck/v2 v2.9.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= @@ -935,11 +927,11 @@ github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3C github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= -github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= -github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= +github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= -github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= +github.com/uudashr/gocognit v1.1.3 h1:l+a111VcDbKfynh+airAy/DJQKaXh2m9vkoysMPSZyM= +github.com/uudashr/gocognit v1.1.3/go.mod h1:aKH8/e8xbTRBwjbCkwZ8qt4l2EpKXl31KMHgSS+lZ2U= github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/vektra/mockery/v2 v2.46.2 h1:bpUncWvkiDzqn+aWwt4dY1aS0F8Ob4k8+WJrWU/Kh4s= @@ -959,10 +951,10 @@ github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhY github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= -github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= -github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/ykadowak/zerologlint v0.1.3 h1:TLy1dTW3Nuc+YE3bYRPToG1Q9Ej78b5UUN6bjbGdxPE= -github.com/ykadowak/zerologlint v0.1.3/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= +github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -970,12 +962,14 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= -gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= -go-simpler.org/assert v0.6.0 h1:QxSrXa4oRuo/1eHMXSBFHKvJIpWABayzKldqZyugG7E= -go-simpler.org/assert v0.6.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= -go-simpler.org/sloglint v0.1.2 h1:IjdhF8NPxyn0Ckn2+fuIof7ntSnVUAqBFcQRrnG9AiM= -go-simpler.org/sloglint v0.1.2/go.mod h1:2LL+QImPfTslD5muNPydAEYmpXIj6o/WYcqnJjLi4o4= +gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= +gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= +go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= +go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM= +go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= +go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -983,36 +977,35 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 h1:WPpPsAAs8I2rA47v5u0558meKmmwm1Dj99ZbqCV8sZ8= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1/go.mod h1:o5RW5o2pKpJLD5dNTCmjF1DorYwMeFJmb/rKr5sLaa8= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= -go.tmz.dev/musttag v0.7.2 h1:1J6S9ipDbalBSODNT5jCep8dhZyMr4ttnjQagmGYR5s= -go.tmz.dev/musttag v0.7.2/go.mod h1:m6q5NiiSKMnQYokefa2xGoyoXnrswCbJ0AWYzf4Zs28= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= +go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1030,9 +1023,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= @@ -1046,12 +1037,12 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk= +golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= +golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1064,7 +1055,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1073,7 +1063,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= @@ -1082,8 +1071,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1116,8 +1105,6 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -1130,17 +1117,13 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1200,15 +1183,11 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1228,7 +1207,6 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1253,7 +1231,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= @@ -1265,8 +1242,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1315,15 +1292,8 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= @@ -1331,14 +1301,13 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= 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= @@ -1359,16 +1328,12 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1401,17 +1366,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a h1:YIa/rzVqMEokBkPtydCkx1VLmv3An1Uw7w1P1m6EhOY= -google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:AHT0dDg3SoMOgZGnZk29b5xTbPHMoEC8qthmBLJCpys= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a h1:hqK4+jJZXCU4pW7jsAdGOVFIfLHQeV7LaizZKnZ84HI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f h1:b1Ln/PG8orm0SsBbHZWke8dDp2lrCD4jSmfglFpTZbk= +google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:AHT0dDg3SoMOgZGnZk29b5xTbPHMoEC8qthmBLJCpys= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1424,17 +1382,13 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1484,16 +1438,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.4.6 h1:oFEHCKeID7to/3autwsWfnuv69j3NsfcXbvJKuIcep8= -honnef.co/go/tools v0.4.6/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= -mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E= -mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQOxksVMGK7sml4nG57w= -mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= +honnef.co/go/tools v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I= +honnef.co/go/tools v0.5.1/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs= +mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU= +mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo= +mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= +mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= pgregory.net/rapid v0.4.8 h1:d+5SGZWUbJPbl3ss6tmPFqnNeQR6VDOFly+eTjwPiEw= pgregory.net/rapid v0.4.8/go.mod h1:Z5PbWqjvWR1I3UGjvboUuan4fe4ZYEYNLNQLExzCoUs= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 5e84ee7b04e15e86de06429c2f0582d343fa0cc5 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:32:57 +0200 Subject: [PATCH 08/16] build(github): display mockery diff for debugging --- .github/workflows/check-generated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 6e57e2ebae..f84122e4c4 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -35,7 +35,7 @@ jobs: curl -sL "https://github.com/vektra/mockery/releases/download/v${MOCKERY}/mockery_${MOCKERY}_Linux_x86_64.tar.gz" | tar -C /usr/local/bin -xzf - make mockery 2>/dev/null - if ! git diff --stat --exit-code ; then + if ! git diff --exit-code ; then echo ">> ERROR:" echo ">>" echo ">> Generated mocks require update (either Mockery or source files may have changed)." From 1f64216d871af1bafadb7473285f4f9d641bda4b Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:55:56 +0200 Subject: [PATCH 09/16] chore: upgrade mockery config to new format --- .mockery.yaml | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .mockery.yaml diff --git a/.mockery.yaml b/.mockery.yaml new file mode 100644 index 0000000000..5156d7dbb6 --- /dev/null +++ b/.mockery.yaml @@ -0,0 +1,70 @@ +--- +with-expecter: true +dir: "{{.InterfaceDir}}/mocks" +mockname: "{{.InterfaceName}}" +outpkg: "mocks" +filename: "{{.InterfaceName | lower}}.go" +log-level: "warn" +disable-version-string: true +all: false +packages: + github.com/dashpay/tenderdash/abci/client: + interfaces: + Client: + github.com/dashpay/tenderdash/abci/types: + interfaces: + Application: + github.com/dashpay/tenderdash/dash/core: + interfaces: + Client: + github.com/dashpay/tenderdash/internal/consensus: + interfaces: + Gossiper: + github.com/dashpay/tenderdash/internal/consensus/versioned/selectproposer: + interfaces: + ProposerSelector: + github.com/dashpay/tenderdash/internal/evidence: + interfaces: + BlockStore: + github.com/dashpay/tenderdash/internal/mempool: + interfaces: + Mempool: + github.com/dashpay/tenderdash/internal/p2p: + interfaces: + Transport: + Connection: + Channel: + github.com/dashpay/tenderdash/internal/p2p/client: + interfaces: + Client: + BlockClient: + SnapshotClient: + github.com/dashpay/tenderdash/internal/state: + interfaces: + BlockStore: + EvidencePool: + Executor: + github.com/dashpay/tenderdash/internal/state/indexer: + interfaces: + EventSink: + github.com/dashpay/tenderdash/internal/statesync: + interfaces: + StateProvider: + github.com/dashpay/tenderdash/libs/store: + interfaces: + Store: + github.com/dashpay/tenderdash/light/provider: + interfaces: + Provider: + github.com/dashpay/tenderdash/light/rpc: + interfaces: + LightClient: + github.com/dashpay/tenderdash/rpc/client: + interfaces: + Client: + RemoteClient: + github.com/dashpay/tenderdash/types: + interfaces: + Store: + PrivValidator: + BlockEventPublisher: From d4bfcde700aa3b1e472286160da245c7016a795a Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:57:53 +0200 Subject: [PATCH 10/16] chore: update mockery --- Makefile | 2 +- scripts/mockery_generate.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9dd5f0384e..ef44ae5943 100644 --- a/Makefile +++ b/Makefile @@ -336,7 +336,7 @@ build-docker: ############################################################################### mockery: - go generate -run="./scripts/mockery_generate.sh" ./... + ./scripts/mockery_generate.sh .PHONY: mockery ############################################################################### diff --git a/scripts/mockery_generate.sh b/scripts/mockery_generate.sh index 022f8c1367..70668c08f3 100755 --- a/scripts/mockery_generate.sh +++ b/scripts/mockery_generate.sh @@ -13,4 +13,4 @@ if ! mockery --version 2>/dev/null | grep $VERSION; then exit 1 fi -mockery --disable-version-string --case underscore --name "$@" +mockery From 0018a7f10ca076267f8f88235f8c636c716c15d1 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:58:27 +0200 Subject: [PATCH 11/16] chore: regenerate all mocks --- abci/client/mocks/client.go | 551 +++++ abci/types/mocks/application.go | 385 +++ cmd/tenderdash/commands/reindex_event_test.go | 3 +- dash/core/mocks/client.go | 236 ++ internal/blocksync/mocks/block_client.go | 70 - internal/consensus/mocks/fast_sync_reactor.go | 72 - internal/consensus/mocks/gossiper.go | 188 ++ .../selectproposer/mocks/proposer_selector.go | 136 - .../selectproposer/mocks/proposerselector.go | 285 +++ internal/evidence/mocks/block_store.go | 103 - internal/evidence/mocks/blockstore.go | 221 ++ internal/mempool/mocks/mempool.go | 375 +++ internal/p2p/client/mocks/block_client.go | 100 - internal/p2p/client/mocks/blockclient.go | 195 ++ internal/p2p/client/mocks/snapshot_client.go | 141 -- internal/p2p/client/mocks/snapshotclient.go | 270 ++ internal/p2p/mocks/channel.go | 148 ++ internal/p2p/mocks/connection.go | 205 ++ internal/p2p/mocks/transport.go | 229 ++ internal/proxy/mocks/app_conn_mempool.go | 67 - internal/proxy/mocks/app_conn_query.go | 99 - internal/proxy/mocks/app_conn_snapshot.go | 122 - internal/state/indexer/mocks/event_sink.go | 225 -- internal/state/indexer/mocks/eventsink.go | 457 ++++ internal/state/mocks/block_store.go | 313 --- internal/state/mocks/blockstore.go | 738 ++++++ internal/state/mocks/event_sink.go | 168 -- internal/state/mocks/evidence_pool.go | 102 - internal/state/mocks/evidencepool.go | 226 ++ internal/state/mocks/executor.go | 258 ++ internal/state/mocks/store.go | 256 -- internal/statesync/mocks/Metricer.go | 112 - internal/statesync/mocks/state_provider.go | 122 - internal/statesync/mocks/stateprovider.go | 217 ++ libs/store/mocks/store.go | 267 ++ light/provider/mocks/provider.go | 93 + light/rpc/mocks/light_client.go | 160 -- light/rpc/mocks/lightclient.go | 310 +++ rpc/client/mocks/abci_client.go | 245 -- rpc/client/mocks/client.go | 1069 ++++++++ rpc/client/mocks/events_client.go | 59 - rpc/client/mocks/evidence_client.go | 61 - rpc/client/mocks/history_client.go | 119 - rpc/client/mocks/mempool_client.go | 139 -- rpc/client/mocks/network_client.go | 179 -- rpc/client/mocks/remote_client.go | 1092 -------- rpc/client/mocks/remoteclient.go | 2188 +++++++++++++++++ rpc/client/mocks/sign_client.go | 332 --- rpc/client/mocks/status_client.go | 59 - rpc/client/mocks/subscription_client.go | 102 - types/mocks/block_event_publisher.go | 117 - types/mocks/blockeventpublisher.go | 265 ++ types/mocks/priv_validator.go | 290 --- types/mocks/privvalidator.go | 596 +++++ 54 files changed, 9974 insertions(+), 5163 deletions(-) delete mode 100644 internal/blocksync/mocks/block_client.go delete mode 100644 internal/consensus/mocks/fast_sync_reactor.go delete mode 100644 internal/consensus/versioned/selectproposer/mocks/proposer_selector.go create mode 100644 internal/consensus/versioned/selectproposer/mocks/proposerselector.go delete mode 100644 internal/evidence/mocks/block_store.go create mode 100644 internal/evidence/mocks/blockstore.go delete mode 100644 internal/p2p/client/mocks/block_client.go create mode 100644 internal/p2p/client/mocks/blockclient.go delete mode 100644 internal/p2p/client/mocks/snapshot_client.go create mode 100644 internal/p2p/client/mocks/snapshotclient.go delete mode 100644 internal/proxy/mocks/app_conn_mempool.go delete mode 100644 internal/proxy/mocks/app_conn_query.go delete mode 100644 internal/proxy/mocks/app_conn_snapshot.go delete mode 100644 internal/state/indexer/mocks/event_sink.go create mode 100644 internal/state/indexer/mocks/eventsink.go delete mode 100644 internal/state/mocks/block_store.go create mode 100644 internal/state/mocks/blockstore.go delete mode 100644 internal/state/mocks/event_sink.go delete mode 100644 internal/state/mocks/evidence_pool.go create mode 100644 internal/state/mocks/evidencepool.go delete mode 100644 internal/state/mocks/store.go delete mode 100644 internal/statesync/mocks/Metricer.go delete mode 100644 internal/statesync/mocks/state_provider.go create mode 100644 internal/statesync/mocks/stateprovider.go delete mode 100644 light/rpc/mocks/light_client.go create mode 100644 light/rpc/mocks/lightclient.go delete mode 100644 rpc/client/mocks/abci_client.go delete mode 100644 rpc/client/mocks/events_client.go delete mode 100644 rpc/client/mocks/evidence_client.go delete mode 100644 rpc/client/mocks/history_client.go delete mode 100644 rpc/client/mocks/mempool_client.go delete mode 100644 rpc/client/mocks/network_client.go delete mode 100644 rpc/client/mocks/remote_client.go create mode 100644 rpc/client/mocks/remoteclient.go delete mode 100644 rpc/client/mocks/sign_client.go delete mode 100644 rpc/client/mocks/status_client.go delete mode 100644 rpc/client/mocks/subscription_client.go delete mode 100644 types/mocks/block_event_publisher.go create mode 100644 types/mocks/blockeventpublisher.go delete mode 100644 types/mocks/priv_validator.go create mode 100644 types/mocks/privvalidator.go diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 433a0cb60d..a639902562 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -14,6 +14,14 @@ type Client struct { mock.Mock } +type Client_Expecter struct { + mock *mock.Mock +} + +func (_m *Client) EXPECT() *Client_Expecter { + return &Client_Expecter{mock: &_m.Mock} +} + // ApplySnapshotChunk provides a mock function with given fields: _a0, _a1 func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) @@ -44,6 +52,35 @@ func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestAppl return r0, r1 } +// Client_ApplySnapshotChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplySnapshotChunk' +type Client_ApplySnapshotChunk_Call struct { + *mock.Call +} + +// ApplySnapshotChunk is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestApplySnapshotChunk +func (_e *Client_Expecter) ApplySnapshotChunk(_a0 interface{}, _a1 interface{}) *Client_ApplySnapshotChunk_Call { + return &Client_ApplySnapshotChunk_Call{Call: _e.mock.On("ApplySnapshotChunk", _a0, _a1)} +} + +func (_c *Client_ApplySnapshotChunk_Call) Run(run func(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk)) *Client_ApplySnapshotChunk_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestApplySnapshotChunk)) + }) + return _c +} + +func (_c *Client_ApplySnapshotChunk_Call) Return(_a0 *types.ResponseApplySnapshotChunk, _a1 error) *Client_ApplySnapshotChunk_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ApplySnapshotChunk_Call) RunAndReturn(run func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)) *Client_ApplySnapshotChunk_Call { + _c.Call.Return(run) + return _c +} + // CheckTx provides a mock function with given fields: _a0, _a1 func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) @@ -74,6 +111,35 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*type return r0, r1 } +// Client_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' +type Client_CheckTx_Call struct { + *mock.Call +} + +// CheckTx is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestCheckTx +func (_e *Client_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *Client_CheckTx_Call { + return &Client_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} +} + +func (_c *Client_CheckTx_Call) Run(run func(_a0 context.Context, _a1 *types.RequestCheckTx)) *Client_CheckTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestCheckTx)) + }) + return _c +} + +func (_c *Client_CheckTx_Call) Return(_a0 *types.ResponseCheckTx, _a1 error) *Client_CheckTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CheckTx_Call) RunAndReturn(run func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)) *Client_CheckTx_Call { + _c.Call.Return(run) + return _c +} + // Echo provides a mock function with given fields: _a0, _a1 func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) { ret := _m.Called(_a0, _a1) @@ -104,6 +170,35 @@ func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, er return r0, r1 } +// Client_Echo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Echo' +type Client_Echo_Call struct { + *mock.Call +} + +// Echo is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 string +func (_e *Client_Expecter) Echo(_a0 interface{}, _a1 interface{}) *Client_Echo_Call { + return &Client_Echo_Call{Call: _e.mock.On("Echo", _a0, _a1)} +} + +func (_c *Client_Echo_Call) Run(run func(_a0 context.Context, _a1 string)) *Client_Echo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Client_Echo_Call) Return(_a0 *types.ResponseEcho, _a1 error) *Client_Echo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Echo_Call) RunAndReturn(run func(context.Context, string) (*types.ResponseEcho, error)) *Client_Echo_Call { + _c.Call.Return(run) + return _c +} + // Error provides a mock function with given fields: func (_m *Client) Error() error { ret := _m.Called() @@ -122,6 +217,33 @@ func (_m *Client) Error() error { return r0 } +// Client_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error' +type Client_Error_Call struct { + *mock.Call +} + +// Error is a helper method to define mock.On call +func (_e *Client_Expecter) Error() *Client_Error_Call { + return &Client_Error_Call{Call: _e.mock.On("Error")} +} + +func (_c *Client_Error_Call) Run(run func()) *Client_Error_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_Error_Call) Return(_a0 error) *Client_Error_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Error_Call) RunAndReturn(run func() error) *Client_Error_Call { + _c.Call.Return(run) + return _c +} + // ExtendVote provides a mock function with given fields: _a0, _a1 func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) @@ -152,6 +274,35 @@ func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) return r0, r1 } +// Client_ExtendVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendVote' +type Client_ExtendVote_Call struct { + *mock.Call +} + +// ExtendVote is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestExtendVote +func (_e *Client_Expecter) ExtendVote(_a0 interface{}, _a1 interface{}) *Client_ExtendVote_Call { + return &Client_ExtendVote_Call{Call: _e.mock.On("ExtendVote", _a0, _a1)} +} + +func (_c *Client_ExtendVote_Call) Run(run func(_a0 context.Context, _a1 *types.RequestExtendVote)) *Client_ExtendVote_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestExtendVote)) + }) + return _c +} + +func (_c *Client_ExtendVote_Call) Return(_a0 *types.ResponseExtendVote, _a1 error) *Client_ExtendVote_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ExtendVote_Call) RunAndReturn(run func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)) *Client_ExtendVote_Call { + _c.Call.Return(run) + return _c +} + // FinalizeBlock provides a mock function with given fields: _a0, _a1 func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) @@ -182,6 +333,35 @@ func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeB return r0, r1 } +// Client_FinalizeBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalizeBlock' +type Client_FinalizeBlock_Call struct { + *mock.Call +} + +// FinalizeBlock is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestFinalizeBlock +func (_e *Client_Expecter) FinalizeBlock(_a0 interface{}, _a1 interface{}) *Client_FinalizeBlock_Call { + return &Client_FinalizeBlock_Call{Call: _e.mock.On("FinalizeBlock", _a0, _a1)} +} + +func (_c *Client_FinalizeBlock_Call) Run(run func(_a0 context.Context, _a1 *types.RequestFinalizeBlock)) *Client_FinalizeBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestFinalizeBlock)) + }) + return _c +} + +func (_c *Client_FinalizeBlock_Call) Return(_a0 *types.ResponseFinalizeBlock, _a1 error) *Client_FinalizeBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_FinalizeBlock_Call) RunAndReturn(run func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)) *Client_FinalizeBlock_Call { + _c.Call.Return(run) + return _c +} + // Flush provides a mock function with given fields: _a0 func (_m *Client) Flush(_a0 context.Context) error { ret := _m.Called(_a0) @@ -200,6 +380,34 @@ func (_m *Client) Flush(_a0 context.Context) error { return r0 } +// Client_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush' +type Client_Flush_Call struct { + *mock.Call +} + +// Flush is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) Flush(_a0 interface{}) *Client_Flush_Call { + return &Client_Flush_Call{Call: _e.mock.On("Flush", _a0)} +} + +func (_c *Client_Flush_Call) Run(run func(_a0 context.Context)) *Client_Flush_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_Flush_Call) Return(_a0 error) *Client_Flush_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Flush_Call) RunAndReturn(run func(context.Context) error) *Client_Flush_Call { + _c.Call.Return(run) + return _c +} + // Info provides a mock function with given fields: _a0, _a1 func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) @@ -230,6 +438,35 @@ func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.Resp return r0, r1 } +// Client_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info' +type Client_Info_Call struct { + *mock.Call +} + +// Info is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestInfo +func (_e *Client_Expecter) Info(_a0 interface{}, _a1 interface{}) *Client_Info_Call { + return &Client_Info_Call{Call: _e.mock.On("Info", _a0, _a1)} +} + +func (_c *Client_Info_Call) Run(run func(_a0 context.Context, _a1 *types.RequestInfo)) *Client_Info_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestInfo)) + }) + return _c +} + +func (_c *Client_Info_Call) Return(_a0 *types.ResponseInfo, _a1 error) *Client_Info_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Info_Call) RunAndReturn(run func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)) *Client_Info_Call { + _c.Call.Return(run) + return _c +} + // InitChain provides a mock function with given fields: _a0, _a1 func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) @@ -260,6 +497,35 @@ func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (* return r0, r1 } +// Client_InitChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitChain' +type Client_InitChain_Call struct { + *mock.Call +} + +// InitChain is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestInitChain +func (_e *Client_Expecter) InitChain(_a0 interface{}, _a1 interface{}) *Client_InitChain_Call { + return &Client_InitChain_Call{Call: _e.mock.On("InitChain", _a0, _a1)} +} + +func (_c *Client_InitChain_Call) Run(run func(_a0 context.Context, _a1 *types.RequestInitChain)) *Client_InitChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestInitChain)) + }) + return _c +} + +func (_c *Client_InitChain_Call) Return(_a0 *types.ResponseInitChain, _a1 error) *Client_InitChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_InitChain_Call) RunAndReturn(run func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)) *Client_InitChain_Call { + _c.Call.Return(run) + return _c +} + // IsRunning provides a mock function with given fields: func (_m *Client) IsRunning() bool { ret := _m.Called() @@ -278,6 +544,33 @@ func (_m *Client) IsRunning() bool { return r0 } +// Client_IsRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRunning' +type Client_IsRunning_Call struct { + *mock.Call +} + +// IsRunning is a helper method to define mock.On call +func (_e *Client_Expecter) IsRunning() *Client_IsRunning_Call { + return &Client_IsRunning_Call{Call: _e.mock.On("IsRunning")} +} + +func (_c *Client_IsRunning_Call) Run(run func()) *Client_IsRunning_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_IsRunning_Call) Return(_a0 bool) *Client_IsRunning_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_IsRunning_Call) RunAndReturn(run func() bool) *Client_IsRunning_Call { + _c.Call.Return(run) + return _c +} + // ListSnapshots provides a mock function with given fields: _a0, _a1 func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) @@ -308,6 +601,35 @@ func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnaps return r0, r1 } +// Client_ListSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSnapshots' +type Client_ListSnapshots_Call struct { + *mock.Call +} + +// ListSnapshots is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestListSnapshots +func (_e *Client_Expecter) ListSnapshots(_a0 interface{}, _a1 interface{}) *Client_ListSnapshots_Call { + return &Client_ListSnapshots_Call{Call: _e.mock.On("ListSnapshots", _a0, _a1)} +} + +func (_c *Client_ListSnapshots_Call) Run(run func(_a0 context.Context, _a1 *types.RequestListSnapshots)) *Client_ListSnapshots_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestListSnapshots)) + }) + return _c +} + +func (_c *Client_ListSnapshots_Call) Return(_a0 *types.ResponseListSnapshots, _a1 error) *Client_ListSnapshots_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ListSnapshots_Call) RunAndReturn(run func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)) *Client_ListSnapshots_Call { + _c.Call.Return(run) + return _c +} + // LoadSnapshotChunk provides a mock function with given fields: _a0, _a1 func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) @@ -338,6 +660,35 @@ func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadS return r0, r1 } +// Client_LoadSnapshotChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSnapshotChunk' +type Client_LoadSnapshotChunk_Call struct { + *mock.Call +} + +// LoadSnapshotChunk is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestLoadSnapshotChunk +func (_e *Client_Expecter) LoadSnapshotChunk(_a0 interface{}, _a1 interface{}) *Client_LoadSnapshotChunk_Call { + return &Client_LoadSnapshotChunk_Call{Call: _e.mock.On("LoadSnapshotChunk", _a0, _a1)} +} + +func (_c *Client_LoadSnapshotChunk_Call) Run(run func(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk)) *Client_LoadSnapshotChunk_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestLoadSnapshotChunk)) + }) + return _c +} + +func (_c *Client_LoadSnapshotChunk_Call) Return(_a0 *types.ResponseLoadSnapshotChunk, _a1 error) *Client_LoadSnapshotChunk_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_LoadSnapshotChunk_Call) RunAndReturn(run func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)) *Client_LoadSnapshotChunk_Call { + _c.Call.Return(run) + return _c +} + // OfferSnapshot provides a mock function with given fields: _a0, _a1 func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) @@ -368,6 +719,35 @@ func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnap return r0, r1 } +// Client_OfferSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OfferSnapshot' +type Client_OfferSnapshot_Call struct { + *mock.Call +} + +// OfferSnapshot is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestOfferSnapshot +func (_e *Client_Expecter) OfferSnapshot(_a0 interface{}, _a1 interface{}) *Client_OfferSnapshot_Call { + return &Client_OfferSnapshot_Call{Call: _e.mock.On("OfferSnapshot", _a0, _a1)} +} + +func (_c *Client_OfferSnapshot_Call) Run(run func(_a0 context.Context, _a1 *types.RequestOfferSnapshot)) *Client_OfferSnapshot_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestOfferSnapshot)) + }) + return _c +} + +func (_c *Client_OfferSnapshot_Call) Return(_a0 *types.ResponseOfferSnapshot, _a1 error) *Client_OfferSnapshot_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_OfferSnapshot_Call) RunAndReturn(run func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)) *Client_OfferSnapshot_Call { + _c.Call.Return(run) + return _c +} + // PrepareProposal provides a mock function with given fields: _a0, _a1 func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) @@ -398,6 +778,35 @@ func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepare return r0, r1 } +// Client_PrepareProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrepareProposal' +type Client_PrepareProposal_Call struct { + *mock.Call +} + +// PrepareProposal is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestPrepareProposal +func (_e *Client_Expecter) PrepareProposal(_a0 interface{}, _a1 interface{}) *Client_PrepareProposal_Call { + return &Client_PrepareProposal_Call{Call: _e.mock.On("PrepareProposal", _a0, _a1)} +} + +func (_c *Client_PrepareProposal_Call) Run(run func(_a0 context.Context, _a1 *types.RequestPrepareProposal)) *Client_PrepareProposal_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestPrepareProposal)) + }) + return _c +} + +func (_c *Client_PrepareProposal_Call) Return(_a0 *types.ResponsePrepareProposal, _a1 error) *Client_PrepareProposal_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_PrepareProposal_Call) RunAndReturn(run func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)) *Client_PrepareProposal_Call { + _c.Call.Return(run) + return _c +} + // ProcessProposal provides a mock function with given fields: _a0, _a1 func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) @@ -428,6 +837,35 @@ func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcess return r0, r1 } +// Client_ProcessProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessProposal' +type Client_ProcessProposal_Call struct { + *mock.Call +} + +// ProcessProposal is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestProcessProposal +func (_e *Client_Expecter) ProcessProposal(_a0 interface{}, _a1 interface{}) *Client_ProcessProposal_Call { + return &Client_ProcessProposal_Call{Call: _e.mock.On("ProcessProposal", _a0, _a1)} +} + +func (_c *Client_ProcessProposal_Call) Run(run func(_a0 context.Context, _a1 *types.RequestProcessProposal)) *Client_ProcessProposal_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestProcessProposal)) + }) + return _c +} + +func (_c *Client_ProcessProposal_Call) Return(_a0 *types.ResponseProcessProposal, _a1 error) *Client_ProcessProposal_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ProcessProposal_Call) RunAndReturn(run func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)) *Client_ProcessProposal_Call { + _c.Call.Return(run) + return _c +} + // Query provides a mock function with given fields: _a0, _a1 func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) @@ -458,6 +896,35 @@ func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.Re return r0, r1 } +// Client_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' +type Client_Query_Call struct { + *mock.Call +} + +// Query is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestQuery +func (_e *Client_Expecter) Query(_a0 interface{}, _a1 interface{}) *Client_Query_Call { + return &Client_Query_Call{Call: _e.mock.On("Query", _a0, _a1)} +} + +func (_c *Client_Query_Call) Run(run func(_a0 context.Context, _a1 *types.RequestQuery)) *Client_Query_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestQuery)) + }) + return _c +} + +func (_c *Client_Query_Call) Return(_a0 *types.ResponseQuery, _a1 error) *Client_Query_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Query_Call) RunAndReturn(run func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)) *Client_Query_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Client) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -476,6 +943,34 @@ func (_m *Client) Start(_a0 context.Context) error { return r0 } +// Client_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Client_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) Start(_a0 interface{}) *Client_Start_Call { + return &Client_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *Client_Start_Call) Run(run func(_a0 context.Context)) *Client_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_Start_Call) Return(_a0 error) *Client_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Start_Call) RunAndReturn(run func(context.Context) error) *Client_Start_Call { + _c.Call.Return(run) + return _c +} + // VerifyVoteExtension provides a mock function with given fields: _a0, _a1 func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) @@ -506,11 +1001,67 @@ func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVer return r0, r1 } +// Client_VerifyVoteExtension_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyVoteExtension' +type Client_VerifyVoteExtension_Call struct { + *mock.Call +} + +// VerifyVoteExtension is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestVerifyVoteExtension +func (_e *Client_Expecter) VerifyVoteExtension(_a0 interface{}, _a1 interface{}) *Client_VerifyVoteExtension_Call { + return &Client_VerifyVoteExtension_Call{Call: _e.mock.On("VerifyVoteExtension", _a0, _a1)} +} + +func (_c *Client_VerifyVoteExtension_Call) Run(run func(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension)) *Client_VerifyVoteExtension_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestVerifyVoteExtension)) + }) + return _c +} + +func (_c *Client_VerifyVoteExtension_Call) Return(_a0 *types.ResponseVerifyVoteExtension, _a1 error) *Client_VerifyVoteExtension_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_VerifyVoteExtension_Call) RunAndReturn(run func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)) *Client_VerifyVoteExtension_Call { + _c.Call.Return(run) + return _c +} + // Wait provides a mock function with given fields: func (_m *Client) Wait() { _m.Called() } +// Client_Wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Wait' +type Client_Wait_Call struct { + *mock.Call +} + +// Wait is a helper method to define mock.On call +func (_e *Client_Expecter) Wait() *Client_Wait_Call { + return &Client_Wait_Call{Call: _e.mock.On("Wait")} +} + +func (_c *Client_Wait_Call) Run(run func()) *Client_Wait_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_Wait_Call) Return() *Client_Wait_Call { + _c.Call.Return() + return _c +} + +func (_c *Client_Wait_Call) RunAndReturn(run func()) *Client_Wait_Call { + _c.Call.Return(run) + return _c +} + // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClient(t interface { diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index 04ca3c5777..1a706370d6 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -14,6 +14,14 @@ type Application struct { mock.Mock } +type Application_Expecter struct { + mock *mock.Mock +} + +func (_m *Application) EXPECT() *Application_Expecter { + return &Application_Expecter{mock: &_m.Mock} +} + // ApplySnapshotChunk provides a mock function with given fields: _a0, _a1 func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) @@ -44,6 +52,35 @@ func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.Reques return r0, r1 } +// Application_ApplySnapshotChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplySnapshotChunk' +type Application_ApplySnapshotChunk_Call struct { + *mock.Call +} + +// ApplySnapshotChunk is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestApplySnapshotChunk +func (_e *Application_Expecter) ApplySnapshotChunk(_a0 interface{}, _a1 interface{}) *Application_ApplySnapshotChunk_Call { + return &Application_ApplySnapshotChunk_Call{Call: _e.mock.On("ApplySnapshotChunk", _a0, _a1)} +} + +func (_c *Application_ApplySnapshotChunk_Call) Run(run func(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk)) *Application_ApplySnapshotChunk_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestApplySnapshotChunk)) + }) + return _c +} + +func (_c *Application_ApplySnapshotChunk_Call) Return(_a0 *types.ResponseApplySnapshotChunk, _a1 error) *Application_ApplySnapshotChunk_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_ApplySnapshotChunk_Call) RunAndReturn(run func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)) *Application_ApplySnapshotChunk_Call { + _c.Call.Return(run) + return _c +} + // CheckTx provides a mock function with given fields: _a0, _a1 func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) @@ -74,6 +111,35 @@ func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) ( return r0, r1 } +// Application_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' +type Application_CheckTx_Call struct { + *mock.Call +} + +// CheckTx is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestCheckTx +func (_e *Application_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *Application_CheckTx_Call { + return &Application_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} +} + +func (_c *Application_CheckTx_Call) Run(run func(_a0 context.Context, _a1 *types.RequestCheckTx)) *Application_CheckTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestCheckTx)) + }) + return _c +} + +func (_c *Application_CheckTx_Call) Return(_a0 *types.ResponseCheckTx, _a1 error) *Application_CheckTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_CheckTx_Call) RunAndReturn(run func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)) *Application_CheckTx_Call { + _c.Call.Return(run) + return _c +} + // ExtendVote provides a mock function with given fields: _a0, _a1 func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) @@ -104,6 +170,35 @@ func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendV return r0, r1 } +// Application_ExtendVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendVote' +type Application_ExtendVote_Call struct { + *mock.Call +} + +// ExtendVote is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestExtendVote +func (_e *Application_Expecter) ExtendVote(_a0 interface{}, _a1 interface{}) *Application_ExtendVote_Call { + return &Application_ExtendVote_Call{Call: _e.mock.On("ExtendVote", _a0, _a1)} +} + +func (_c *Application_ExtendVote_Call) Run(run func(_a0 context.Context, _a1 *types.RequestExtendVote)) *Application_ExtendVote_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestExtendVote)) + }) + return _c +} + +func (_c *Application_ExtendVote_Call) Return(_a0 *types.ResponseExtendVote, _a1 error) *Application_ExtendVote_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_ExtendVote_Call) RunAndReturn(run func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)) *Application_ExtendVote_Call { + _c.Call.Return(run) + return _c +} + // FinalizeBlock provides a mock function with given fields: _a0, _a1 func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) @@ -134,6 +229,35 @@ func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFina return r0, r1 } +// Application_FinalizeBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalizeBlock' +type Application_FinalizeBlock_Call struct { + *mock.Call +} + +// FinalizeBlock is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestFinalizeBlock +func (_e *Application_Expecter) FinalizeBlock(_a0 interface{}, _a1 interface{}) *Application_FinalizeBlock_Call { + return &Application_FinalizeBlock_Call{Call: _e.mock.On("FinalizeBlock", _a0, _a1)} +} + +func (_c *Application_FinalizeBlock_Call) Run(run func(_a0 context.Context, _a1 *types.RequestFinalizeBlock)) *Application_FinalizeBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestFinalizeBlock)) + }) + return _c +} + +func (_c *Application_FinalizeBlock_Call) Return(_a0 *types.ResponseFinalizeBlock, _a1 error) *Application_FinalizeBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_FinalizeBlock_Call) RunAndReturn(run func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)) *Application_FinalizeBlock_Call { + _c.Call.Return(run) + return _c +} + // Info provides a mock function with given fields: _a0, _a1 func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) @@ -164,6 +288,35 @@ func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types return r0, r1 } +// Application_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info' +type Application_Info_Call struct { + *mock.Call +} + +// Info is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestInfo +func (_e *Application_Expecter) Info(_a0 interface{}, _a1 interface{}) *Application_Info_Call { + return &Application_Info_Call{Call: _e.mock.On("Info", _a0, _a1)} +} + +func (_c *Application_Info_Call) Run(run func(_a0 context.Context, _a1 *types.RequestInfo)) *Application_Info_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestInfo)) + }) + return _c +} + +func (_c *Application_Info_Call) Return(_a0 *types.ResponseInfo, _a1 error) *Application_Info_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_Info_Call) RunAndReturn(run func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)) *Application_Info_Call { + _c.Call.Return(run) + return _c +} + // InitChain provides a mock function with given fields: _a0, _a1 func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) @@ -194,6 +347,35 @@ func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChai return r0, r1 } +// Application_InitChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitChain' +type Application_InitChain_Call struct { + *mock.Call +} + +// InitChain is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestInitChain +func (_e *Application_Expecter) InitChain(_a0 interface{}, _a1 interface{}) *Application_InitChain_Call { + return &Application_InitChain_Call{Call: _e.mock.On("InitChain", _a0, _a1)} +} + +func (_c *Application_InitChain_Call) Run(run func(_a0 context.Context, _a1 *types.RequestInitChain)) *Application_InitChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestInitChain)) + }) + return _c +} + +func (_c *Application_InitChain_Call) Return(_a0 *types.ResponseInitChain, _a1 error) *Application_InitChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_InitChain_Call) RunAndReturn(run func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)) *Application_InitChain_Call { + _c.Call.Return(run) + return _c +} + // ListSnapshots provides a mock function with given fields: _a0, _a1 func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) @@ -224,6 +406,35 @@ func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestList return r0, r1 } +// Application_ListSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSnapshots' +type Application_ListSnapshots_Call struct { + *mock.Call +} + +// ListSnapshots is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestListSnapshots +func (_e *Application_Expecter) ListSnapshots(_a0 interface{}, _a1 interface{}) *Application_ListSnapshots_Call { + return &Application_ListSnapshots_Call{Call: _e.mock.On("ListSnapshots", _a0, _a1)} +} + +func (_c *Application_ListSnapshots_Call) Run(run func(_a0 context.Context, _a1 *types.RequestListSnapshots)) *Application_ListSnapshots_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestListSnapshots)) + }) + return _c +} + +func (_c *Application_ListSnapshots_Call) Return(_a0 *types.ResponseListSnapshots, _a1 error) *Application_ListSnapshots_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_ListSnapshots_Call) RunAndReturn(run func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)) *Application_ListSnapshots_Call { + _c.Call.Return(run) + return _c +} + // LoadSnapshotChunk provides a mock function with given fields: _a0, _a1 func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) @@ -254,6 +465,35 @@ func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.Request return r0, r1 } +// Application_LoadSnapshotChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSnapshotChunk' +type Application_LoadSnapshotChunk_Call struct { + *mock.Call +} + +// LoadSnapshotChunk is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestLoadSnapshotChunk +func (_e *Application_Expecter) LoadSnapshotChunk(_a0 interface{}, _a1 interface{}) *Application_LoadSnapshotChunk_Call { + return &Application_LoadSnapshotChunk_Call{Call: _e.mock.On("LoadSnapshotChunk", _a0, _a1)} +} + +func (_c *Application_LoadSnapshotChunk_Call) Run(run func(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk)) *Application_LoadSnapshotChunk_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestLoadSnapshotChunk)) + }) + return _c +} + +func (_c *Application_LoadSnapshotChunk_Call) Return(_a0 *types.ResponseLoadSnapshotChunk, _a1 error) *Application_LoadSnapshotChunk_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_LoadSnapshotChunk_Call) RunAndReturn(run func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)) *Application_LoadSnapshotChunk_Call { + _c.Call.Return(run) + return _c +} + // OfferSnapshot provides a mock function with given fields: _a0, _a1 func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) @@ -284,6 +524,35 @@ func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOffe return r0, r1 } +// Application_OfferSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OfferSnapshot' +type Application_OfferSnapshot_Call struct { + *mock.Call +} + +// OfferSnapshot is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestOfferSnapshot +func (_e *Application_Expecter) OfferSnapshot(_a0 interface{}, _a1 interface{}) *Application_OfferSnapshot_Call { + return &Application_OfferSnapshot_Call{Call: _e.mock.On("OfferSnapshot", _a0, _a1)} +} + +func (_c *Application_OfferSnapshot_Call) Run(run func(_a0 context.Context, _a1 *types.RequestOfferSnapshot)) *Application_OfferSnapshot_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestOfferSnapshot)) + }) + return _c +} + +func (_c *Application_OfferSnapshot_Call) Return(_a0 *types.ResponseOfferSnapshot, _a1 error) *Application_OfferSnapshot_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_OfferSnapshot_Call) RunAndReturn(run func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)) *Application_OfferSnapshot_Call { + _c.Call.Return(run) + return _c +} + // PrepareProposal provides a mock function with given fields: _a0, _a1 func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) @@ -314,6 +583,35 @@ func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPr return r0, r1 } +// Application_PrepareProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrepareProposal' +type Application_PrepareProposal_Call struct { + *mock.Call +} + +// PrepareProposal is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestPrepareProposal +func (_e *Application_Expecter) PrepareProposal(_a0 interface{}, _a1 interface{}) *Application_PrepareProposal_Call { + return &Application_PrepareProposal_Call{Call: _e.mock.On("PrepareProposal", _a0, _a1)} +} + +func (_c *Application_PrepareProposal_Call) Run(run func(_a0 context.Context, _a1 *types.RequestPrepareProposal)) *Application_PrepareProposal_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestPrepareProposal)) + }) + return _c +} + +func (_c *Application_PrepareProposal_Call) Return(_a0 *types.ResponsePrepareProposal, _a1 error) *Application_PrepareProposal_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_PrepareProposal_Call) RunAndReturn(run func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)) *Application_PrepareProposal_Call { + _c.Call.Return(run) + return _c +} + // ProcessProposal provides a mock function with given fields: _a0, _a1 func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) @@ -344,6 +642,35 @@ func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestPr return r0, r1 } +// Application_ProcessProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessProposal' +type Application_ProcessProposal_Call struct { + *mock.Call +} + +// ProcessProposal is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestProcessProposal +func (_e *Application_Expecter) ProcessProposal(_a0 interface{}, _a1 interface{}) *Application_ProcessProposal_Call { + return &Application_ProcessProposal_Call{Call: _e.mock.On("ProcessProposal", _a0, _a1)} +} + +func (_c *Application_ProcessProposal_Call) Run(run func(_a0 context.Context, _a1 *types.RequestProcessProposal)) *Application_ProcessProposal_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestProcessProposal)) + }) + return _c +} + +func (_c *Application_ProcessProposal_Call) Return(_a0 *types.ResponseProcessProposal, _a1 error) *Application_ProcessProposal_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_ProcessProposal_Call) RunAndReturn(run func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)) *Application_ProcessProposal_Call { + _c.Call.Return(run) + return _c +} + // Query provides a mock function with given fields: _a0, _a1 func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) @@ -374,6 +701,35 @@ func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*typ return r0, r1 } +// Application_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' +type Application_Query_Call struct { + *mock.Call +} + +// Query is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestQuery +func (_e *Application_Expecter) Query(_a0 interface{}, _a1 interface{}) *Application_Query_Call { + return &Application_Query_Call{Call: _e.mock.On("Query", _a0, _a1)} +} + +func (_c *Application_Query_Call) Run(run func(_a0 context.Context, _a1 *types.RequestQuery)) *Application_Query_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestQuery)) + }) + return _c +} + +func (_c *Application_Query_Call) Return(_a0 *types.ResponseQuery, _a1 error) *Application_Query_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_Query_Call) RunAndReturn(run func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)) *Application_Query_Call { + _c.Call.Return(run) + return _c +} + // VerifyVoteExtension provides a mock function with given fields: _a0, _a1 func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) @@ -404,6 +760,35 @@ func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.Reque return r0, r1 } +// Application_VerifyVoteExtension_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyVoteExtension' +type Application_VerifyVoteExtension_Call struct { + *mock.Call +} + +// VerifyVoteExtension is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *types.RequestVerifyVoteExtension +func (_e *Application_Expecter) VerifyVoteExtension(_a0 interface{}, _a1 interface{}) *Application_VerifyVoteExtension_Call { + return &Application_VerifyVoteExtension_Call{Call: _e.mock.On("VerifyVoteExtension", _a0, _a1)} +} + +func (_c *Application_VerifyVoteExtension_Call) Run(run func(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension)) *Application_VerifyVoteExtension_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.RequestVerifyVoteExtension)) + }) + return _c +} + +func (_c *Application_VerifyVoteExtension_Call) Return(_a0 *types.ResponseVerifyVoteExtension, _a1 error) *Application_VerifyVoteExtension_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_VerifyVoteExtension_Call) RunAndReturn(run func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)) *Application_VerifyVoteExtension_Call { + _c.Call.Return(run) + return _c +} + // NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewApplication(t interface { diff --git a/cmd/tenderdash/commands/reindex_event_test.go b/cmd/tenderdash/commands/reindex_event_test.go index 37f58d9529..6352b995fa 100644 --- a/cmd/tenderdash/commands/reindex_event_test.go +++ b/cmd/tenderdash/commands/reindex_event_test.go @@ -13,6 +13,7 @@ import ( abcitypes "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/config" "github.com/dashpay/tenderdash/internal/state/indexer" + imocks "github.com/dashpay/tenderdash/internal/state/indexer/mocks" "github.com/dashpay/tenderdash/internal/state/mocks" "github.com/dashpay/tenderdash/libs/log" "github.com/dashpay/tenderdash/proto/tendermint/state" @@ -136,7 +137,7 @@ func TestLoadBlockStore(t *testing.T) { func TestReIndexEvent(t *testing.T) { mockBlockStore := &mocks.BlockStore{} mockStateStore := &mocks.Store{} - mockEventSink := &mocks.EventSink{} + mockEventSink := &imocks.EventSink{} mockBlockStore. On("Base").Return(base). diff --git a/dash/core/mocks/client.go b/dash/core/mocks/client.go index 19511f16ac..db17639514 100644 --- a/dash/core/mocks/client.go +++ b/dash/core/mocks/client.go @@ -14,6 +14,14 @@ type Client struct { mock.Mock } +type Client_Expecter struct { + mock *mock.Mock +} + +func (_m *Client) EXPECT() *Client_Expecter { + return &Client_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *Client) Close() error { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *Client) Close() error { return r0 } +// Client_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Client_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Client_Expecter) Close() *Client_Close_Call { + return &Client_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_Close_Call) Return(_a0 error) *Client_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call { + _c.Call.Return(run) + return _c +} + // GetNetworkInfo provides a mock function with given fields: func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { ret := _m.Called() @@ -62,6 +97,33 @@ func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { return r0, r1 } +// Client_GetNetworkInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkInfo' +type Client_GetNetworkInfo_Call struct { + *mock.Call +} + +// GetNetworkInfo is a helper method to define mock.On call +func (_e *Client_Expecter) GetNetworkInfo() *Client_GetNetworkInfo_Call { + return &Client_GetNetworkInfo_Call{Call: _e.mock.On("GetNetworkInfo")} +} + +func (_c *Client_GetNetworkInfo_Call) Run(run func()) *Client_GetNetworkInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_GetNetworkInfo_Call) Return(_a0 *btcjson.GetNetworkInfoResult, _a1 error) *Client_GetNetworkInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GetNetworkInfo_Call) RunAndReturn(run func() (*btcjson.GetNetworkInfoResult, error)) *Client_GetNetworkInfo_Call { + _c.Call.Return(run) + return _c +} + // MasternodeListJSON provides a mock function with given fields: filter func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.MasternodelistResultJSON, error) { ret := _m.Called(filter) @@ -92,6 +154,34 @@ func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.Masterno return r0, r1 } +// Client_MasternodeListJSON_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MasternodeListJSON' +type Client_MasternodeListJSON_Call struct { + *mock.Call +} + +// MasternodeListJSON is a helper method to define mock.On call +// - filter string +func (_e *Client_Expecter) MasternodeListJSON(filter interface{}) *Client_MasternodeListJSON_Call { + return &Client_MasternodeListJSON_Call{Call: _e.mock.On("MasternodeListJSON", filter)} +} + +func (_c *Client_MasternodeListJSON_Call) Run(run func(filter string)) *Client_MasternodeListJSON_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Client_MasternodeListJSON_Call) Return(_a0 map[string]btcjson.MasternodelistResultJSON, _a1 error) *Client_MasternodeListJSON_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_MasternodeListJSON_Call) RunAndReturn(run func(string) (map[string]btcjson.MasternodelistResultJSON, error)) *Client_MasternodeListJSON_Call { + _c.Call.Return(run) + return _c +} + // MasternodeStatus provides a mock function with given fields: func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { ret := _m.Called() @@ -122,6 +212,33 @@ func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { return r0, r1 } +// Client_MasternodeStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MasternodeStatus' +type Client_MasternodeStatus_Call struct { + *mock.Call +} + +// MasternodeStatus is a helper method to define mock.On call +func (_e *Client_Expecter) MasternodeStatus() *Client_MasternodeStatus_Call { + return &Client_MasternodeStatus_Call{Call: _e.mock.On("MasternodeStatus")} +} + +func (_c *Client_MasternodeStatus_Call) Run(run func()) *Client_MasternodeStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_MasternodeStatus_Call) Return(_a0 *btcjson.MasternodeStatusResult, _a1 error) *Client_MasternodeStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_MasternodeStatus_Call) RunAndReturn(run func() (*btcjson.MasternodeStatusResult, error)) *Client_MasternodeStatus_Call { + _c.Call.Return(run) + return _c +} + // Ping provides a mock function with given fields: func (_m *Client) Ping() error { ret := _m.Called() @@ -140,6 +257,33 @@ func (_m *Client) Ping() error { return r0 } +// Client_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping' +type Client_Ping_Call struct { + *mock.Call +} + +// Ping is a helper method to define mock.On call +func (_e *Client_Expecter) Ping() *Client_Ping_Call { + return &Client_Ping_Call{Call: _e.mock.On("Ping")} +} + +func (_c *Client_Ping_Call) Run(run func()) *Client_Ping_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_Ping_Call) Return(_a0 error) *Client_Ping_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Ping_Call) RunAndReturn(run func() error) *Client_Ping_Call { + _c.Call.Return(run) + return _c +} + // QuorumInfo provides a mock function with given fields: quorumType, quorumHash func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBytes) (*btcjson.QuorumInfoResult, error) { ret := _m.Called(quorumType, quorumHash) @@ -170,6 +314,35 @@ func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBy return r0, r1 } +// Client_QuorumInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuorumInfo' +type Client_QuorumInfo_Call struct { + *mock.Call +} + +// QuorumInfo is a helper method to define mock.On call +// - quorumType btcjson.LLMQType +// - quorumHash bytes.HexBytes +func (_e *Client_Expecter) QuorumInfo(quorumType interface{}, quorumHash interface{}) *Client_QuorumInfo_Call { + return &Client_QuorumInfo_Call{Call: _e.mock.On("QuorumInfo", quorumType, quorumHash)} +} + +func (_c *Client_QuorumInfo_Call) Run(run func(quorumType btcjson.LLMQType, quorumHash bytes.HexBytes)) *Client_QuorumInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(btcjson.LLMQType), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *Client_QuorumInfo_Call) Return(_a0 *btcjson.QuorumInfoResult, _a1 error) *Client_QuorumInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_QuorumInfo_Call) RunAndReturn(run func(btcjson.LLMQType, bytes.HexBytes) (*btcjson.QuorumInfoResult, error)) *Client_QuorumInfo_Call { + _c.Call.Return(run) + return _c +} + // QuorumSign provides a mock function with given fields: quorumType, requestID, messageHash, quorumHash func (_m *Client) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, quorumHash bytes.HexBytes) (*btcjson.QuorumSignResult, error) { ret := _m.Called(quorumType, requestID, messageHash, quorumHash) @@ -200,6 +373,37 @@ func (_m *Client) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexByt return r0, r1 } +// Client_QuorumSign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuorumSign' +type Client_QuorumSign_Call struct { + *mock.Call +} + +// QuorumSign is a helper method to define mock.On call +// - quorumType btcjson.LLMQType +// - requestID bytes.HexBytes +// - messageHash bytes.HexBytes +// - quorumHash bytes.HexBytes +func (_e *Client_Expecter) QuorumSign(quorumType interface{}, requestID interface{}, messageHash interface{}, quorumHash interface{}) *Client_QuorumSign_Call { + return &Client_QuorumSign_Call{Call: _e.mock.On("QuorumSign", quorumType, requestID, messageHash, quorumHash)} +} + +func (_c *Client_QuorumSign_Call) Run(run func(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, quorumHash bytes.HexBytes)) *Client_QuorumSign_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(btcjson.LLMQType), args[1].(bytes.HexBytes), args[2].(bytes.HexBytes), args[3].(bytes.HexBytes)) + }) + return _c +} + +func (_c *Client_QuorumSign_Call) Return(_a0 *btcjson.QuorumSignResult, _a1 error) *Client_QuorumSign_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_QuorumSign_Call) RunAndReturn(run func(btcjson.LLMQType, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes) (*btcjson.QuorumSignResult, error)) *Client_QuorumSign_Call { + _c.Call.Return(run) + return _c +} + // QuorumVerify provides a mock function with given fields: quorumType, requestID, messageHash, signature, quorumHash func (_m *Client) QuorumVerify(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, signature bytes.HexBytes, quorumHash bytes.HexBytes) (bool, error) { ret := _m.Called(quorumType, requestID, messageHash, signature, quorumHash) @@ -228,6 +432,38 @@ func (_m *Client) QuorumVerify(quorumType btcjson.LLMQType, requestID bytes.HexB return r0, r1 } +// Client_QuorumVerify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuorumVerify' +type Client_QuorumVerify_Call struct { + *mock.Call +} + +// QuorumVerify is a helper method to define mock.On call +// - quorumType btcjson.LLMQType +// - requestID bytes.HexBytes +// - messageHash bytes.HexBytes +// - signature bytes.HexBytes +// - quorumHash bytes.HexBytes +func (_e *Client_Expecter) QuorumVerify(quorumType interface{}, requestID interface{}, messageHash interface{}, signature interface{}, quorumHash interface{}) *Client_QuorumVerify_Call { + return &Client_QuorumVerify_Call{Call: _e.mock.On("QuorumVerify", quorumType, requestID, messageHash, signature, quorumHash)} +} + +func (_c *Client_QuorumVerify_Call) Run(run func(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, signature bytes.HexBytes, quorumHash bytes.HexBytes)) *Client_QuorumVerify_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(btcjson.LLMQType), args[1].(bytes.HexBytes), args[2].(bytes.HexBytes), args[3].(bytes.HexBytes), args[4].(bytes.HexBytes)) + }) + return _c +} + +func (_c *Client_QuorumVerify_Call) Return(_a0 bool, _a1 error) *Client_QuorumVerify_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_QuorumVerify_Call) RunAndReturn(run func(btcjson.LLMQType, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes) (bool, error)) *Client_QuorumVerify_Call { + _c.Call.Return(run) + return _c +} + // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClient(t interface { diff --git a/internal/blocksync/mocks/block_client.go b/internal/blocksync/mocks/block_client.go deleted file mode 100644 index bdf95bee04..0000000000 --- a/internal/blocksync/mocks/block_client.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - promise "github.com/dashpay/tenderdash/libs/promise" - blocksync "github.com/dashpay/tenderdash/proto/tendermint/blocksync" - types "github.com/dashpay/tenderdash/types" -) - -// BlockClient is an autogenerated mock type for the BlockClient type -type BlockClient struct { - mock.Mock -} - -// GetBlock provides a mock function with given fields: ctx, height, peerID -func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error) { - ret := _m.Called(ctx, height, peerID) - - var r0 *promise.Promise[*blocksync.BlockResponse] - if rf, ok := ret.Get(0).(func(context.Context, int64, types.NodeID) *promise.Promise[*blocksync.BlockResponse]); ok { - r0 = rf(ctx, height, peerID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*promise.Promise[*blocksync.BlockResponse]) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, int64, types.NodeID) error); ok { - r1 = rf(ctx, height, peerID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Send provides a mock function with given fields: ctx, msg -func (_m *BlockClient) Send(ctx context.Context, msg interface{}) error { - ret := _m.Called(ctx, msg) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { - r0 = rf(ctx, msg) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -type mockConstructorTestingTNewBlockClient interface { - mock.TestingT - Cleanup(func()) -} - -// NewBlockClient creates a new instance of BlockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockClient(t mockConstructorTestingTNewBlockClient) *BlockClient { - mock := &BlockClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/consensus/mocks/fast_sync_reactor.go b/internal/consensus/mocks/fast_sync_reactor.go deleted file mode 100644 index ea4907e268..0000000000 --- a/internal/consensus/mocks/fast_sync_reactor.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by mockery 2.7.5. DO NOT EDIT. - -package mocks - -import ( - mock "github.com/stretchr/testify/mock" - - state "github.com/dashpay/tenderdash/internal/state" - - time "time" -) - -// BlockSyncReactor is an autogenerated mock type for the BlockSyncReactor type -type BlockSyncReactor struct { - mock.Mock -} - -// GetMaxPeerBlockHeight provides a mock function with given fields: -func (_m *BlockSyncReactor) GetMaxPeerBlockHeight() int64 { - ret := _m.Called() - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// GetRemainingSyncTime provides a mock function with given fields: -func (_m *BlockSyncReactor) GetRemainingSyncTime() time.Duration { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - return r0 -} - -// GetTotalSyncedTime provides a mock function with given fields: -func (_m *BlockSyncReactor) GetTotalSyncedTime() time.Duration { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - return r0 -} - -// SwitchToBlockSync provides a mock function with given fields: _a0 -func (_m *BlockSyncReactor) SwitchToBlockSync(_a0 state.State) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(state.State) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} diff --git a/internal/consensus/mocks/gossiper.go b/internal/consensus/mocks/gossiper.go index b2f91225a9..22a3d374aa 100644 --- a/internal/consensus/mocks/gossiper.go +++ b/internal/consensus/mocks/gossiper.go @@ -14,36 +14,224 @@ type Gossiper struct { mock.Mock } +type Gossiper_Expecter struct { + mock *mock.Mock +} + +func (_m *Gossiper) EXPECT() *Gossiper_Expecter { + return &Gossiper_Expecter{mock: &_m.Mock} +} + // GossipBlockPartsForCatchup provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipBlockPartsForCatchup(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } +// Gossiper_GossipBlockPartsForCatchup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipBlockPartsForCatchup' +type Gossiper_GossipBlockPartsForCatchup_Call struct { + *mock.Call +} + +// GossipBlockPartsForCatchup is a helper method to define mock.On call +// - ctx context.Context +// - rs types.RoundState +// - prs *types.PeerRoundState +func (_e *Gossiper_Expecter) GossipBlockPartsForCatchup(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipBlockPartsForCatchup_Call { + return &Gossiper_GossipBlockPartsForCatchup_Call{Call: _e.mock.On("GossipBlockPartsForCatchup", ctx, rs, prs)} +} + +func (_c *Gossiper_GossipBlockPartsForCatchup_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipBlockPartsForCatchup_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) + }) + return _c +} + +func (_c *Gossiper_GossipBlockPartsForCatchup_Call) Return() *Gossiper_GossipBlockPartsForCatchup_Call { + _c.Call.Return() + return _c +} + +func (_c *Gossiper_GossipBlockPartsForCatchup_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipBlockPartsForCatchup_Call { + _c.Call.Return(run) + return _c +} + // GossipCommit provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipCommit(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } +// Gossiper_GossipCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipCommit' +type Gossiper_GossipCommit_Call struct { + *mock.Call +} + +// GossipCommit is a helper method to define mock.On call +// - ctx context.Context +// - rs types.RoundState +// - prs *types.PeerRoundState +func (_e *Gossiper_Expecter) GossipCommit(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipCommit_Call { + return &Gossiper_GossipCommit_Call{Call: _e.mock.On("GossipCommit", ctx, rs, prs)} +} + +func (_c *Gossiper_GossipCommit_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipCommit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) + }) + return _c +} + +func (_c *Gossiper_GossipCommit_Call) Return() *Gossiper_GossipCommit_Call { + _c.Call.Return() + return _c +} + +func (_c *Gossiper_GossipCommit_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipCommit_Call { + _c.Call.Return(run) + return _c +} + // GossipProposal provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipProposal(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } +// Gossiper_GossipProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipProposal' +type Gossiper_GossipProposal_Call struct { + *mock.Call +} + +// GossipProposal is a helper method to define mock.On call +// - ctx context.Context +// - rs types.RoundState +// - prs *types.PeerRoundState +func (_e *Gossiper_Expecter) GossipProposal(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipProposal_Call { + return &Gossiper_GossipProposal_Call{Call: _e.mock.On("GossipProposal", ctx, rs, prs)} +} + +func (_c *Gossiper_GossipProposal_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipProposal_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) + }) + return _c +} + +func (_c *Gossiper_GossipProposal_Call) Return() *Gossiper_GossipProposal_Call { + _c.Call.Return() + return _c +} + +func (_c *Gossiper_GossipProposal_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipProposal_Call { + _c.Call.Return(run) + return _c +} + // GossipProposalBlockParts provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipProposalBlockParts(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } +// Gossiper_GossipProposalBlockParts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipProposalBlockParts' +type Gossiper_GossipProposalBlockParts_Call struct { + *mock.Call +} + +// GossipProposalBlockParts is a helper method to define mock.On call +// - ctx context.Context +// - rs types.RoundState +// - prs *types.PeerRoundState +func (_e *Gossiper_Expecter) GossipProposalBlockParts(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipProposalBlockParts_Call { + return &Gossiper_GossipProposalBlockParts_Call{Call: _e.mock.On("GossipProposalBlockParts", ctx, rs, prs)} +} + +func (_c *Gossiper_GossipProposalBlockParts_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipProposalBlockParts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) + }) + return _c +} + +func (_c *Gossiper_GossipProposalBlockParts_Call) Return() *Gossiper_GossipProposalBlockParts_Call { + _c.Call.Return() + return _c +} + +func (_c *Gossiper_GossipProposalBlockParts_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipProposalBlockParts_Call { + _c.Call.Return(run) + return _c +} + // GossipVote provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipVote(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } +// Gossiper_GossipVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipVote' +type Gossiper_GossipVote_Call struct { + *mock.Call +} + +// GossipVote is a helper method to define mock.On call +// - ctx context.Context +// - rs types.RoundState +// - prs *types.PeerRoundState +func (_e *Gossiper_Expecter) GossipVote(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipVote_Call { + return &Gossiper_GossipVote_Call{Call: _e.mock.On("GossipVote", ctx, rs, prs)} +} + +func (_c *Gossiper_GossipVote_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipVote_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) + }) + return _c +} + +func (_c *Gossiper_GossipVote_Call) Return() *Gossiper_GossipVote_Call { + _c.Call.Return() + return _c +} + +func (_c *Gossiper_GossipVote_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipVote_Call { + _c.Call.Return(run) + return _c +} + // GossipVoteSetMaj23 provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipVoteSetMaj23(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } +// Gossiper_GossipVoteSetMaj23_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipVoteSetMaj23' +type Gossiper_GossipVoteSetMaj23_Call struct { + *mock.Call +} + +// GossipVoteSetMaj23 is a helper method to define mock.On call +// - ctx context.Context +// - rs types.RoundState +// - prs *types.PeerRoundState +func (_e *Gossiper_Expecter) GossipVoteSetMaj23(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipVoteSetMaj23_Call { + return &Gossiper_GossipVoteSetMaj23_Call{Call: _e.mock.On("GossipVoteSetMaj23", ctx, rs, prs)} +} + +func (_c *Gossiper_GossipVoteSetMaj23_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipVoteSetMaj23_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) + }) + return _c +} + +func (_c *Gossiper_GossipVoteSetMaj23_Call) Return() *Gossiper_GossipVoteSetMaj23_Call { + _c.Call.Return() + return _c +} + +func (_c *Gossiper_GossipVoteSetMaj23_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipVoteSetMaj23_Call { + _c.Call.Return(run) + return _c +} + // NewGossiper creates a new instance of Gossiper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewGossiper(t interface { diff --git a/internal/consensus/versioned/selectproposer/mocks/proposer_selector.go b/internal/consensus/versioned/selectproposer/mocks/proposer_selector.go deleted file mode 100644 index e2071d2769..0000000000 --- a/internal/consensus/versioned/selectproposer/mocks/proposer_selector.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - selectproposer "github.com/dashpay/tenderdash/internal/consensus/versioned/selectproposer" - types "github.com/dashpay/tenderdash/types" - mock "github.com/stretchr/testify/mock" -) - -// ProposerSelector is an autogenerated mock type for the ProposerSelector type -type ProposerSelector struct { - mock.Mock -} - -// Copy provides a mock function with given fields: -func (_m *ProposerSelector) Copy() selectproposer.ProposerSelector { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Copy") - } - - var r0 selectproposer.ProposerSelector - if rf, ok := ret.Get(0).(func() selectproposer.ProposerSelector); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(selectproposer.ProposerSelector) - } - } - - return r0 -} - -// GetProposer provides a mock function with given fields: height, round -func (_m *ProposerSelector) GetProposer(height int64, round int32) (*types.Validator, error) { - ret := _m.Called(height, round) - - if len(ret) == 0 { - panic("no return value specified for GetProposer") - } - - var r0 *types.Validator - var r1 error - if rf, ok := ret.Get(0).(func(int64, int32) (*types.Validator, error)); ok { - return rf(height, round) - } - if rf, ok := ret.Get(0).(func(int64, int32) *types.Validator); ok { - r0 = rf(height, round) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Validator) - } - } - - if rf, ok := ret.Get(1).(func(int64, int32) error); ok { - r1 = rf(height, round) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MustGetProposer provides a mock function with given fields: height, round -func (_m *ProposerSelector) MustGetProposer(height int64, round int32) *types.Validator { - ret := _m.Called(height, round) - - if len(ret) == 0 { - panic("no return value specified for MustGetProposer") - } - - var r0 *types.Validator - if rf, ok := ret.Get(0).(func(int64, int32) *types.Validator); ok { - r0 = rf(height, round) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Validator) - } - } - - return r0 -} - -// UpdateHeightRound provides a mock function with given fields: height, round -func (_m *ProposerSelector) UpdateHeightRound(height int64, round int32) error { - ret := _m.Called(height, round) - - if len(ret) == 0 { - panic("no return value specified for UpdateHeightRound") - } - - var r0 error - if rf, ok := ret.Get(0).(func(int64, int32) error); ok { - r0 = rf(height, round) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ValidatorSet provides a mock function with given fields: -func (_m *ProposerSelector) ValidatorSet() *types.ValidatorSet { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ValidatorSet") - } - - var r0 *types.ValidatorSet - if rf, ok := ret.Get(0).(func() *types.ValidatorSet); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ValidatorSet) - } - } - - return r0 -} - -// NewProposerSelector creates a new instance of ProposerSelector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewProposerSelector(t interface { - mock.TestingT - Cleanup(func()) -}) *ProposerSelector { - mock := &ProposerSelector{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/consensus/versioned/selectproposer/mocks/proposerselector.go b/internal/consensus/versioned/selectproposer/mocks/proposerselector.go new file mode 100644 index 0000000000..6daf7600ac --- /dev/null +++ b/internal/consensus/versioned/selectproposer/mocks/proposerselector.go @@ -0,0 +1,285 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + selectproposer "github.com/dashpay/tenderdash/internal/consensus/versioned/selectproposer" + types "github.com/dashpay/tenderdash/types" + mock "github.com/stretchr/testify/mock" +) + +// ProposerSelector is an autogenerated mock type for the ProposerSelector type +type ProposerSelector struct { + mock.Mock +} + +type ProposerSelector_Expecter struct { + mock *mock.Mock +} + +func (_m *ProposerSelector) EXPECT() *ProposerSelector_Expecter { + return &ProposerSelector_Expecter{mock: &_m.Mock} +} + +// Copy provides a mock function with given fields: +func (_m *ProposerSelector) Copy() selectproposer.ProposerSelector { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Copy") + } + + var r0 selectproposer.ProposerSelector + if rf, ok := ret.Get(0).(func() selectproposer.ProposerSelector); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(selectproposer.ProposerSelector) + } + } + + return r0 +} + +// ProposerSelector_Copy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Copy' +type ProposerSelector_Copy_Call struct { + *mock.Call +} + +// Copy is a helper method to define mock.On call +func (_e *ProposerSelector_Expecter) Copy() *ProposerSelector_Copy_Call { + return &ProposerSelector_Copy_Call{Call: _e.mock.On("Copy")} +} + +func (_c *ProposerSelector_Copy_Call) Run(run func()) *ProposerSelector_Copy_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ProposerSelector_Copy_Call) Return(_a0 selectproposer.ProposerSelector) *ProposerSelector_Copy_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ProposerSelector_Copy_Call) RunAndReturn(run func() selectproposer.ProposerSelector) *ProposerSelector_Copy_Call { + _c.Call.Return(run) + return _c +} + +// GetProposer provides a mock function with given fields: height, round +func (_m *ProposerSelector) GetProposer(height int64, round int32) (*types.Validator, error) { + ret := _m.Called(height, round) + + if len(ret) == 0 { + panic("no return value specified for GetProposer") + } + + var r0 *types.Validator + var r1 error + if rf, ok := ret.Get(0).(func(int64, int32) (*types.Validator, error)); ok { + return rf(height, round) + } + if rf, ok := ret.Get(0).(func(int64, int32) *types.Validator); ok { + r0 = rf(height, round) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Validator) + } + } + + if rf, ok := ret.Get(1).(func(int64, int32) error); ok { + r1 = rf(height, round) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ProposerSelector_GetProposer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProposer' +type ProposerSelector_GetProposer_Call struct { + *mock.Call +} + +// GetProposer is a helper method to define mock.On call +// - height int64 +// - round int32 +func (_e *ProposerSelector_Expecter) GetProposer(height interface{}, round interface{}) *ProposerSelector_GetProposer_Call { + return &ProposerSelector_GetProposer_Call{Call: _e.mock.On("GetProposer", height, round)} +} + +func (_c *ProposerSelector_GetProposer_Call) Run(run func(height int64, round int32)) *ProposerSelector_GetProposer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(int32)) + }) + return _c +} + +func (_c *ProposerSelector_GetProposer_Call) Return(_a0 *types.Validator, _a1 error) *ProposerSelector_GetProposer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProposerSelector_GetProposer_Call) RunAndReturn(run func(int64, int32) (*types.Validator, error)) *ProposerSelector_GetProposer_Call { + _c.Call.Return(run) + return _c +} + +// MustGetProposer provides a mock function with given fields: height, round +func (_m *ProposerSelector) MustGetProposer(height int64, round int32) *types.Validator { + ret := _m.Called(height, round) + + if len(ret) == 0 { + panic("no return value specified for MustGetProposer") + } + + var r0 *types.Validator + if rf, ok := ret.Get(0).(func(int64, int32) *types.Validator); ok { + r0 = rf(height, round) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Validator) + } + } + + return r0 +} + +// ProposerSelector_MustGetProposer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MustGetProposer' +type ProposerSelector_MustGetProposer_Call struct { + *mock.Call +} + +// MustGetProposer is a helper method to define mock.On call +// - height int64 +// - round int32 +func (_e *ProposerSelector_Expecter) MustGetProposer(height interface{}, round interface{}) *ProposerSelector_MustGetProposer_Call { + return &ProposerSelector_MustGetProposer_Call{Call: _e.mock.On("MustGetProposer", height, round)} +} + +func (_c *ProposerSelector_MustGetProposer_Call) Run(run func(height int64, round int32)) *ProposerSelector_MustGetProposer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(int32)) + }) + return _c +} + +func (_c *ProposerSelector_MustGetProposer_Call) Return(_a0 *types.Validator) *ProposerSelector_MustGetProposer_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ProposerSelector_MustGetProposer_Call) RunAndReturn(run func(int64, int32) *types.Validator) *ProposerSelector_MustGetProposer_Call { + _c.Call.Return(run) + return _c +} + +// UpdateHeightRound provides a mock function with given fields: height, round +func (_m *ProposerSelector) UpdateHeightRound(height int64, round int32) error { + ret := _m.Called(height, round) + + if len(ret) == 0 { + panic("no return value specified for UpdateHeightRound") + } + + var r0 error + if rf, ok := ret.Get(0).(func(int64, int32) error); ok { + r0 = rf(height, round) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ProposerSelector_UpdateHeightRound_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateHeightRound' +type ProposerSelector_UpdateHeightRound_Call struct { + *mock.Call +} + +// UpdateHeightRound is a helper method to define mock.On call +// - height int64 +// - round int32 +func (_e *ProposerSelector_Expecter) UpdateHeightRound(height interface{}, round interface{}) *ProposerSelector_UpdateHeightRound_Call { + return &ProposerSelector_UpdateHeightRound_Call{Call: _e.mock.On("UpdateHeightRound", height, round)} +} + +func (_c *ProposerSelector_UpdateHeightRound_Call) Run(run func(height int64, round int32)) *ProposerSelector_UpdateHeightRound_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(int32)) + }) + return _c +} + +func (_c *ProposerSelector_UpdateHeightRound_Call) Return(_a0 error) *ProposerSelector_UpdateHeightRound_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ProposerSelector_UpdateHeightRound_Call) RunAndReturn(run func(int64, int32) error) *ProposerSelector_UpdateHeightRound_Call { + _c.Call.Return(run) + return _c +} + +// ValidatorSet provides a mock function with given fields: +func (_m *ProposerSelector) ValidatorSet() *types.ValidatorSet { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for ValidatorSet") + } + + var r0 *types.ValidatorSet + if rf, ok := ret.Get(0).(func() *types.ValidatorSet); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ValidatorSet) + } + } + + return r0 +} + +// ProposerSelector_ValidatorSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorSet' +type ProposerSelector_ValidatorSet_Call struct { + *mock.Call +} + +// ValidatorSet is a helper method to define mock.On call +func (_e *ProposerSelector_Expecter) ValidatorSet() *ProposerSelector_ValidatorSet_Call { + return &ProposerSelector_ValidatorSet_Call{Call: _e.mock.On("ValidatorSet")} +} + +func (_c *ProposerSelector_ValidatorSet_Call) Run(run func()) *ProposerSelector_ValidatorSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ProposerSelector_ValidatorSet_Call) Return(_a0 *types.ValidatorSet) *ProposerSelector_ValidatorSet_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ProposerSelector_ValidatorSet_Call) RunAndReturn(run func() *types.ValidatorSet) *ProposerSelector_ValidatorSet_Call { + _c.Call.Return(run) + return _c +} + +// NewProposerSelector creates a new instance of ProposerSelector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewProposerSelector(t interface { + mock.TestingT + Cleanup(func()) +}) *ProposerSelector { + mock := &ProposerSelector{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/evidence/mocks/block_store.go b/internal/evidence/mocks/block_store.go deleted file mode 100644 index 0062c4c656..0000000000 --- a/internal/evidence/mocks/block_store.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - types "github.com/dashpay/tenderdash/types" - mock "github.com/stretchr/testify/mock" -) - -// BlockStore is an autogenerated mock type for the BlockStore type -type BlockStore struct { - mock.Mock -} - -// Base provides a mock function with given fields: -func (_m *BlockStore) Base() int64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Base") - } - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// Height provides a mock function with given fields: -func (_m *BlockStore) Height() int64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Height") - } - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// LoadBlockCommit provides a mock function with given fields: height -func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { - ret := _m.Called(height) - - if len(ret) == 0 { - panic("no return value specified for LoadBlockCommit") - } - - var r0 *types.Commit - if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { - r0 = rf(height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Commit) - } - } - - return r0 -} - -// LoadBlockMeta provides a mock function with given fields: height -func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { - ret := _m.Called(height) - - if len(ret) == 0 { - panic("no return value specified for LoadBlockMeta") - } - - var r0 *types.BlockMeta - if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { - r0 = rf(height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.BlockMeta) - } - } - - return r0 -} - -// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBlockStore(t interface { - mock.TestingT - Cleanup(func()) -}) *BlockStore { - mock := &BlockStore{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/evidence/mocks/blockstore.go b/internal/evidence/mocks/blockstore.go new file mode 100644 index 0000000000..0d34b27b21 --- /dev/null +++ b/internal/evidence/mocks/blockstore.go @@ -0,0 +1,221 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + types "github.com/dashpay/tenderdash/types" + mock "github.com/stretchr/testify/mock" +) + +// BlockStore is an autogenerated mock type for the BlockStore type +type BlockStore struct { + mock.Mock +} + +type BlockStore_Expecter struct { + mock *mock.Mock +} + +func (_m *BlockStore) EXPECT() *BlockStore_Expecter { + return &BlockStore_Expecter{mock: &_m.Mock} +} + +// Base provides a mock function with given fields: +func (_m *BlockStore) Base() int64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Base") + } + + var r0 int64 + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + return r0 +} + +// BlockStore_Base_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Base' +type BlockStore_Base_Call struct { + *mock.Call +} + +// Base is a helper method to define mock.On call +func (_e *BlockStore_Expecter) Base() *BlockStore_Base_Call { + return &BlockStore_Base_Call{Call: _e.mock.On("Base")} +} + +func (_c *BlockStore_Base_Call) Run(run func()) *BlockStore_Base_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BlockStore_Base_Call) Return(_a0 int64) *BlockStore_Base_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_Base_Call) RunAndReturn(run func() int64) *BlockStore_Base_Call { + _c.Call.Return(run) + return _c +} + +// Height provides a mock function with given fields: +func (_m *BlockStore) Height() int64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Height") + } + + var r0 int64 + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + return r0 +} + +// BlockStore_Height_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Height' +type BlockStore_Height_Call struct { + *mock.Call +} + +// Height is a helper method to define mock.On call +func (_e *BlockStore_Expecter) Height() *BlockStore_Height_Call { + return &BlockStore_Height_Call{Call: _e.mock.On("Height")} +} + +func (_c *BlockStore_Height_Call) Run(run func()) *BlockStore_Height_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BlockStore_Height_Call) Return(_a0 int64) *BlockStore_Height_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_Height_Call) RunAndReturn(run func() int64) *BlockStore_Height_Call { + _c.Call.Return(run) + return _c +} + +// LoadBlockCommit provides a mock function with given fields: height +func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { + ret := _m.Called(height) + + if len(ret) == 0 { + panic("no return value specified for LoadBlockCommit") + } + + var r0 *types.Commit + if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Commit) + } + } + + return r0 +} + +// BlockStore_LoadBlockCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockCommit' +type BlockStore_LoadBlockCommit_Call struct { + *mock.Call +} + +// LoadBlockCommit is a helper method to define mock.On call +// - height int64 +func (_e *BlockStore_Expecter) LoadBlockCommit(height interface{}) *BlockStore_LoadBlockCommit_Call { + return &BlockStore_LoadBlockCommit_Call{Call: _e.mock.On("LoadBlockCommit", height)} +} + +func (_c *BlockStore_LoadBlockCommit_Call) Run(run func(height int64)) *BlockStore_LoadBlockCommit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *BlockStore_LoadBlockCommit_Call) Return(_a0 *types.Commit) *BlockStore_LoadBlockCommit_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBlockCommit_Call) RunAndReturn(run func(int64) *types.Commit) *BlockStore_LoadBlockCommit_Call { + _c.Call.Return(run) + return _c +} + +// LoadBlockMeta provides a mock function with given fields: height +func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { + ret := _m.Called(height) + + if len(ret) == 0 { + panic("no return value specified for LoadBlockMeta") + } + + var r0 *types.BlockMeta + if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.BlockMeta) + } + } + + return r0 +} + +// BlockStore_LoadBlockMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockMeta' +type BlockStore_LoadBlockMeta_Call struct { + *mock.Call +} + +// LoadBlockMeta is a helper method to define mock.On call +// - height int64 +func (_e *BlockStore_Expecter) LoadBlockMeta(height interface{}) *BlockStore_LoadBlockMeta_Call { + return &BlockStore_LoadBlockMeta_Call{Call: _e.mock.On("LoadBlockMeta", height)} +} + +func (_c *BlockStore_LoadBlockMeta_Call) Run(run func(height int64)) *BlockStore_LoadBlockMeta_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *BlockStore_LoadBlockMeta_Call) Return(_a0 *types.BlockMeta) *BlockStore_LoadBlockMeta_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBlockMeta_Call) RunAndReturn(run func(int64) *types.BlockMeta) *BlockStore_LoadBlockMeta_Call { + _c.Call.Return(run) + return _c +} + +// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBlockStore(t interface { + mock.TestingT + Cleanup(func()) +}) *BlockStore { + mock := &BlockStore{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/mempool/mocks/mempool.go b/internal/mempool/mocks/mempool.go index 6f4996f400..671bbea635 100644 --- a/internal/mempool/mocks/mempool.go +++ b/internal/mempool/mocks/mempool.go @@ -19,6 +19,14 @@ type Mempool struct { mock.Mock } +type Mempool_Expecter struct { + mock *mock.Mock +} + +func (_m *Mempool) EXPECT() *Mempool_Expecter { + return &Mempool_Expecter{mock: &_m.Mock} +} + // CheckTx provides a mock function with given fields: ctx, tx, cb, txInfo func (_m *Mempool) CheckTx(ctx context.Context, tx types.Tx, cb func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) error { ret := _m.Called(ctx, tx, cb, txInfo) @@ -37,16 +45,101 @@ func (_m *Mempool) CheckTx(ctx context.Context, tx types.Tx, cb func(*abcitypes. return r0 } +// Mempool_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' +type Mempool_CheckTx_Call struct { + *mock.Call +} + +// CheckTx is a helper method to define mock.On call +// - ctx context.Context +// - tx types.Tx +// - cb func(*abcitypes.ResponseCheckTx) +// - txInfo mempool.TxInfo +func (_e *Mempool_Expecter) CheckTx(ctx interface{}, tx interface{}, cb interface{}, txInfo interface{}) *Mempool_CheckTx_Call { + return &Mempool_CheckTx_Call{Call: _e.mock.On("CheckTx", ctx, tx, cb, txInfo)} +} + +func (_c *Mempool_CheckTx_Call) Run(run func(ctx context.Context, tx types.Tx, cb func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo)) *Mempool_CheckTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx), args[2].(func(*abcitypes.ResponseCheckTx)), args[3].(mempool.TxInfo)) + }) + return _c +} + +func (_c *Mempool_CheckTx_Call) Return(_a0 error) *Mempool_CheckTx_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_CheckTx_Call) RunAndReturn(run func(context.Context, types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error) *Mempool_CheckTx_Call { + _c.Call.Return(run) + return _c +} + // EnableTxsAvailable provides a mock function with given fields: func (_m *Mempool) EnableTxsAvailable() { _m.Called() } +// Mempool_EnableTxsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableTxsAvailable' +type Mempool_EnableTxsAvailable_Call struct { + *mock.Call +} + +// EnableTxsAvailable is a helper method to define mock.On call +func (_e *Mempool_Expecter) EnableTxsAvailable() *Mempool_EnableTxsAvailable_Call { + return &Mempool_EnableTxsAvailable_Call{Call: _e.mock.On("EnableTxsAvailable")} +} + +func (_c *Mempool_EnableTxsAvailable_Call) Run(run func()) *Mempool_EnableTxsAvailable_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Mempool_EnableTxsAvailable_Call) Return() *Mempool_EnableTxsAvailable_Call { + _c.Call.Return() + return _c +} + +func (_c *Mempool_EnableTxsAvailable_Call) RunAndReturn(run func()) *Mempool_EnableTxsAvailable_Call { + _c.Call.Return(run) + return _c +} + // Flush provides a mock function with given fields: func (_m *Mempool) Flush() { _m.Called() } +// Mempool_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush' +type Mempool_Flush_Call struct { + *mock.Call +} + +// Flush is a helper method to define mock.On call +func (_e *Mempool_Expecter) Flush() *Mempool_Flush_Call { + return &Mempool_Flush_Call{Call: _e.mock.On("Flush")} +} + +func (_c *Mempool_Flush_Call) Run(run func()) *Mempool_Flush_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Mempool_Flush_Call) Return() *Mempool_Flush_Call { + _c.Call.Return() + return _c +} + +func (_c *Mempool_Flush_Call) RunAndReturn(run func()) *Mempool_Flush_Call { + _c.Call.Return(run) + return _c +} + // FlushAppConn provides a mock function with given fields: _a0 func (_m *Mempool) FlushAppConn(_a0 context.Context) error { ret := _m.Called(_a0) @@ -65,11 +158,66 @@ func (_m *Mempool) FlushAppConn(_a0 context.Context) error { return r0 } +// Mempool_FlushAppConn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlushAppConn' +type Mempool_FlushAppConn_Call struct { + *mock.Call +} + +// FlushAppConn is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Mempool_Expecter) FlushAppConn(_a0 interface{}) *Mempool_FlushAppConn_Call { + return &Mempool_FlushAppConn_Call{Call: _e.mock.On("FlushAppConn", _a0)} +} + +func (_c *Mempool_FlushAppConn_Call) Run(run func(_a0 context.Context)) *Mempool_FlushAppConn_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Mempool_FlushAppConn_Call) Return(_a0 error) *Mempool_FlushAppConn_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_FlushAppConn_Call) RunAndReturn(run func(context.Context) error) *Mempool_FlushAppConn_Call { + _c.Call.Return(run) + return _c +} + // Lock provides a mock function with given fields: func (_m *Mempool) Lock() { _m.Called() } +// Mempool_Lock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lock' +type Mempool_Lock_Call struct { + *mock.Call +} + +// Lock is a helper method to define mock.On call +func (_e *Mempool_Expecter) Lock() *Mempool_Lock_Call { + return &Mempool_Lock_Call{Call: _e.mock.On("Lock")} +} + +func (_c *Mempool_Lock_Call) Run(run func()) *Mempool_Lock_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Mempool_Lock_Call) Return() *Mempool_Lock_Call { + _c.Call.Return() + return _c +} + +func (_c *Mempool_Lock_Call) RunAndReturn(run func()) *Mempool_Lock_Call { + _c.Call.Return(run) + return _c +} + // ReapMaxBytesMaxGas provides a mock function with given fields: maxBytes, maxGas func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { ret := _m.Called(maxBytes, maxGas) @@ -90,6 +238,35 @@ func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { return r0 } +// Mempool_ReapMaxBytesMaxGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReapMaxBytesMaxGas' +type Mempool_ReapMaxBytesMaxGas_Call struct { + *mock.Call +} + +// ReapMaxBytesMaxGas is a helper method to define mock.On call +// - maxBytes int64 +// - maxGas int64 +func (_e *Mempool_Expecter) ReapMaxBytesMaxGas(maxBytes interface{}, maxGas interface{}) *Mempool_ReapMaxBytesMaxGas_Call { + return &Mempool_ReapMaxBytesMaxGas_Call{Call: _e.mock.On("ReapMaxBytesMaxGas", maxBytes, maxGas)} +} + +func (_c *Mempool_ReapMaxBytesMaxGas_Call) Run(run func(maxBytes int64, maxGas int64)) *Mempool_ReapMaxBytesMaxGas_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(int64)) + }) + return _c +} + +func (_c *Mempool_ReapMaxBytesMaxGas_Call) Return(_a0 types.Txs) *Mempool_ReapMaxBytesMaxGas_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_ReapMaxBytesMaxGas_Call) RunAndReturn(run func(int64, int64) types.Txs) *Mempool_ReapMaxBytesMaxGas_Call { + _c.Call.Return(run) + return _c +} + // ReapMaxTxs provides a mock function with given fields: max func (_m *Mempool) ReapMaxTxs(max int) types.Txs { ret := _m.Called(max) @@ -110,6 +287,34 @@ func (_m *Mempool) ReapMaxTxs(max int) types.Txs { return r0 } +// Mempool_ReapMaxTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReapMaxTxs' +type Mempool_ReapMaxTxs_Call struct { + *mock.Call +} + +// ReapMaxTxs is a helper method to define mock.On call +// - max int +func (_e *Mempool_Expecter) ReapMaxTxs(max interface{}) *Mempool_ReapMaxTxs_Call { + return &Mempool_ReapMaxTxs_Call{Call: _e.mock.On("ReapMaxTxs", max)} +} + +func (_c *Mempool_ReapMaxTxs_Call) Run(run func(max int)) *Mempool_ReapMaxTxs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *Mempool_ReapMaxTxs_Call) Return(_a0 types.Txs) *Mempool_ReapMaxTxs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_ReapMaxTxs_Call) RunAndReturn(run func(int) types.Txs) *Mempool_ReapMaxTxs_Call { + _c.Call.Return(run) + return _c +} + // RemoveTxByKey provides a mock function with given fields: txKey func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { ret := _m.Called(txKey) @@ -128,6 +333,34 @@ func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { return r0 } +// Mempool_RemoveTxByKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveTxByKey' +type Mempool_RemoveTxByKey_Call struct { + *mock.Call +} + +// RemoveTxByKey is a helper method to define mock.On call +// - txKey types.TxKey +func (_e *Mempool_Expecter) RemoveTxByKey(txKey interface{}) *Mempool_RemoveTxByKey_Call { + return &Mempool_RemoveTxByKey_Call{Call: _e.mock.On("RemoveTxByKey", txKey)} +} + +func (_c *Mempool_RemoveTxByKey_Call) Run(run func(txKey types.TxKey)) *Mempool_RemoveTxByKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.TxKey)) + }) + return _c +} + +func (_c *Mempool_RemoveTxByKey_Call) Return(_a0 error) *Mempool_RemoveTxByKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_RemoveTxByKey_Call) RunAndReturn(run func(types.TxKey) error) *Mempool_RemoveTxByKey_Call { + _c.Call.Return(run) + return _c +} + // Size provides a mock function with given fields: func (_m *Mempool) Size() int { ret := _m.Called() @@ -146,6 +379,33 @@ func (_m *Mempool) Size() int { return r0 } +// Mempool_Size_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Size' +type Mempool_Size_Call struct { + *mock.Call +} + +// Size is a helper method to define mock.On call +func (_e *Mempool_Expecter) Size() *Mempool_Size_Call { + return &Mempool_Size_Call{Call: _e.mock.On("Size")} +} + +func (_c *Mempool_Size_Call) Run(run func()) *Mempool_Size_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Mempool_Size_Call) Return(_a0 int) *Mempool_Size_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_Size_Call) RunAndReturn(run func() int) *Mempool_Size_Call { + _c.Call.Return(run) + return _c +} + // SizeBytes provides a mock function with given fields: func (_m *Mempool) SizeBytes() int64 { ret := _m.Called() @@ -164,6 +424,33 @@ func (_m *Mempool) SizeBytes() int64 { return r0 } +// Mempool_SizeBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SizeBytes' +type Mempool_SizeBytes_Call struct { + *mock.Call +} + +// SizeBytes is a helper method to define mock.On call +func (_e *Mempool_Expecter) SizeBytes() *Mempool_SizeBytes_Call { + return &Mempool_SizeBytes_Call{Call: _e.mock.On("SizeBytes")} +} + +func (_c *Mempool_SizeBytes_Call) Run(run func()) *Mempool_SizeBytes_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Mempool_SizeBytes_Call) Return(_a0 int64) *Mempool_SizeBytes_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_SizeBytes_Call) RunAndReturn(run func() int64) *Mempool_SizeBytes_Call { + _c.Call.Return(run) + return _c +} + // TxsAvailable provides a mock function with given fields: func (_m *Mempool) TxsAvailable() <-chan struct{} { ret := _m.Called() @@ -184,11 +471,65 @@ func (_m *Mempool) TxsAvailable() <-chan struct{} { return r0 } +// Mempool_TxsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxsAvailable' +type Mempool_TxsAvailable_Call struct { + *mock.Call +} + +// TxsAvailable is a helper method to define mock.On call +func (_e *Mempool_Expecter) TxsAvailable() *Mempool_TxsAvailable_Call { + return &Mempool_TxsAvailable_Call{Call: _e.mock.On("TxsAvailable")} +} + +func (_c *Mempool_TxsAvailable_Call) Run(run func()) *Mempool_TxsAvailable_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Mempool_TxsAvailable_Call) Return(_a0 <-chan struct{}) *Mempool_TxsAvailable_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_TxsAvailable_Call) RunAndReturn(run func() <-chan struct{}) *Mempool_TxsAvailable_Call { + _c.Call.Return(run) + return _c +} + // Unlock provides a mock function with given fields: func (_m *Mempool) Unlock() { _m.Called() } +// Mempool_Unlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unlock' +type Mempool_Unlock_Call struct { + *mock.Call +} + +// Unlock is a helper method to define mock.On call +func (_e *Mempool_Expecter) Unlock() *Mempool_Unlock_Call { + return &Mempool_Unlock_Call{Call: _e.mock.On("Unlock")} +} + +func (_c *Mempool_Unlock_Call) Run(run func()) *Mempool_Unlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Mempool_Unlock_Call) Return() *Mempool_Unlock_Call { + _c.Call.Return() + return _c +} + +func (_c *Mempool_Unlock_Call) RunAndReturn(run func()) *Mempool_Unlock_Call { + _c.Call.Return(run) + return _c +} + // Update provides a mock function with given fields: ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc, recheck bool) error { ret := _m.Called(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck) @@ -207,6 +548,40 @@ func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types return r0 } +// Mempool_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type Mempool_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - blockHeight int64 +// - blockTxs types.Txs +// - txResults []*abcitypes.ExecTxResult +// - newPreFn mempool.PreCheckFunc +// - newPostFn mempool.PostCheckFunc +// - recheck bool +func (_e *Mempool_Expecter) Update(ctx interface{}, blockHeight interface{}, blockTxs interface{}, txResults interface{}, newPreFn interface{}, newPostFn interface{}, recheck interface{}) *Mempool_Update_Call { + return &Mempool_Update_Call{Call: _e.mock.On("Update", ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck)} +} + +func (_c *Mempool_Update_Call) Run(run func(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc, recheck bool)) *Mempool_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(types.Txs), args[3].([]*abcitypes.ExecTxResult), args[4].(mempool.PreCheckFunc), args[5].(mempool.PostCheckFunc), args[6].(bool)) + }) + return _c +} + +func (_c *Mempool_Update_Call) Return(_a0 error) *Mempool_Update_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Mempool_Update_Call) RunAndReturn(run func(context.Context, int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc, bool) error) *Mempool_Update_Call { + _c.Call.Return(run) + return _c +} + // NewMempool creates a new instance of Mempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMempool(t interface { diff --git a/internal/p2p/client/mocks/block_client.go b/internal/p2p/client/mocks/block_client.go deleted file mode 100644 index 5afae1d30a..0000000000 --- a/internal/p2p/client/mocks/block_client.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - blocksync "github.com/dashpay/tenderdash/proto/tendermint/blocksync" - - context "context" - - mock "github.com/stretchr/testify/mock" - - promise "github.com/dashpay/tenderdash/libs/promise" - - types "github.com/dashpay/tenderdash/types" -) - -// BlockClient is an autogenerated mock type for the BlockClient type -type BlockClient struct { - mock.Mock -} - -// GetBlock provides a mock function with given fields: ctx, height, peerID -func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error) { - ret := _m.Called(ctx, height, peerID) - - if len(ret) == 0 { - panic("no return value specified for GetBlock") - } - - var r0 *promise.Promise[*blocksync.BlockResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)); ok { - return rf(ctx, height, peerID) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, types.NodeID) *promise.Promise[*blocksync.BlockResponse]); ok { - r0 = rf(ctx, height, peerID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*promise.Promise[*blocksync.BlockResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, types.NodeID) error); ok { - r1 = rf(ctx, height, peerID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSyncStatus provides a mock function with given fields: ctx -func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetSyncStatus") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Send provides a mock function with given fields: ctx, msg -func (_m *BlockClient) Send(ctx context.Context, msg any) error { - ret := _m.Called(ctx, msg) - - if len(ret) == 0 { - panic("no return value specified for Send") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, any) error); ok { - r0 = rf(ctx, msg) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewBlockClient creates a new instance of BlockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBlockClient(t interface { - mock.TestingT - Cleanup(func()) -}) *BlockClient { - mock := &BlockClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/p2p/client/mocks/blockclient.go b/internal/p2p/client/mocks/blockclient.go new file mode 100644 index 0000000000..d4b8d0e3bd --- /dev/null +++ b/internal/p2p/client/mocks/blockclient.go @@ -0,0 +1,195 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + blocksync "github.com/dashpay/tenderdash/proto/tendermint/blocksync" + + context "context" + + mock "github.com/stretchr/testify/mock" + + promise "github.com/dashpay/tenderdash/libs/promise" + + types "github.com/dashpay/tenderdash/types" +) + +// BlockClient is an autogenerated mock type for the BlockClient type +type BlockClient struct { + mock.Mock +} + +type BlockClient_Expecter struct { + mock *mock.Mock +} + +func (_m *BlockClient) EXPECT() *BlockClient_Expecter { + return &BlockClient_Expecter{mock: &_m.Mock} +} + +// GetBlock provides a mock function with given fields: ctx, height, peerID +func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error) { + ret := _m.Called(ctx, height, peerID) + + if len(ret) == 0 { + panic("no return value specified for GetBlock") + } + + var r0 *promise.Promise[*blocksync.BlockResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)); ok { + return rf(ctx, height, peerID) + } + if rf, ok := ret.Get(0).(func(context.Context, int64, types.NodeID) *promise.Promise[*blocksync.BlockResponse]); ok { + r0 = rf(ctx, height, peerID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*promise.Promise[*blocksync.BlockResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, int64, types.NodeID) error); ok { + r1 = rf(ctx, height, peerID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BlockClient_GetBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlock' +type BlockClient_GetBlock_Call struct { + *mock.Call +} + +// GetBlock is a helper method to define mock.On call +// - ctx context.Context +// - height int64 +// - peerID types.NodeID +func (_e *BlockClient_Expecter) GetBlock(ctx interface{}, height interface{}, peerID interface{}) *BlockClient_GetBlock_Call { + return &BlockClient_GetBlock_Call{Call: _e.mock.On("GetBlock", ctx, height, peerID)} +} + +func (_c *BlockClient_GetBlock_Call) Run(run func(ctx context.Context, height int64, peerID types.NodeID)) *BlockClient_GetBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(types.NodeID)) + }) + return _c +} + +func (_c *BlockClient_GetBlock_Call) Return(_a0 *promise.Promise[*blocksync.BlockResponse], _a1 error) *BlockClient_GetBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BlockClient_GetBlock_Call) RunAndReturn(run func(context.Context, int64, types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)) *BlockClient_GetBlock_Call { + _c.Call.Return(run) + return _c +} + +// GetSyncStatus provides a mock function with given fields: ctx +func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetSyncStatus") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BlockClient_GetSyncStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSyncStatus' +type BlockClient_GetSyncStatus_Call struct { + *mock.Call +} + +// GetSyncStatus is a helper method to define mock.On call +// - ctx context.Context +func (_e *BlockClient_Expecter) GetSyncStatus(ctx interface{}) *BlockClient_GetSyncStatus_Call { + return &BlockClient_GetSyncStatus_Call{Call: _e.mock.On("GetSyncStatus", ctx)} +} + +func (_c *BlockClient_GetSyncStatus_Call) Run(run func(ctx context.Context)) *BlockClient_GetSyncStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *BlockClient_GetSyncStatus_Call) Return(_a0 error) *BlockClient_GetSyncStatus_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockClient_GetSyncStatus_Call) RunAndReturn(run func(context.Context) error) *BlockClient_GetSyncStatus_Call { + _c.Call.Return(run) + return _c +} + +// Send provides a mock function with given fields: ctx, msg +func (_m *BlockClient) Send(ctx context.Context, msg any) error { + ret := _m.Called(ctx, msg) + + if len(ret) == 0 { + panic("no return value specified for Send") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, any) error); ok { + r0 = rf(ctx, msg) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BlockClient_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type BlockClient_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - ctx context.Context +// - msg any +func (_e *BlockClient_Expecter) Send(ctx interface{}, msg interface{}) *BlockClient_Send_Call { + return &BlockClient_Send_Call{Call: _e.mock.On("Send", ctx, msg)} +} + +func (_c *BlockClient_Send_Call) Run(run func(ctx context.Context, msg any)) *BlockClient_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(any)) + }) + return _c +} + +func (_c *BlockClient_Send_Call) Return(_a0 error) *BlockClient_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockClient_Send_Call) RunAndReturn(run func(context.Context, any) error) *BlockClient_Send_Call { + _c.Call.Return(run) + return _c +} + +// NewBlockClient creates a new instance of BlockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBlockClient(t interface { + mock.TestingT + Cleanup(func()) +}) *BlockClient { + mock := &BlockClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/p2p/client/mocks/snapshot_client.go b/internal/p2p/client/mocks/snapshot_client.go deleted file mode 100644 index a88f2e269b..0000000000 --- a/internal/p2p/client/mocks/snapshot_client.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - promise "github.com/dashpay/tenderdash/libs/promise" - mock "github.com/stretchr/testify/mock" - - statesync "github.com/dashpay/tenderdash/proto/tendermint/statesync" - - types "github.com/dashpay/tenderdash/types" -) - -// SnapshotClient is an autogenerated mock type for the SnapshotClient type -type SnapshotClient struct { - mock.Mock -} - -// GetChunk provides a mock function with given fields: ctx, peerID, height, format, index -func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32) (*promise.Promise[*statesync.ChunkResponse], error) { - ret := _m.Called(ctx, peerID, height, format, index) - - if len(ret) == 0 { - panic("no return value specified for GetChunk") - } - - var r0 *promise.Promise[*statesync.ChunkResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64, uint32, uint32) (*promise.Promise[*statesync.ChunkResponse], error)); ok { - return rf(ctx, peerID, height, format, index) - } - if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64, uint32, uint32) *promise.Promise[*statesync.ChunkResponse]); ok { - r0 = rf(ctx, peerID, height, format, index) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*promise.Promise[*statesync.ChunkResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.NodeID, uint64, uint32, uint32) error); ok { - r1 = rf(ctx, peerID, height, format, index) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetLightBlock provides a mock function with given fields: ctx, peerID, height -func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.LightBlockResponse], error) { - ret := _m.Called(ctx, peerID, height) - - if len(ret) == 0 { - panic("no return value specified for GetLightBlock") - } - - var r0 *promise.Promise[*statesync.LightBlockResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.LightBlockResponse], error)); ok { - return rf(ctx, peerID, height) - } - if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) *promise.Promise[*statesync.LightBlockResponse]); ok { - r0 = rf(ctx, peerID, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*promise.Promise[*statesync.LightBlockResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.NodeID, uint64) error); ok { - r1 = rf(ctx, peerID, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetParams provides a mock function with given fields: ctx, peerID, height -func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.ParamsResponse], error) { - ret := _m.Called(ctx, peerID, height) - - if len(ret) == 0 { - panic("no return value specified for GetParams") - } - - var r0 *promise.Promise[*statesync.ParamsResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.ParamsResponse], error)); ok { - return rf(ctx, peerID, height) - } - if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) *promise.Promise[*statesync.ParamsResponse]); ok { - r0 = rf(ctx, peerID, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*promise.Promise[*statesync.ParamsResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.NodeID, uint64) error); ok { - r1 = rf(ctx, peerID, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSnapshots provides a mock function with given fields: ctx, peerID -func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) error { - ret := _m.Called(ctx, peerID) - - if len(ret) == 0 { - panic("no return value specified for GetSnapshots") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.NodeID) error); ok { - r0 = rf(ctx, peerID) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewSnapshotClient creates a new instance of SnapshotClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSnapshotClient(t interface { - mock.TestingT - Cleanup(func()) -}) *SnapshotClient { - mock := &SnapshotClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/p2p/client/mocks/snapshotclient.go b/internal/p2p/client/mocks/snapshotclient.go new file mode 100644 index 0000000000..543143be7b --- /dev/null +++ b/internal/p2p/client/mocks/snapshotclient.go @@ -0,0 +1,270 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + context "context" + + promise "github.com/dashpay/tenderdash/libs/promise" + mock "github.com/stretchr/testify/mock" + + statesync "github.com/dashpay/tenderdash/proto/tendermint/statesync" + + types "github.com/dashpay/tenderdash/types" +) + +// SnapshotClient is an autogenerated mock type for the SnapshotClient type +type SnapshotClient struct { + mock.Mock +} + +type SnapshotClient_Expecter struct { + mock *mock.Mock +} + +func (_m *SnapshotClient) EXPECT() *SnapshotClient_Expecter { + return &SnapshotClient_Expecter{mock: &_m.Mock} +} + +// GetChunk provides a mock function with given fields: ctx, peerID, height, format, index +func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32) (*promise.Promise[*statesync.ChunkResponse], error) { + ret := _m.Called(ctx, peerID, height, format, index) + + if len(ret) == 0 { + panic("no return value specified for GetChunk") + } + + var r0 *promise.Promise[*statesync.ChunkResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64, uint32, uint32) (*promise.Promise[*statesync.ChunkResponse], error)); ok { + return rf(ctx, peerID, height, format, index) + } + if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64, uint32, uint32) *promise.Promise[*statesync.ChunkResponse]); ok { + r0 = rf(ctx, peerID, height, format, index) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*promise.Promise[*statesync.ChunkResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.NodeID, uint64, uint32, uint32) error); ok { + r1 = rf(ctx, peerID, height, format, index) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SnapshotClient_GetChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChunk' +type SnapshotClient_GetChunk_Call struct { + *mock.Call +} + +// GetChunk is a helper method to define mock.On call +// - ctx context.Context +// - peerID types.NodeID +// - height uint64 +// - format uint32 +// - index uint32 +func (_e *SnapshotClient_Expecter) GetChunk(ctx interface{}, peerID interface{}, height interface{}, format interface{}, index interface{}) *SnapshotClient_GetChunk_Call { + return &SnapshotClient_GetChunk_Call{Call: _e.mock.On("GetChunk", ctx, peerID, height, format, index)} +} + +func (_c *SnapshotClient_GetChunk_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32)) *SnapshotClient_GetChunk_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.NodeID), args[2].(uint64), args[3].(uint32), args[4].(uint32)) + }) + return _c +} + +func (_c *SnapshotClient_GetChunk_Call) Return(_a0 *promise.Promise[*statesync.ChunkResponse], _a1 error) *SnapshotClient_GetChunk_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SnapshotClient_GetChunk_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64, uint32, uint32) (*promise.Promise[*statesync.ChunkResponse], error)) *SnapshotClient_GetChunk_Call { + _c.Call.Return(run) + return _c +} + +// GetLightBlock provides a mock function with given fields: ctx, peerID, height +func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.LightBlockResponse], error) { + ret := _m.Called(ctx, peerID, height) + + if len(ret) == 0 { + panic("no return value specified for GetLightBlock") + } + + var r0 *promise.Promise[*statesync.LightBlockResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.LightBlockResponse], error)); ok { + return rf(ctx, peerID, height) + } + if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) *promise.Promise[*statesync.LightBlockResponse]); ok { + r0 = rf(ctx, peerID, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*promise.Promise[*statesync.LightBlockResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.NodeID, uint64) error); ok { + r1 = rf(ctx, peerID, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SnapshotClient_GetLightBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLightBlock' +type SnapshotClient_GetLightBlock_Call struct { + *mock.Call +} + +// GetLightBlock is a helper method to define mock.On call +// - ctx context.Context +// - peerID types.NodeID +// - height uint64 +func (_e *SnapshotClient_Expecter) GetLightBlock(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetLightBlock_Call { + return &SnapshotClient_GetLightBlock_Call{Call: _e.mock.On("GetLightBlock", ctx, peerID, height)} +} + +func (_c *SnapshotClient_GetLightBlock_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64)) *SnapshotClient_GetLightBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.NodeID), args[2].(uint64)) + }) + return _c +} + +func (_c *SnapshotClient_GetLightBlock_Call) Return(_a0 *promise.Promise[*statesync.LightBlockResponse], _a1 error) *SnapshotClient_GetLightBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SnapshotClient_GetLightBlock_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.LightBlockResponse], error)) *SnapshotClient_GetLightBlock_Call { + _c.Call.Return(run) + return _c +} + +// GetParams provides a mock function with given fields: ctx, peerID, height +func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.ParamsResponse], error) { + ret := _m.Called(ctx, peerID, height) + + if len(ret) == 0 { + panic("no return value specified for GetParams") + } + + var r0 *promise.Promise[*statesync.ParamsResponse] + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.ParamsResponse], error)); ok { + return rf(ctx, peerID, height) + } + if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) *promise.Promise[*statesync.ParamsResponse]); ok { + r0 = rf(ctx, peerID, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*promise.Promise[*statesync.ParamsResponse]) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.NodeID, uint64) error); ok { + r1 = rf(ctx, peerID, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SnapshotClient_GetParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParams' +type SnapshotClient_GetParams_Call struct { + *mock.Call +} + +// GetParams is a helper method to define mock.On call +// - ctx context.Context +// - peerID types.NodeID +// - height uint64 +func (_e *SnapshotClient_Expecter) GetParams(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetParams_Call { + return &SnapshotClient_GetParams_Call{Call: _e.mock.On("GetParams", ctx, peerID, height)} +} + +func (_c *SnapshotClient_GetParams_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64)) *SnapshotClient_GetParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.NodeID), args[2].(uint64)) + }) + return _c +} + +func (_c *SnapshotClient_GetParams_Call) Return(_a0 *promise.Promise[*statesync.ParamsResponse], _a1 error) *SnapshotClient_GetParams_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SnapshotClient_GetParams_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.ParamsResponse], error)) *SnapshotClient_GetParams_Call { + _c.Call.Return(run) + return _c +} + +// GetSnapshots provides a mock function with given fields: ctx, peerID +func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) error { + ret := _m.Called(ctx, peerID) + + if len(ret) == 0 { + panic("no return value specified for GetSnapshots") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, types.NodeID) error); ok { + r0 = rf(ctx, peerID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SnapshotClient_GetSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSnapshots' +type SnapshotClient_GetSnapshots_Call struct { + *mock.Call +} + +// GetSnapshots is a helper method to define mock.On call +// - ctx context.Context +// - peerID types.NodeID +func (_e *SnapshotClient_Expecter) GetSnapshots(ctx interface{}, peerID interface{}) *SnapshotClient_GetSnapshots_Call { + return &SnapshotClient_GetSnapshots_Call{Call: _e.mock.On("GetSnapshots", ctx, peerID)} +} + +func (_c *SnapshotClient_GetSnapshots_Call) Run(run func(ctx context.Context, peerID types.NodeID)) *SnapshotClient_GetSnapshots_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.NodeID)) + }) + return _c +} + +func (_c *SnapshotClient_GetSnapshots_Call) Return(_a0 error) *SnapshotClient_GetSnapshots_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *SnapshotClient_GetSnapshots_Call) RunAndReturn(run func(context.Context, types.NodeID) error) *SnapshotClient_GetSnapshots_Call { + _c.Call.Return(run) + return _c +} + +// NewSnapshotClient creates a new instance of SnapshotClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewSnapshotClient(t interface { + mock.TestingT + Cleanup(func()) +}) *SnapshotClient { + mock := &SnapshotClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/p2p/mocks/channel.go b/internal/p2p/mocks/channel.go index ae54580e6f..9ff79d4f5f 100644 --- a/internal/p2p/mocks/channel.go +++ b/internal/p2p/mocks/channel.go @@ -14,6 +14,14 @@ type Channel struct { mock.Mock } +type Channel_Expecter struct { + mock *mock.Mock +} + +func (_m *Channel) EXPECT() *Channel_Expecter { + return &Channel_Expecter{mock: &_m.Mock} +} + // Err provides a mock function with given fields: func (_m *Channel) Err() error { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *Channel) Err() error { return r0 } +// Channel_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err' +type Channel_Err_Call struct { + *mock.Call +} + +// Err is a helper method to define mock.On call +func (_e *Channel_Expecter) Err() *Channel_Err_Call { + return &Channel_Err_Call{Call: _e.mock.On("Err")} +} + +func (_c *Channel_Err_Call) Run(run func()) *Channel_Err_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Channel_Err_Call) Return(_a0 error) *Channel_Err_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Channel_Err_Call) RunAndReturn(run func() error) *Channel_Err_Call { + _c.Call.Return(run) + return _c +} + // Receive provides a mock function with given fields: _a0 func (_m *Channel) Receive(_a0 context.Context) p2p.ChannelIterator { ret := _m.Called(_a0) @@ -52,6 +87,34 @@ func (_m *Channel) Receive(_a0 context.Context) p2p.ChannelIterator { return r0 } +// Channel_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' +type Channel_Receive_Call struct { + *mock.Call +} + +// Receive is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Channel_Expecter) Receive(_a0 interface{}) *Channel_Receive_Call { + return &Channel_Receive_Call{Call: _e.mock.On("Receive", _a0)} +} + +func (_c *Channel_Receive_Call) Run(run func(_a0 context.Context)) *Channel_Receive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Channel_Receive_Call) Return(_a0 p2p.ChannelIterator) *Channel_Receive_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Channel_Receive_Call) RunAndReturn(run func(context.Context) p2p.ChannelIterator) *Channel_Receive_Call { + _c.Call.Return(run) + return _c +} + // Send provides a mock function with given fields: _a0, _a1 func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error { ret := _m.Called(_a0, _a1) @@ -70,6 +133,35 @@ func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error { return r0 } +// Channel_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type Channel_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 p2p.Envelope +func (_e *Channel_Expecter) Send(_a0 interface{}, _a1 interface{}) *Channel_Send_Call { + return &Channel_Send_Call{Call: _e.mock.On("Send", _a0, _a1)} +} + +func (_c *Channel_Send_Call) Run(run func(_a0 context.Context, _a1 p2p.Envelope)) *Channel_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(p2p.Envelope)) + }) + return _c +} + +func (_c *Channel_Send_Call) Return(_a0 error) *Channel_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Channel_Send_Call) RunAndReturn(run func(context.Context, p2p.Envelope) error) *Channel_Send_Call { + _c.Call.Return(run) + return _c +} + // SendError provides a mock function with given fields: _a0, _a1 func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { ret := _m.Called(_a0, _a1) @@ -88,6 +180,35 @@ func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { return r0 } +// Channel_SendError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendError' +type Channel_SendError_Call struct { + *mock.Call +} + +// SendError is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 p2p.PeerError +func (_e *Channel_Expecter) SendError(_a0 interface{}, _a1 interface{}) *Channel_SendError_Call { + return &Channel_SendError_Call{Call: _e.mock.On("SendError", _a0, _a1)} +} + +func (_c *Channel_SendError_Call) Run(run func(_a0 context.Context, _a1 p2p.PeerError)) *Channel_SendError_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(p2p.PeerError)) + }) + return _c +} + +func (_c *Channel_SendError_Call) Return(_a0 error) *Channel_SendError_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Channel_SendError_Call) RunAndReturn(run func(context.Context, p2p.PeerError) error) *Channel_SendError_Call { + _c.Call.Return(run) + return _c +} + // String provides a mock function with given fields: func (_m *Channel) String() string { ret := _m.Called() @@ -106,6 +227,33 @@ func (_m *Channel) String() string { return r0 } +// Channel_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type Channel_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *Channel_Expecter) String() *Channel_String_Call { + return &Channel_String_Call{Call: _e.mock.On("String")} +} + +func (_c *Channel_String_Call) Run(run func()) *Channel_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Channel_String_Call) Return(_a0 string) *Channel_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Channel_String_Call) RunAndReturn(run func() string) *Channel_String_Call { + _c.Call.Return(run) + return _c +} + // NewChannel creates a new instance of Channel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewChannel(t interface { diff --git a/internal/p2p/mocks/connection.go b/internal/p2p/mocks/connection.go index 8555ef9e34..1b0611d4b6 100644 --- a/internal/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -20,6 +20,14 @@ type Connection struct { mock.Mock } +type Connection_Expecter struct { + mock *mock.Mock +} + +func (_m *Connection) EXPECT() *Connection_Expecter { + return &Connection_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *Connection) Close() error { ret := _m.Called() @@ -38,6 +46,33 @@ func (_m *Connection) Close() error { return r0 } +// Connection_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Connection_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Connection_Expecter) Close() *Connection_Close_Call { + return &Connection_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Connection_Close_Call) Run(run func()) *Connection_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Connection_Close_Call) Return(_a0 error) *Connection_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Connection_Close_Call) RunAndReturn(run func() error) *Connection_Close_Call { + _c.Call.Return(run) + return _c +} + // Handshake provides a mock function with given fields: _a0, _a1, _a2, _a3 func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 types.NodeInfo, _a3 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error) { ret := _m.Called(_a0, _a1, _a2, _a3) @@ -75,6 +110,37 @@ func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 type return r0, r1, r2 } +// Connection_Handshake_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Handshake' +type Connection_Handshake_Call struct { + *mock.Call +} + +// Handshake is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 time.Duration +// - _a2 types.NodeInfo +// - _a3 crypto.PrivKey +func (_e *Connection_Expecter) Handshake(_a0 interface{}, _a1 interface{}, _a2 interface{}, _a3 interface{}) *Connection_Handshake_Call { + return &Connection_Handshake_Call{Call: _e.mock.On("Handshake", _a0, _a1, _a2, _a3)} +} + +func (_c *Connection_Handshake_Call) Run(run func(_a0 context.Context, _a1 time.Duration, _a2 types.NodeInfo, _a3 crypto.PrivKey)) *Connection_Handshake_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Duration), args[2].(types.NodeInfo), args[3].(crypto.PrivKey)) + }) + return _c +} + +func (_c *Connection_Handshake_Call) Return(_a0 types.NodeInfo, _a1 crypto.PubKey, _a2 error) *Connection_Handshake_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *Connection_Handshake_Call) RunAndReturn(run func(context.Context, time.Duration, types.NodeInfo, crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error)) *Connection_Handshake_Call { + _c.Call.Return(run) + return _c +} + // LocalEndpoint provides a mock function with given fields: func (_m *Connection) LocalEndpoint() p2p.Endpoint { ret := _m.Called() @@ -93,6 +159,33 @@ func (_m *Connection) LocalEndpoint() p2p.Endpoint { return r0 } +// Connection_LocalEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LocalEndpoint' +type Connection_LocalEndpoint_Call struct { + *mock.Call +} + +// LocalEndpoint is a helper method to define mock.On call +func (_e *Connection_Expecter) LocalEndpoint() *Connection_LocalEndpoint_Call { + return &Connection_LocalEndpoint_Call{Call: _e.mock.On("LocalEndpoint")} +} + +func (_c *Connection_LocalEndpoint_Call) Run(run func()) *Connection_LocalEndpoint_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Connection_LocalEndpoint_Call) Return(_a0 p2p.Endpoint) *Connection_LocalEndpoint_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Connection_LocalEndpoint_Call) RunAndReturn(run func() p2p.Endpoint) *Connection_LocalEndpoint_Call { + _c.Call.Return(run) + return _c +} + // ReceiveMessage provides a mock function with given fields: _a0 func (_m *Connection) ReceiveMessage(_a0 context.Context) (p2p.ChannelID, []byte, error) { ret := _m.Called(_a0) @@ -130,6 +223,34 @@ func (_m *Connection) ReceiveMessage(_a0 context.Context) (p2p.ChannelID, []byte return r0, r1, r2 } +// Connection_ReceiveMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReceiveMessage' +type Connection_ReceiveMessage_Call struct { + *mock.Call +} + +// ReceiveMessage is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Connection_Expecter) ReceiveMessage(_a0 interface{}) *Connection_ReceiveMessage_Call { + return &Connection_ReceiveMessage_Call{Call: _e.mock.On("ReceiveMessage", _a0)} +} + +func (_c *Connection_ReceiveMessage_Call) Run(run func(_a0 context.Context)) *Connection_ReceiveMessage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Connection_ReceiveMessage_Call) Return(_a0 p2p.ChannelID, _a1 []byte, _a2 error) *Connection_ReceiveMessage_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *Connection_ReceiveMessage_Call) RunAndReturn(run func(context.Context) (p2p.ChannelID, []byte, error)) *Connection_ReceiveMessage_Call { + _c.Call.Return(run) + return _c +} + // RemoteEndpoint provides a mock function with given fields: func (_m *Connection) RemoteEndpoint() p2p.Endpoint { ret := _m.Called() @@ -148,6 +269,33 @@ func (_m *Connection) RemoteEndpoint() p2p.Endpoint { return r0 } +// Connection_RemoteEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoteEndpoint' +type Connection_RemoteEndpoint_Call struct { + *mock.Call +} + +// RemoteEndpoint is a helper method to define mock.On call +func (_e *Connection_Expecter) RemoteEndpoint() *Connection_RemoteEndpoint_Call { + return &Connection_RemoteEndpoint_Call{Call: _e.mock.On("RemoteEndpoint")} +} + +func (_c *Connection_RemoteEndpoint_Call) Run(run func()) *Connection_RemoteEndpoint_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Connection_RemoteEndpoint_Call) Return(_a0 p2p.Endpoint) *Connection_RemoteEndpoint_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Connection_RemoteEndpoint_Call) RunAndReturn(run func() p2p.Endpoint) *Connection_RemoteEndpoint_Call { + _c.Call.Return(run) + return _c +} + // SendMessage provides a mock function with given fields: _a0, _a1, _a2 func (_m *Connection) SendMessage(_a0 context.Context, _a1 p2p.ChannelID, _a2 []byte) error { ret := _m.Called(_a0, _a1, _a2) @@ -166,6 +314,36 @@ func (_m *Connection) SendMessage(_a0 context.Context, _a1 p2p.ChannelID, _a2 [] return r0 } +// Connection_SendMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMessage' +type Connection_SendMessage_Call struct { + *mock.Call +} + +// SendMessage is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 p2p.ChannelID +// - _a2 []byte +func (_e *Connection_Expecter) SendMessage(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Connection_SendMessage_Call { + return &Connection_SendMessage_Call{Call: _e.mock.On("SendMessage", _a0, _a1, _a2)} +} + +func (_c *Connection_SendMessage_Call) Run(run func(_a0 context.Context, _a1 p2p.ChannelID, _a2 []byte)) *Connection_SendMessage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(p2p.ChannelID), args[2].([]byte)) + }) + return _c +} + +func (_c *Connection_SendMessage_Call) Return(_a0 error) *Connection_SendMessage_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Connection_SendMessage_Call) RunAndReturn(run func(context.Context, p2p.ChannelID, []byte) error) *Connection_SendMessage_Call { + _c.Call.Return(run) + return _c +} + // String provides a mock function with given fields: func (_m *Connection) String() string { ret := _m.Called() @@ -184,6 +362,33 @@ func (_m *Connection) String() string { return r0 } +// Connection_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type Connection_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *Connection_Expecter) String() *Connection_String_Call { + return &Connection_String_Call{Call: _e.mock.On("String")} +} + +func (_c *Connection_String_Call) Run(run func()) *Connection_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Connection_String_Call) Return(_a0 string) *Connection_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Connection_String_Call) RunAndReturn(run func() string) *Connection_String_Call { + _c.Call.Return(run) + return _c +} + // NewConnection creates a new instance of Connection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewConnection(t interface { diff --git a/internal/p2p/mocks/transport.go b/internal/p2p/mocks/transport.go index 5ffc747d2a..90cc99b416 100644 --- a/internal/p2p/mocks/transport.go +++ b/internal/p2p/mocks/transport.go @@ -14,6 +14,14 @@ type Transport struct { mock.Mock } +type Transport_Expecter struct { + mock *mock.Mock +} + +func (_m *Transport) EXPECT() *Transport_Expecter { + return &Transport_Expecter{mock: &_m.Mock} +} + // Accept provides a mock function with given fields: _a0 func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error) { ret := _m.Called(_a0) @@ -44,11 +52,67 @@ func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error) { return r0, r1 } +// Transport_Accept_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Accept' +type Transport_Accept_Call struct { + *mock.Call +} + +// Accept is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Transport_Expecter) Accept(_a0 interface{}) *Transport_Accept_Call { + return &Transport_Accept_Call{Call: _e.mock.On("Accept", _a0)} +} + +func (_c *Transport_Accept_Call) Run(run func(_a0 context.Context)) *Transport_Accept_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Transport_Accept_Call) Return(_a0 p2p.Connection, _a1 error) *Transport_Accept_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Transport_Accept_Call) RunAndReturn(run func(context.Context) (p2p.Connection, error)) *Transport_Accept_Call { + _c.Call.Return(run) + return _c +} + // AddChannelDescriptors provides a mock function with given fields: _a0 func (_m *Transport) AddChannelDescriptors(_a0 []*p2p.ChannelDescriptor) { _m.Called(_a0) } +// Transport_AddChannelDescriptors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddChannelDescriptors' +type Transport_AddChannelDescriptors_Call struct { + *mock.Call +} + +// AddChannelDescriptors is a helper method to define mock.On call +// - _a0 []*p2p.ChannelDescriptor +func (_e *Transport_Expecter) AddChannelDescriptors(_a0 interface{}) *Transport_AddChannelDescriptors_Call { + return &Transport_AddChannelDescriptors_Call{Call: _e.mock.On("AddChannelDescriptors", _a0)} +} + +func (_c *Transport_AddChannelDescriptors_Call) Run(run func(_a0 []*p2p.ChannelDescriptor)) *Transport_AddChannelDescriptors_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]*p2p.ChannelDescriptor)) + }) + return _c +} + +func (_c *Transport_AddChannelDescriptors_Call) Return() *Transport_AddChannelDescriptors_Call { + _c.Call.Return() + return _c +} + +func (_c *Transport_AddChannelDescriptors_Call) RunAndReturn(run func([]*p2p.ChannelDescriptor)) *Transport_AddChannelDescriptors_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *Transport) Close() error { ret := _m.Called() @@ -67,6 +131,33 @@ func (_m *Transport) Close() error { return r0 } +// Transport_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Transport_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Transport_Expecter) Close() *Transport_Close_Call { + return &Transport_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Transport_Close_Call) Run(run func()) *Transport_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Transport_Close_Call) Return(_a0 error) *Transport_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Transport_Close_Call) RunAndReturn(run func() error) *Transport_Close_Call { + _c.Call.Return(run) + return _c +} + // Dial provides a mock function with given fields: _a0, _a1 func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connection, error) { ret := _m.Called(_a0, _a1) @@ -97,6 +188,35 @@ func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connectio return r0, r1 } +// Transport_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial' +type Transport_Dial_Call struct { + *mock.Call +} + +// Dial is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *p2p.Endpoint +func (_e *Transport_Expecter) Dial(_a0 interface{}, _a1 interface{}) *Transport_Dial_Call { + return &Transport_Dial_Call{Call: _e.mock.On("Dial", _a0, _a1)} +} + +func (_c *Transport_Dial_Call) Run(run func(_a0 context.Context, _a1 *p2p.Endpoint)) *Transport_Dial_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*p2p.Endpoint)) + }) + return _c +} + +func (_c *Transport_Dial_Call) Return(_a0 p2p.Connection, _a1 error) *Transport_Dial_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Transport_Dial_Call) RunAndReturn(run func(context.Context, *p2p.Endpoint) (p2p.Connection, error)) *Transport_Dial_Call { + _c.Call.Return(run) + return _c +} + // Endpoint provides a mock function with given fields: func (_m *Transport) Endpoint() (*p2p.Endpoint, error) { ret := _m.Called() @@ -127,6 +247,33 @@ func (_m *Transport) Endpoint() (*p2p.Endpoint, error) { return r0, r1 } +// Transport_Endpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Endpoint' +type Transport_Endpoint_Call struct { + *mock.Call +} + +// Endpoint is a helper method to define mock.On call +func (_e *Transport_Expecter) Endpoint() *Transport_Endpoint_Call { + return &Transport_Endpoint_Call{Call: _e.mock.On("Endpoint")} +} + +func (_c *Transport_Endpoint_Call) Run(run func()) *Transport_Endpoint_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Transport_Endpoint_Call) Return(_a0 *p2p.Endpoint, _a1 error) *Transport_Endpoint_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Transport_Endpoint_Call) RunAndReturn(run func() (*p2p.Endpoint, error)) *Transport_Endpoint_Call { + _c.Call.Return(run) + return _c +} + // Listen provides a mock function with given fields: _a0 func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { ret := _m.Called(_a0) @@ -145,6 +292,34 @@ func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { return r0 } +// Transport_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen' +type Transport_Listen_Call struct { + *mock.Call +} + +// Listen is a helper method to define mock.On call +// - _a0 *p2p.Endpoint +func (_e *Transport_Expecter) Listen(_a0 interface{}) *Transport_Listen_Call { + return &Transport_Listen_Call{Call: _e.mock.On("Listen", _a0)} +} + +func (_c *Transport_Listen_Call) Run(run func(_a0 *p2p.Endpoint)) *Transport_Listen_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*p2p.Endpoint)) + }) + return _c +} + +func (_c *Transport_Listen_Call) Return(_a0 error) *Transport_Listen_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Transport_Listen_Call) RunAndReturn(run func(*p2p.Endpoint) error) *Transport_Listen_Call { + _c.Call.Return(run) + return _c +} + // Protocols provides a mock function with given fields: func (_m *Transport) Protocols() []p2p.Protocol { ret := _m.Called() @@ -165,6 +340,33 @@ func (_m *Transport) Protocols() []p2p.Protocol { return r0 } +// Transport_Protocols_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Protocols' +type Transport_Protocols_Call struct { + *mock.Call +} + +// Protocols is a helper method to define mock.On call +func (_e *Transport_Expecter) Protocols() *Transport_Protocols_Call { + return &Transport_Protocols_Call{Call: _e.mock.On("Protocols")} +} + +func (_c *Transport_Protocols_Call) Run(run func()) *Transport_Protocols_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Transport_Protocols_Call) Return(_a0 []p2p.Protocol) *Transport_Protocols_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Transport_Protocols_Call) RunAndReturn(run func() []p2p.Protocol) *Transport_Protocols_Call { + _c.Call.Return(run) + return _c +} + // String provides a mock function with given fields: func (_m *Transport) String() string { ret := _m.Called() @@ -183,6 +385,33 @@ func (_m *Transport) String() string { return r0 } +// Transport_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type Transport_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *Transport_Expecter) String() *Transport_String_Call { + return &Transport_String_Call{Call: _e.mock.On("String")} +} + +func (_c *Transport_String_Call) Run(run func()) *Transport_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Transport_String_Call) Return(_a0 string) *Transport_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Transport_String_Call) RunAndReturn(run func() string) *Transport_String_Call { + _c.Call.Return(run) + return _c +} + // NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewTransport(t interface { diff --git a/internal/proxy/mocks/app_conn_mempool.go b/internal/proxy/mocks/app_conn_mempool.go deleted file mode 100644 index 67a1f7e382..0000000000 --- a/internal/proxy/mocks/app_conn_mempool.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/abci/types" -) - -// AppConnMempool is an autogenerated mock type for the AppConnMempool type -type AppConnMempool struct { - mock.Mock -} - -// CheckTx provides a mock function with given fields: _a0, _a1 -func (_m *AppConnMempool) CheckTx(_a0 context.Context, _a1 types.RequestCheckTx) (*types.ResponseCheckTx, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseCheckTx - if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *types.ResponseCheckTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseCheckTx) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestCheckTx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Error provides a mock function with given fields: -func (_m *AppConnMempool) Error() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Flush provides a mock function with given fields: _a0 -func (_m *AppConnMempool) Flush(_a0 context.Context) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} diff --git a/internal/proxy/mocks/app_conn_query.go b/internal/proxy/mocks/app_conn_query.go deleted file mode 100644 index 996bc2eef2..0000000000 --- a/internal/proxy/mocks/app_conn_query.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/abci/types" -) - -// AppConnQuery is an autogenerated mock type for the AppConnQuery type -type AppConnQuery struct { - mock.Mock -} - -// Echo provides a mock function with given fields: _a0, _a1 -func (_m *AppConnQuery) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseEcho - if rf, ok := ret.Get(0).(func(context.Context, string) *types.ResponseEcho); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseEcho) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Error provides a mock function with given fields: -func (_m *AppConnQuery) Error() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Info provides a mock function with given fields: _a0, _a1 -func (_m *AppConnQuery) Info(_a0 context.Context, _a1 types.RequestInfo) (*types.ResponseInfo, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseInfo - if rf, ok := ret.Get(0).(func(context.Context, types.RequestInfo) *types.ResponseInfo); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseInfo) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestInfo) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Query provides a mock function with given fields: _a0, _a1 -func (_m *AppConnQuery) Query(_a0 context.Context, _a1 types.RequestQuery) (*types.ResponseQuery, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseQuery - if rf, ok := ret.Get(0).(func(context.Context, types.RequestQuery) *types.ResponseQuery); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseQuery) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestQuery) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} diff --git a/internal/proxy/mocks/app_conn_snapshot.go b/internal/proxy/mocks/app_conn_snapshot.go deleted file mode 100644 index 4b438e16a5..0000000000 --- a/internal/proxy/mocks/app_conn_snapshot.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/abci/types" -) - -// AppConnSnapshot is an autogenerated mock type for the AppConnSnapshot type -type AppConnSnapshot struct { - mock.Mock -} - -// ApplySnapshotChunk provides a mock function with given fields: _a0, _a1 -func (_m *AppConnSnapshot) ApplySnapshotChunk(_a0 context.Context, _a1 types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseApplySnapshotChunk - if rf, ok := ret.Get(0).(func(context.Context, types.RequestApplySnapshotChunk) *types.ResponseApplySnapshotChunk); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseApplySnapshotChunk) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestApplySnapshotChunk) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Error provides a mock function with given fields: -func (_m *AppConnSnapshot) Error() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ListSnapshots provides a mock function with given fields: _a0, _a1 -func (_m *AppConnSnapshot) ListSnapshots(_a0 context.Context, _a1 types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseListSnapshots - if rf, ok := ret.Get(0).(func(context.Context, types.RequestListSnapshots) *types.ResponseListSnapshots); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseListSnapshots) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestListSnapshots) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// LoadSnapshotChunk provides a mock function with given fields: _a0, _a1 -func (_m *AppConnSnapshot) LoadSnapshotChunk(_a0 context.Context, _a1 types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseLoadSnapshotChunk - if rf, ok := ret.Get(0).(func(context.Context, types.RequestLoadSnapshotChunk) *types.ResponseLoadSnapshotChunk); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseLoadSnapshotChunk) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestLoadSnapshotChunk) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// OfferSnapshot provides a mock function with given fields: _a0, _a1 -func (_m *AppConnSnapshot) OfferSnapshot(_a0 context.Context, _a1 types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { - ret := _m.Called(_a0, _a1) - - var r0 *types.ResponseOfferSnapshot - if rf, ok := ret.Get(0).(func(context.Context, types.RequestOfferSnapshot) *types.ResponseOfferSnapshot); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ResponseOfferSnapshot) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, types.RequestOfferSnapshot) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} diff --git a/internal/state/indexer/mocks/event_sink.go b/internal/state/indexer/mocks/event_sink.go deleted file mode 100644 index 8288781bc0..0000000000 --- a/internal/state/indexer/mocks/event_sink.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - indexer "github.com/dashpay/tenderdash/internal/state/indexer" - mock "github.com/stretchr/testify/mock" - - query "github.com/dashpay/tenderdash/internal/pubsub/query" - - tenderdashtypes "github.com/dashpay/tenderdash/types" - - types "github.com/dashpay/tenderdash/abci/types" -) - -// EventSink is an autogenerated mock type for the EventSink type -type EventSink struct { - mock.Mock -} - -// GetTxByHash provides a mock function with given fields: _a0 -func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetTxByHash") - } - - var r0 *types.TxResult - var r1 error - if rf, ok := ret.Get(0).(func([]byte) (*types.TxResult, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func([]byte) *types.TxResult); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.TxResult) - } - } - - if rf, ok := ret.Get(1).(func([]byte) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// HasBlock provides a mock function with given fields: _a0 -func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for HasBlock") - } - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(int64) (bool, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(int64) bool); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(int64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// IndexBlockEvents provides a mock function with given fields: _a0 -func (_m *EventSink) IndexBlockEvents(_a0 tenderdashtypes.EventDataNewBlockHeader) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for IndexBlockEvents") - } - - var r0 error - if rf, ok := ret.Get(0).(func(tenderdashtypes.EventDataNewBlockHeader) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// IndexTxEvents provides a mock function with given fields: _a0 -func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for IndexTxEvents") - } - - var r0 error - if rf, ok := ret.Get(0).(func([]*types.TxResult) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SearchBlockEvents provides a mock function with given fields: _a0, _a1 -func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([]int64, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SearchBlockEvents") - } - - var r0 []int64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]int64, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *query.Query) []int64); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]int64) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *query.Query) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SearchTxEvents provides a mock function with given fields: _a0, _a1 -func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*types.TxResult, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SearchTxEvents") - } - - var r0 []*types.TxResult - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]*types.TxResult, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *query.Query) []*types.TxResult); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*types.TxResult) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *query.Query) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Stop provides a mock function with given fields: -func (_m *EventSink) Stop() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Stop") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Type provides a mock function with given fields: -func (_m *EventSink) Type() indexer.EventSinkType { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Type") - } - - var r0 indexer.EventSinkType - if rf, ok := ret.Get(0).(func() indexer.EventSinkType); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(indexer.EventSinkType) - } - - return r0 -} - -// NewEventSink creates a new instance of EventSink. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEventSink(t interface { - mock.TestingT - Cleanup(func()) -}) *EventSink { - mock := &EventSink{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/state/indexer/mocks/eventsink.go b/internal/state/indexer/mocks/eventsink.go new file mode 100644 index 0000000000..a40a3729d3 --- /dev/null +++ b/internal/state/indexer/mocks/eventsink.go @@ -0,0 +1,457 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + context "context" + + indexer "github.com/dashpay/tenderdash/internal/state/indexer" + mock "github.com/stretchr/testify/mock" + + query "github.com/dashpay/tenderdash/internal/pubsub/query" + + tenderdashtypes "github.com/dashpay/tenderdash/types" + + types "github.com/dashpay/tenderdash/abci/types" +) + +// EventSink is an autogenerated mock type for the EventSink type +type EventSink struct { + mock.Mock +} + +type EventSink_Expecter struct { + mock *mock.Mock +} + +func (_m *EventSink) EXPECT() *EventSink_Expecter { + return &EventSink_Expecter{mock: &_m.Mock} +} + +// GetTxByHash provides a mock function with given fields: _a0 +func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetTxByHash") + } + + var r0 *types.TxResult + var r1 error + if rf, ok := ret.Get(0).(func([]byte) (*types.TxResult, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func([]byte) *types.TxResult); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.TxResult) + } + } + + if rf, ok := ret.Get(1).(func([]byte) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EventSink_GetTxByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTxByHash' +type EventSink_GetTxByHash_Call struct { + *mock.Call +} + +// GetTxByHash is a helper method to define mock.On call +// - _a0 []byte +func (_e *EventSink_Expecter) GetTxByHash(_a0 interface{}) *EventSink_GetTxByHash_Call { + return &EventSink_GetTxByHash_Call{Call: _e.mock.On("GetTxByHash", _a0)} +} + +func (_c *EventSink_GetTxByHash_Call) Run(run func(_a0 []byte)) *EventSink_GetTxByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *EventSink_GetTxByHash_Call) Return(_a0 *types.TxResult, _a1 error) *EventSink_GetTxByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EventSink_GetTxByHash_Call) RunAndReturn(run func([]byte) (*types.TxResult, error)) *EventSink_GetTxByHash_Call { + _c.Call.Return(run) + return _c +} + +// HasBlock provides a mock function with given fields: _a0 +func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for HasBlock") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(int64) (bool, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(int64) bool); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(int64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EventSink_HasBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasBlock' +type EventSink_HasBlock_Call struct { + *mock.Call +} + +// HasBlock is a helper method to define mock.On call +// - _a0 int64 +func (_e *EventSink_Expecter) HasBlock(_a0 interface{}) *EventSink_HasBlock_Call { + return &EventSink_HasBlock_Call{Call: _e.mock.On("HasBlock", _a0)} +} + +func (_c *EventSink_HasBlock_Call) Run(run func(_a0 int64)) *EventSink_HasBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *EventSink_HasBlock_Call) Return(_a0 bool, _a1 error) *EventSink_HasBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EventSink_HasBlock_Call) RunAndReturn(run func(int64) (bool, error)) *EventSink_HasBlock_Call { + _c.Call.Return(run) + return _c +} + +// IndexBlockEvents provides a mock function with given fields: _a0 +func (_m *EventSink) IndexBlockEvents(_a0 tenderdashtypes.EventDataNewBlockHeader) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for IndexBlockEvents") + } + + var r0 error + if rf, ok := ret.Get(0).(func(tenderdashtypes.EventDataNewBlockHeader) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// EventSink_IndexBlockEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexBlockEvents' +type EventSink_IndexBlockEvents_Call struct { + *mock.Call +} + +// IndexBlockEvents is a helper method to define mock.On call +// - _a0 tenderdashtypes.EventDataNewBlockHeader +func (_e *EventSink_Expecter) IndexBlockEvents(_a0 interface{}) *EventSink_IndexBlockEvents_Call { + return &EventSink_IndexBlockEvents_Call{Call: _e.mock.On("IndexBlockEvents", _a0)} +} + +func (_c *EventSink_IndexBlockEvents_Call) Run(run func(_a0 tenderdashtypes.EventDataNewBlockHeader)) *EventSink_IndexBlockEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(tenderdashtypes.EventDataNewBlockHeader)) + }) + return _c +} + +func (_c *EventSink_IndexBlockEvents_Call) Return(_a0 error) *EventSink_IndexBlockEvents_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EventSink_IndexBlockEvents_Call) RunAndReturn(run func(tenderdashtypes.EventDataNewBlockHeader) error) *EventSink_IndexBlockEvents_Call { + _c.Call.Return(run) + return _c +} + +// IndexTxEvents provides a mock function with given fields: _a0 +func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for IndexTxEvents") + } + + var r0 error + if rf, ok := ret.Get(0).(func([]*types.TxResult) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// EventSink_IndexTxEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexTxEvents' +type EventSink_IndexTxEvents_Call struct { + *mock.Call +} + +// IndexTxEvents is a helper method to define mock.On call +// - _a0 []*types.TxResult +func (_e *EventSink_Expecter) IndexTxEvents(_a0 interface{}) *EventSink_IndexTxEvents_Call { + return &EventSink_IndexTxEvents_Call{Call: _e.mock.On("IndexTxEvents", _a0)} +} + +func (_c *EventSink_IndexTxEvents_Call) Run(run func(_a0 []*types.TxResult)) *EventSink_IndexTxEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]*types.TxResult)) + }) + return _c +} + +func (_c *EventSink_IndexTxEvents_Call) Return(_a0 error) *EventSink_IndexTxEvents_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EventSink_IndexTxEvents_Call) RunAndReturn(run func([]*types.TxResult) error) *EventSink_IndexTxEvents_Call { + _c.Call.Return(run) + return _c +} + +// SearchBlockEvents provides a mock function with given fields: _a0, _a1 +func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([]int64, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for SearchBlockEvents") + } + + var r0 []int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]int64, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *query.Query) []int64); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]int64) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *query.Query) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EventSink_SearchBlockEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchBlockEvents' +type EventSink_SearchBlockEvents_Call struct { + *mock.Call +} + +// SearchBlockEvents is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *query.Query +func (_e *EventSink_Expecter) SearchBlockEvents(_a0 interface{}, _a1 interface{}) *EventSink_SearchBlockEvents_Call { + return &EventSink_SearchBlockEvents_Call{Call: _e.mock.On("SearchBlockEvents", _a0, _a1)} +} + +func (_c *EventSink_SearchBlockEvents_Call) Run(run func(_a0 context.Context, _a1 *query.Query)) *EventSink_SearchBlockEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*query.Query)) + }) + return _c +} + +func (_c *EventSink_SearchBlockEvents_Call) Return(_a0 []int64, _a1 error) *EventSink_SearchBlockEvents_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EventSink_SearchBlockEvents_Call) RunAndReturn(run func(context.Context, *query.Query) ([]int64, error)) *EventSink_SearchBlockEvents_Call { + _c.Call.Return(run) + return _c +} + +// SearchTxEvents provides a mock function with given fields: _a0, _a1 +func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*types.TxResult, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for SearchTxEvents") + } + + var r0 []*types.TxResult + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]*types.TxResult, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *query.Query) []*types.TxResult); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*types.TxResult) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *query.Query) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// EventSink_SearchTxEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchTxEvents' +type EventSink_SearchTxEvents_Call struct { + *mock.Call +} + +// SearchTxEvents is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *query.Query +func (_e *EventSink_Expecter) SearchTxEvents(_a0 interface{}, _a1 interface{}) *EventSink_SearchTxEvents_Call { + return &EventSink_SearchTxEvents_Call{Call: _e.mock.On("SearchTxEvents", _a0, _a1)} +} + +func (_c *EventSink_SearchTxEvents_Call) Run(run func(_a0 context.Context, _a1 *query.Query)) *EventSink_SearchTxEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*query.Query)) + }) + return _c +} + +func (_c *EventSink_SearchTxEvents_Call) Return(_a0 []*types.TxResult, _a1 error) *EventSink_SearchTxEvents_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EventSink_SearchTxEvents_Call) RunAndReturn(run func(context.Context, *query.Query) ([]*types.TxResult, error)) *EventSink_SearchTxEvents_Call { + _c.Call.Return(run) + return _c +} + +// Stop provides a mock function with given fields: +func (_m *EventSink) Stop() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Stop") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// EventSink_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' +type EventSink_Stop_Call struct { + *mock.Call +} + +// Stop is a helper method to define mock.On call +func (_e *EventSink_Expecter) Stop() *EventSink_Stop_Call { + return &EventSink_Stop_Call{Call: _e.mock.On("Stop")} +} + +func (_c *EventSink_Stop_Call) Run(run func()) *EventSink_Stop_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EventSink_Stop_Call) Return(_a0 error) *EventSink_Stop_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EventSink_Stop_Call) RunAndReturn(run func() error) *EventSink_Stop_Call { + _c.Call.Return(run) + return _c +} + +// Type provides a mock function with given fields: +func (_m *EventSink) Type() indexer.EventSinkType { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Type") + } + + var r0 indexer.EventSinkType + if rf, ok := ret.Get(0).(func() indexer.EventSinkType); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(indexer.EventSinkType) + } + + return r0 +} + +// EventSink_Type_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Type' +type EventSink_Type_Call struct { + *mock.Call +} + +// Type is a helper method to define mock.On call +func (_e *EventSink_Expecter) Type() *EventSink_Type_Call { + return &EventSink_Type_Call{Call: _e.mock.On("Type")} +} + +func (_c *EventSink_Type_Call) Run(run func()) *EventSink_Type_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EventSink_Type_Call) Return(_a0 indexer.EventSinkType) *EventSink_Type_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EventSink_Type_Call) RunAndReturn(run func() indexer.EventSinkType) *EventSink_Type_Call { + _c.Call.Return(run) + return _c +} + +// NewEventSink creates a new instance of EventSink. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewEventSink(t interface { + mock.TestingT + Cleanup(func()) +}) *EventSink { + mock := &EventSink{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/state/mocks/block_store.go b/internal/state/mocks/block_store.go deleted file mode 100644 index 63873d194a..0000000000 --- a/internal/state/mocks/block_store.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/types" -) - -// BlockStore is an autogenerated mock type for the BlockStore type -type BlockStore struct { - mock.Mock -} - -// Base provides a mock function with given fields: -func (_m *BlockStore) Base() int64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Base") - } - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// CoreChainLockedHeight provides a mock function with given fields: -func (_m *BlockStore) CoreChainLockedHeight() uint32 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for CoreChainLockedHeight") - } - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - return r0 -} - -// Height provides a mock function with given fields: -func (_m *BlockStore) Height() int64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Height") - } - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// LoadBaseMeta provides a mock function with given fields: -func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for LoadBaseMeta") - } - - var r0 *types.BlockMeta - if rf, ok := ret.Get(0).(func() *types.BlockMeta); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.BlockMeta) - } - } - - return r0 -} - -// LoadBlock provides a mock function with given fields: height -func (_m *BlockStore) LoadBlock(height int64) *types.Block { - ret := _m.Called(height) - - if len(ret) == 0 { - panic("no return value specified for LoadBlock") - } - - var r0 *types.Block - if rf, ok := ret.Get(0).(func(int64) *types.Block); ok { - r0 = rf(height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Block) - } - } - - return r0 -} - -// LoadBlockByHash provides a mock function with given fields: hash -func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { - ret := _m.Called(hash) - - if len(ret) == 0 { - panic("no return value specified for LoadBlockByHash") - } - - var r0 *types.Block - if rf, ok := ret.Get(0).(func([]byte) *types.Block); ok { - r0 = rf(hash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Block) - } - } - - return r0 -} - -// LoadBlockCommit provides a mock function with given fields: height -func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { - ret := _m.Called(height) - - if len(ret) == 0 { - panic("no return value specified for LoadBlockCommit") - } - - var r0 *types.Commit - if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { - r0 = rf(height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Commit) - } - } - - return r0 -} - -// LoadBlockMeta provides a mock function with given fields: height -func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { - ret := _m.Called(height) - - if len(ret) == 0 { - panic("no return value specified for LoadBlockMeta") - } - - var r0 *types.BlockMeta - if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { - r0 = rf(height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.BlockMeta) - } - } - - return r0 -} - -// LoadBlockMetaByHash provides a mock function with given fields: hash -func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { - ret := _m.Called(hash) - - if len(ret) == 0 { - panic("no return value specified for LoadBlockMetaByHash") - } - - var r0 *types.BlockMeta - if rf, ok := ret.Get(0).(func([]byte) *types.BlockMeta); ok { - r0 = rf(hash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.BlockMeta) - } - } - - return r0 -} - -// LoadBlockPart provides a mock function with given fields: height, index -func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { - ret := _m.Called(height, index) - - if len(ret) == 0 { - panic("no return value specified for LoadBlockPart") - } - - var r0 *types.Part - if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok { - r0 = rf(height, index) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Part) - } - } - - return r0 -} - -// LoadSeenCommit provides a mock function with given fields: -func (_m *BlockStore) LoadSeenCommit() *types.Commit { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for LoadSeenCommit") - } - - var r0 *types.Commit - if rf, ok := ret.Get(0).(func() *types.Commit); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Commit) - } - } - - return r0 -} - -// LoadSeenCommitAt provides a mock function with given fields: height -func (_m *BlockStore) LoadSeenCommitAt(height int64) *types.Commit { - ret := _m.Called(height) - - if len(ret) == 0 { - panic("no return value specified for LoadSeenCommitAt") - } - - var r0 *types.Commit - if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { - r0 = rf(height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Commit) - } - } - - return r0 -} - -// PruneBlocks provides a mock function with given fields: height -func (_m *BlockStore) PruneBlocks(height int64) (uint64, error) { - ret := _m.Called(height) - - if len(ret) == 0 { - panic("no return value specified for PruneBlocks") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func(int64) (uint64, error)); ok { - return rf(height) - } - if rf, ok := ret.Get(0).(func(int64) uint64); ok { - r0 = rf(height) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(int64) error); ok { - r1 = rf(height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SaveBlock provides a mock function with given fields: block, blockParts, seenCommit -func (_m *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) { - _m.Called(block, blockParts, seenCommit) -} - -// Size provides a mock function with given fields: -func (_m *BlockStore) Size() int64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Size") - } - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBlockStore(t interface { - mock.TestingT - Cleanup(func()) -}) *BlockStore { - mock := &BlockStore{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/state/mocks/blockstore.go b/internal/state/mocks/blockstore.go new file mode 100644 index 0000000000..dc3b8e9e0e --- /dev/null +++ b/internal/state/mocks/blockstore.go @@ -0,0 +1,738 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + mock "github.com/stretchr/testify/mock" + + types "github.com/dashpay/tenderdash/types" +) + +// BlockStore is an autogenerated mock type for the BlockStore type +type BlockStore struct { + mock.Mock +} + +type BlockStore_Expecter struct { + mock *mock.Mock +} + +func (_m *BlockStore) EXPECT() *BlockStore_Expecter { + return &BlockStore_Expecter{mock: &_m.Mock} +} + +// Base provides a mock function with given fields: +func (_m *BlockStore) Base() int64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Base") + } + + var r0 int64 + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + return r0 +} + +// BlockStore_Base_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Base' +type BlockStore_Base_Call struct { + *mock.Call +} + +// Base is a helper method to define mock.On call +func (_e *BlockStore_Expecter) Base() *BlockStore_Base_Call { + return &BlockStore_Base_Call{Call: _e.mock.On("Base")} +} + +func (_c *BlockStore_Base_Call) Run(run func()) *BlockStore_Base_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BlockStore_Base_Call) Return(_a0 int64) *BlockStore_Base_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_Base_Call) RunAndReturn(run func() int64) *BlockStore_Base_Call { + _c.Call.Return(run) + return _c +} + +// CoreChainLockedHeight provides a mock function with given fields: +func (_m *BlockStore) CoreChainLockedHeight() uint32 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for CoreChainLockedHeight") + } + + var r0 uint32 + if rf, ok := ret.Get(0).(func() uint32); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint32) + } + + return r0 +} + +// BlockStore_CoreChainLockedHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoreChainLockedHeight' +type BlockStore_CoreChainLockedHeight_Call struct { + *mock.Call +} + +// CoreChainLockedHeight is a helper method to define mock.On call +func (_e *BlockStore_Expecter) CoreChainLockedHeight() *BlockStore_CoreChainLockedHeight_Call { + return &BlockStore_CoreChainLockedHeight_Call{Call: _e.mock.On("CoreChainLockedHeight")} +} + +func (_c *BlockStore_CoreChainLockedHeight_Call) Run(run func()) *BlockStore_CoreChainLockedHeight_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BlockStore_CoreChainLockedHeight_Call) Return(_a0 uint32) *BlockStore_CoreChainLockedHeight_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_CoreChainLockedHeight_Call) RunAndReturn(run func() uint32) *BlockStore_CoreChainLockedHeight_Call { + _c.Call.Return(run) + return _c +} + +// Height provides a mock function with given fields: +func (_m *BlockStore) Height() int64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Height") + } + + var r0 int64 + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + return r0 +} + +// BlockStore_Height_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Height' +type BlockStore_Height_Call struct { + *mock.Call +} + +// Height is a helper method to define mock.On call +func (_e *BlockStore_Expecter) Height() *BlockStore_Height_Call { + return &BlockStore_Height_Call{Call: _e.mock.On("Height")} +} + +func (_c *BlockStore_Height_Call) Run(run func()) *BlockStore_Height_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BlockStore_Height_Call) Return(_a0 int64) *BlockStore_Height_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_Height_Call) RunAndReturn(run func() int64) *BlockStore_Height_Call { + _c.Call.Return(run) + return _c +} + +// LoadBaseMeta provides a mock function with given fields: +func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for LoadBaseMeta") + } + + var r0 *types.BlockMeta + if rf, ok := ret.Get(0).(func() *types.BlockMeta); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.BlockMeta) + } + } + + return r0 +} + +// BlockStore_LoadBaseMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBaseMeta' +type BlockStore_LoadBaseMeta_Call struct { + *mock.Call +} + +// LoadBaseMeta is a helper method to define mock.On call +func (_e *BlockStore_Expecter) LoadBaseMeta() *BlockStore_LoadBaseMeta_Call { + return &BlockStore_LoadBaseMeta_Call{Call: _e.mock.On("LoadBaseMeta")} +} + +func (_c *BlockStore_LoadBaseMeta_Call) Run(run func()) *BlockStore_LoadBaseMeta_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BlockStore_LoadBaseMeta_Call) Return(_a0 *types.BlockMeta) *BlockStore_LoadBaseMeta_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBaseMeta_Call) RunAndReturn(run func() *types.BlockMeta) *BlockStore_LoadBaseMeta_Call { + _c.Call.Return(run) + return _c +} + +// LoadBlock provides a mock function with given fields: height +func (_m *BlockStore) LoadBlock(height int64) *types.Block { + ret := _m.Called(height) + + if len(ret) == 0 { + panic("no return value specified for LoadBlock") + } + + var r0 *types.Block + if rf, ok := ret.Get(0).(func(int64) *types.Block); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Block) + } + } + + return r0 +} + +// BlockStore_LoadBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlock' +type BlockStore_LoadBlock_Call struct { + *mock.Call +} + +// LoadBlock is a helper method to define mock.On call +// - height int64 +func (_e *BlockStore_Expecter) LoadBlock(height interface{}) *BlockStore_LoadBlock_Call { + return &BlockStore_LoadBlock_Call{Call: _e.mock.On("LoadBlock", height)} +} + +func (_c *BlockStore_LoadBlock_Call) Run(run func(height int64)) *BlockStore_LoadBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *BlockStore_LoadBlock_Call) Return(_a0 *types.Block) *BlockStore_LoadBlock_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBlock_Call) RunAndReturn(run func(int64) *types.Block) *BlockStore_LoadBlock_Call { + _c.Call.Return(run) + return _c +} + +// LoadBlockByHash provides a mock function with given fields: hash +func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { + ret := _m.Called(hash) + + if len(ret) == 0 { + panic("no return value specified for LoadBlockByHash") + } + + var r0 *types.Block + if rf, ok := ret.Get(0).(func([]byte) *types.Block); ok { + r0 = rf(hash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Block) + } + } + + return r0 +} + +// BlockStore_LoadBlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockByHash' +type BlockStore_LoadBlockByHash_Call struct { + *mock.Call +} + +// LoadBlockByHash is a helper method to define mock.On call +// - hash []byte +func (_e *BlockStore_Expecter) LoadBlockByHash(hash interface{}) *BlockStore_LoadBlockByHash_Call { + return &BlockStore_LoadBlockByHash_Call{Call: _e.mock.On("LoadBlockByHash", hash)} +} + +func (_c *BlockStore_LoadBlockByHash_Call) Run(run func(hash []byte)) *BlockStore_LoadBlockByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *BlockStore_LoadBlockByHash_Call) Return(_a0 *types.Block) *BlockStore_LoadBlockByHash_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBlockByHash_Call) RunAndReturn(run func([]byte) *types.Block) *BlockStore_LoadBlockByHash_Call { + _c.Call.Return(run) + return _c +} + +// LoadBlockCommit provides a mock function with given fields: height +func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { + ret := _m.Called(height) + + if len(ret) == 0 { + panic("no return value specified for LoadBlockCommit") + } + + var r0 *types.Commit + if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Commit) + } + } + + return r0 +} + +// BlockStore_LoadBlockCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockCommit' +type BlockStore_LoadBlockCommit_Call struct { + *mock.Call +} + +// LoadBlockCommit is a helper method to define mock.On call +// - height int64 +func (_e *BlockStore_Expecter) LoadBlockCommit(height interface{}) *BlockStore_LoadBlockCommit_Call { + return &BlockStore_LoadBlockCommit_Call{Call: _e.mock.On("LoadBlockCommit", height)} +} + +func (_c *BlockStore_LoadBlockCommit_Call) Run(run func(height int64)) *BlockStore_LoadBlockCommit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *BlockStore_LoadBlockCommit_Call) Return(_a0 *types.Commit) *BlockStore_LoadBlockCommit_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBlockCommit_Call) RunAndReturn(run func(int64) *types.Commit) *BlockStore_LoadBlockCommit_Call { + _c.Call.Return(run) + return _c +} + +// LoadBlockMeta provides a mock function with given fields: height +func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { + ret := _m.Called(height) + + if len(ret) == 0 { + panic("no return value specified for LoadBlockMeta") + } + + var r0 *types.BlockMeta + if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.BlockMeta) + } + } + + return r0 +} + +// BlockStore_LoadBlockMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockMeta' +type BlockStore_LoadBlockMeta_Call struct { + *mock.Call +} + +// LoadBlockMeta is a helper method to define mock.On call +// - height int64 +func (_e *BlockStore_Expecter) LoadBlockMeta(height interface{}) *BlockStore_LoadBlockMeta_Call { + return &BlockStore_LoadBlockMeta_Call{Call: _e.mock.On("LoadBlockMeta", height)} +} + +func (_c *BlockStore_LoadBlockMeta_Call) Run(run func(height int64)) *BlockStore_LoadBlockMeta_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *BlockStore_LoadBlockMeta_Call) Return(_a0 *types.BlockMeta) *BlockStore_LoadBlockMeta_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBlockMeta_Call) RunAndReturn(run func(int64) *types.BlockMeta) *BlockStore_LoadBlockMeta_Call { + _c.Call.Return(run) + return _c +} + +// LoadBlockMetaByHash provides a mock function with given fields: hash +func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { + ret := _m.Called(hash) + + if len(ret) == 0 { + panic("no return value specified for LoadBlockMetaByHash") + } + + var r0 *types.BlockMeta + if rf, ok := ret.Get(0).(func([]byte) *types.BlockMeta); ok { + r0 = rf(hash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.BlockMeta) + } + } + + return r0 +} + +// BlockStore_LoadBlockMetaByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockMetaByHash' +type BlockStore_LoadBlockMetaByHash_Call struct { + *mock.Call +} + +// LoadBlockMetaByHash is a helper method to define mock.On call +// - hash []byte +func (_e *BlockStore_Expecter) LoadBlockMetaByHash(hash interface{}) *BlockStore_LoadBlockMetaByHash_Call { + return &BlockStore_LoadBlockMetaByHash_Call{Call: _e.mock.On("LoadBlockMetaByHash", hash)} +} + +func (_c *BlockStore_LoadBlockMetaByHash_Call) Run(run func(hash []byte)) *BlockStore_LoadBlockMetaByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *BlockStore_LoadBlockMetaByHash_Call) Return(_a0 *types.BlockMeta) *BlockStore_LoadBlockMetaByHash_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBlockMetaByHash_Call) RunAndReturn(run func([]byte) *types.BlockMeta) *BlockStore_LoadBlockMetaByHash_Call { + _c.Call.Return(run) + return _c +} + +// LoadBlockPart provides a mock function with given fields: height, index +func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { + ret := _m.Called(height, index) + + if len(ret) == 0 { + panic("no return value specified for LoadBlockPart") + } + + var r0 *types.Part + if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok { + r0 = rf(height, index) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Part) + } + } + + return r0 +} + +// BlockStore_LoadBlockPart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockPart' +type BlockStore_LoadBlockPart_Call struct { + *mock.Call +} + +// LoadBlockPart is a helper method to define mock.On call +// - height int64 +// - index int +func (_e *BlockStore_Expecter) LoadBlockPart(height interface{}, index interface{}) *BlockStore_LoadBlockPart_Call { + return &BlockStore_LoadBlockPart_Call{Call: _e.mock.On("LoadBlockPart", height, index)} +} + +func (_c *BlockStore_LoadBlockPart_Call) Run(run func(height int64, index int)) *BlockStore_LoadBlockPart_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(int)) + }) + return _c +} + +func (_c *BlockStore_LoadBlockPart_Call) Return(_a0 *types.Part) *BlockStore_LoadBlockPart_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadBlockPart_Call) RunAndReturn(run func(int64, int) *types.Part) *BlockStore_LoadBlockPart_Call { + _c.Call.Return(run) + return _c +} + +// LoadSeenCommit provides a mock function with given fields: +func (_m *BlockStore) LoadSeenCommit() *types.Commit { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for LoadSeenCommit") + } + + var r0 *types.Commit + if rf, ok := ret.Get(0).(func() *types.Commit); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Commit) + } + } + + return r0 +} + +// BlockStore_LoadSeenCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSeenCommit' +type BlockStore_LoadSeenCommit_Call struct { + *mock.Call +} + +// LoadSeenCommit is a helper method to define mock.On call +func (_e *BlockStore_Expecter) LoadSeenCommit() *BlockStore_LoadSeenCommit_Call { + return &BlockStore_LoadSeenCommit_Call{Call: _e.mock.On("LoadSeenCommit")} +} + +func (_c *BlockStore_LoadSeenCommit_Call) Run(run func()) *BlockStore_LoadSeenCommit_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BlockStore_LoadSeenCommit_Call) Return(_a0 *types.Commit) *BlockStore_LoadSeenCommit_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadSeenCommit_Call) RunAndReturn(run func() *types.Commit) *BlockStore_LoadSeenCommit_Call { + _c.Call.Return(run) + return _c +} + +// LoadSeenCommitAt provides a mock function with given fields: height +func (_m *BlockStore) LoadSeenCommitAt(height int64) *types.Commit { + ret := _m.Called(height) + + if len(ret) == 0 { + panic("no return value specified for LoadSeenCommitAt") + } + + var r0 *types.Commit + if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Commit) + } + } + + return r0 +} + +// BlockStore_LoadSeenCommitAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSeenCommitAt' +type BlockStore_LoadSeenCommitAt_Call struct { + *mock.Call +} + +// LoadSeenCommitAt is a helper method to define mock.On call +// - height int64 +func (_e *BlockStore_Expecter) LoadSeenCommitAt(height interface{}) *BlockStore_LoadSeenCommitAt_Call { + return &BlockStore_LoadSeenCommitAt_Call{Call: _e.mock.On("LoadSeenCommitAt", height)} +} + +func (_c *BlockStore_LoadSeenCommitAt_Call) Run(run func(height int64)) *BlockStore_LoadSeenCommitAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *BlockStore_LoadSeenCommitAt_Call) Return(_a0 *types.Commit) *BlockStore_LoadSeenCommitAt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_LoadSeenCommitAt_Call) RunAndReturn(run func(int64) *types.Commit) *BlockStore_LoadSeenCommitAt_Call { + _c.Call.Return(run) + return _c +} + +// PruneBlocks provides a mock function with given fields: height +func (_m *BlockStore) PruneBlocks(height int64) (uint64, error) { + ret := _m.Called(height) + + if len(ret) == 0 { + panic("no return value specified for PruneBlocks") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func(int64) (uint64, error)); ok { + return rf(height) + } + if rf, ok := ret.Get(0).(func(int64) uint64); ok { + r0 = rf(height) + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func(int64) error); ok { + r1 = rf(height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BlockStore_PruneBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneBlocks' +type BlockStore_PruneBlocks_Call struct { + *mock.Call +} + +// PruneBlocks is a helper method to define mock.On call +// - height int64 +func (_e *BlockStore_Expecter) PruneBlocks(height interface{}) *BlockStore_PruneBlocks_Call { + return &BlockStore_PruneBlocks_Call{Call: _e.mock.On("PruneBlocks", height)} +} + +func (_c *BlockStore_PruneBlocks_Call) Run(run func(height int64)) *BlockStore_PruneBlocks_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *BlockStore_PruneBlocks_Call) Return(_a0 uint64, _a1 error) *BlockStore_PruneBlocks_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BlockStore_PruneBlocks_Call) RunAndReturn(run func(int64) (uint64, error)) *BlockStore_PruneBlocks_Call { + _c.Call.Return(run) + return _c +} + +// SaveBlock provides a mock function with given fields: block, blockParts, seenCommit +func (_m *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) { + _m.Called(block, blockParts, seenCommit) +} + +// BlockStore_SaveBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveBlock' +type BlockStore_SaveBlock_Call struct { + *mock.Call +} + +// SaveBlock is a helper method to define mock.On call +// - block *types.Block +// - blockParts *types.PartSet +// - seenCommit *types.Commit +func (_e *BlockStore_Expecter) SaveBlock(block interface{}, blockParts interface{}, seenCommit interface{}) *BlockStore_SaveBlock_Call { + return &BlockStore_SaveBlock_Call{Call: _e.mock.On("SaveBlock", block, blockParts, seenCommit)} +} + +func (_c *BlockStore_SaveBlock_Call) Run(run func(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit)) *BlockStore_SaveBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*types.Block), args[1].(*types.PartSet), args[2].(*types.Commit)) + }) + return _c +} + +func (_c *BlockStore_SaveBlock_Call) Return() *BlockStore_SaveBlock_Call { + _c.Call.Return() + return _c +} + +func (_c *BlockStore_SaveBlock_Call) RunAndReturn(run func(*types.Block, *types.PartSet, *types.Commit)) *BlockStore_SaveBlock_Call { + _c.Call.Return(run) + return _c +} + +// Size provides a mock function with given fields: +func (_m *BlockStore) Size() int64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Size") + } + + var r0 int64 + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + return r0 +} + +// BlockStore_Size_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Size' +type BlockStore_Size_Call struct { + *mock.Call +} + +// Size is a helper method to define mock.On call +func (_e *BlockStore_Expecter) Size() *BlockStore_Size_Call { + return &BlockStore_Size_Call{Call: _e.mock.On("Size")} +} + +func (_c *BlockStore_Size_Call) Run(run func()) *BlockStore_Size_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BlockStore_Size_Call) Return(_a0 int64) *BlockStore_Size_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockStore_Size_Call) RunAndReturn(run func() int64) *BlockStore_Size_Call { + _c.Call.Return(run) + return _c +} + +// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBlockStore(t interface { + mock.TestingT + Cleanup(func()) +}) *BlockStore { + mock := &BlockStore{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/state/mocks/event_sink.go b/internal/state/mocks/event_sink.go deleted file mode 100644 index 6d2d679432..0000000000 --- a/internal/state/mocks/event_sink.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by mockery 2.7.5. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - indexer "github.com/dashpay/tenderdash/internal/state/indexer" - - query "github.com/dashpay/tenderdash/internal/pubsub/query" - - tenderminttypes "github.com/dashpay/tenderdash/types" - - types "github.com/dashpay/tenderdash/abci/types" -) - -// EventSink is an autogenerated mock type for the EventSink type -type EventSink struct { - mock.Mock -} - -// GetTxByHash provides a mock function with given fields: _a0 -func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { - ret := _m.Called(_a0) - - var r0 *types.TxResult - if rf, ok := ret.Get(0).(func([]byte) *types.TxResult); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.TxResult) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func([]byte) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// HasBlock provides a mock function with given fields: _a0 -func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { - ret := _m.Called(_a0) - - var r0 bool - if rf, ok := ret.Get(0).(func(int64) bool); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(bool) - } - - var r1 error - if rf, ok := ret.Get(1).(func(int64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// IndexBlockEvents provides a mock function with given fields: _a0 -func (_m *EventSink) IndexBlockEvents(_a0 tenderminttypes.EventDataNewBlockHeader) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(tenderminttypes.EventDataNewBlockHeader) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// IndexTxEvents provides a mock function with given fields: _a0 -func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func([]*types.TxResult) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SearchBlockEvents provides a mock function with given fields: _a0, _a1 -func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([]int64, error) { - ret := _m.Called(_a0, _a1) - - var r0 []int64 - if rf, ok := ret.Get(0).(func(context.Context, *query.Query) []int64); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]int64) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *query.Query) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SearchTxEvents provides a mock function with given fields: _a0, _a1 -func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*types.TxResult, error) { - ret := _m.Called(_a0, _a1) - - var r0 []*types.TxResult - if rf, ok := ret.Get(0).(func(context.Context, *query.Query) []*types.TxResult); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*types.TxResult) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, *query.Query) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Stop provides a mock function with given fields: -func (_m *EventSink) Stop() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Type provides a mock function with given fields: -func (_m *EventSink) Type() indexer.EventSinkType { - ret := _m.Called() - - var r0 indexer.EventSinkType - if rf, ok := ret.Get(0).(func() indexer.EventSinkType); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(indexer.EventSinkType) - } - - return r0 -} diff --git a/internal/state/mocks/evidence_pool.go b/internal/state/mocks/evidence_pool.go deleted file mode 100644 index ff16885fbd..0000000000 --- a/internal/state/mocks/evidence_pool.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - state "github.com/dashpay/tenderdash/internal/state" - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/types" -) - -// EvidencePool is an autogenerated mock type for the EvidencePool type -type EvidencePool struct { - mock.Mock -} - -// AddEvidence provides a mock function with given fields: _a0, _a1 -func (_m *EvidencePool) AddEvidence(_a0 context.Context, _a1 types.Evidence) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for AddEvidence") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// CheckEvidence provides a mock function with given fields: _a0, _a1 -func (_m *EvidencePool) CheckEvidence(_a0 context.Context, _a1 types.EvidenceList) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for CheckEvidence") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.EvidenceList) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// PendingEvidence provides a mock function with given fields: maxBytes -func (_m *EvidencePool) PendingEvidence(maxBytes int64) ([]types.Evidence, int64) { - ret := _m.Called(maxBytes) - - if len(ret) == 0 { - panic("no return value specified for PendingEvidence") - } - - var r0 []types.Evidence - var r1 int64 - if rf, ok := ret.Get(0).(func(int64) ([]types.Evidence, int64)); ok { - return rf(maxBytes) - } - if rf, ok := ret.Get(0).(func(int64) []types.Evidence); ok { - r0 = rf(maxBytes) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]types.Evidence) - } - } - - if rf, ok := ret.Get(1).(func(int64) int64); ok { - r1 = rf(maxBytes) - } else { - r1 = ret.Get(1).(int64) - } - - return r0, r1 -} - -// Update provides a mock function with given fields: _a0, _a1, _a2 -func (_m *EvidencePool) Update(_a0 context.Context, _a1 state.State, _a2 types.EvidenceList) { - _m.Called(_a0, _a1, _a2) -} - -// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEvidencePool(t interface { - mock.TestingT - Cleanup(func()) -}) *EvidencePool { - mock := &EvidencePool{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/state/mocks/evidencepool.go b/internal/state/mocks/evidencepool.go new file mode 100644 index 0000000000..3b2f161f34 --- /dev/null +++ b/internal/state/mocks/evidencepool.go @@ -0,0 +1,226 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + context "context" + + state "github.com/dashpay/tenderdash/internal/state" + mock "github.com/stretchr/testify/mock" + + types "github.com/dashpay/tenderdash/types" +) + +// EvidencePool is an autogenerated mock type for the EvidencePool type +type EvidencePool struct { + mock.Mock +} + +type EvidencePool_Expecter struct { + mock *mock.Mock +} + +func (_m *EvidencePool) EXPECT() *EvidencePool_Expecter { + return &EvidencePool_Expecter{mock: &_m.Mock} +} + +// AddEvidence provides a mock function with given fields: _a0, _a1 +func (_m *EvidencePool) AddEvidence(_a0 context.Context, _a1 types.Evidence) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for AddEvidence") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// EvidencePool_AddEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddEvidence' +type EvidencePool_AddEvidence_Call struct { + *mock.Call +} + +// AddEvidence is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Evidence +func (_e *EvidencePool_Expecter) AddEvidence(_a0 interface{}, _a1 interface{}) *EvidencePool_AddEvidence_Call { + return &EvidencePool_AddEvidence_Call{Call: _e.mock.On("AddEvidence", _a0, _a1)} +} + +func (_c *EvidencePool_AddEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *EvidencePool_AddEvidence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Evidence)) + }) + return _c +} + +func (_c *EvidencePool_AddEvidence_Call) Return(_a0 error) *EvidencePool_AddEvidence_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvidencePool_AddEvidence_Call) RunAndReturn(run func(context.Context, types.Evidence) error) *EvidencePool_AddEvidence_Call { + _c.Call.Return(run) + return _c +} + +// CheckEvidence provides a mock function with given fields: _a0, _a1 +func (_m *EvidencePool) CheckEvidence(_a0 context.Context, _a1 types.EvidenceList) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CheckEvidence") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, types.EvidenceList) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// EvidencePool_CheckEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckEvidence' +type EvidencePool_CheckEvidence_Call struct { + *mock.Call +} + +// CheckEvidence is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.EvidenceList +func (_e *EvidencePool_Expecter) CheckEvidence(_a0 interface{}, _a1 interface{}) *EvidencePool_CheckEvidence_Call { + return &EvidencePool_CheckEvidence_Call{Call: _e.mock.On("CheckEvidence", _a0, _a1)} +} + +func (_c *EvidencePool_CheckEvidence_Call) Run(run func(_a0 context.Context, _a1 types.EvidenceList)) *EvidencePool_CheckEvidence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.EvidenceList)) + }) + return _c +} + +func (_c *EvidencePool_CheckEvidence_Call) Return(_a0 error) *EvidencePool_CheckEvidence_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvidencePool_CheckEvidence_Call) RunAndReturn(run func(context.Context, types.EvidenceList) error) *EvidencePool_CheckEvidence_Call { + _c.Call.Return(run) + return _c +} + +// PendingEvidence provides a mock function with given fields: maxBytes +func (_m *EvidencePool) PendingEvidence(maxBytes int64) ([]types.Evidence, int64) { + ret := _m.Called(maxBytes) + + if len(ret) == 0 { + panic("no return value specified for PendingEvidence") + } + + var r0 []types.Evidence + var r1 int64 + if rf, ok := ret.Get(0).(func(int64) ([]types.Evidence, int64)); ok { + return rf(maxBytes) + } + if rf, ok := ret.Get(0).(func(int64) []types.Evidence); ok { + r0 = rf(maxBytes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]types.Evidence) + } + } + + if rf, ok := ret.Get(1).(func(int64) int64); ok { + r1 = rf(maxBytes) + } else { + r1 = ret.Get(1).(int64) + } + + return r0, r1 +} + +// EvidencePool_PendingEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingEvidence' +type EvidencePool_PendingEvidence_Call struct { + *mock.Call +} + +// PendingEvidence is a helper method to define mock.On call +// - maxBytes int64 +func (_e *EvidencePool_Expecter) PendingEvidence(maxBytes interface{}) *EvidencePool_PendingEvidence_Call { + return &EvidencePool_PendingEvidence_Call{Call: _e.mock.On("PendingEvidence", maxBytes)} +} + +func (_c *EvidencePool_PendingEvidence_Call) Run(run func(maxBytes int64)) *EvidencePool_PendingEvidence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *EvidencePool_PendingEvidence_Call) Return(ev []types.Evidence, size int64) *EvidencePool_PendingEvidence_Call { + _c.Call.Return(ev, size) + return _c +} + +func (_c *EvidencePool_PendingEvidence_Call) RunAndReturn(run func(int64) ([]types.Evidence, int64)) *EvidencePool_PendingEvidence_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: _a0, _a1, _a2 +func (_m *EvidencePool) Update(_a0 context.Context, _a1 state.State, _a2 types.EvidenceList) { + _m.Called(_a0, _a1, _a2) +} + +// EvidencePool_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type EvidencePool_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 state.State +// - _a2 types.EvidenceList +func (_e *EvidencePool_Expecter) Update(_a0 interface{}, _a1 interface{}, _a2 interface{}) *EvidencePool_Update_Call { + return &EvidencePool_Update_Call{Call: _e.mock.On("Update", _a0, _a1, _a2)} +} + +func (_c *EvidencePool_Update_Call) Run(run func(_a0 context.Context, _a1 state.State, _a2 types.EvidenceList)) *EvidencePool_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(state.State), args[2].(types.EvidenceList)) + }) + return _c +} + +func (_c *EvidencePool_Update_Call) Return() *EvidencePool_Update_Call { + _c.Call.Return() + return _c +} + +func (_c *EvidencePool_Update_Call) RunAndReturn(run func(context.Context, state.State, types.EvidenceList)) *EvidencePool_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewEvidencePool(t interface { + mock.TestingT + Cleanup(func()) +}) *EvidencePool { + mock := &EvidencePool{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/state/mocks/executor.go b/internal/state/mocks/executor.go index e287c60cc0..23a56e2b5a 100644 --- a/internal/state/mocks/executor.go +++ b/internal/state/mocks/executor.go @@ -16,6 +16,14 @@ type Executor struct { mock.Mock } +type Executor_Expecter struct { + mock *mock.Mock +} + +func (_m *Executor) EXPECT() *Executor_Expecter { + return &Executor_Expecter{mock: &_m.Mock} +} + // ApplyBlock provides a mock function with given fields: ctx, _a1, blockID, block, commit func (_m *Executor) ApplyBlock(ctx context.Context, _a1 state.State, blockID types.BlockID, block *types.Block, commit *types.Commit) (state.State, error) { ret := _m.Called(ctx, _a1, blockID, block, commit) @@ -44,6 +52,38 @@ func (_m *Executor) ApplyBlock(ctx context.Context, _a1 state.State, blockID typ return r0, r1 } +// Executor_ApplyBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyBlock' +type Executor_ApplyBlock_Call struct { + *mock.Call +} + +// ApplyBlock is a helper method to define mock.On call +// - ctx context.Context +// - _a1 state.State +// - blockID types.BlockID +// - block *types.Block +// - commit *types.Commit +func (_e *Executor_Expecter) ApplyBlock(ctx interface{}, _a1 interface{}, blockID interface{}, block interface{}, commit interface{}) *Executor_ApplyBlock_Call { + return &Executor_ApplyBlock_Call{Call: _e.mock.On("ApplyBlock", ctx, _a1, blockID, block, commit)} +} + +func (_c *Executor_ApplyBlock_Call) Run(run func(ctx context.Context, _a1 state.State, blockID types.BlockID, block *types.Block, commit *types.Commit)) *Executor_ApplyBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(state.State), args[2].(types.BlockID), args[3].(*types.Block), args[4].(*types.Commit)) + }) + return _c +} + +func (_c *Executor_ApplyBlock_Call) Return(_a0 state.State, _a1 error) *Executor_ApplyBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Executor_ApplyBlock_Call) RunAndReturn(run func(context.Context, state.State, types.BlockID, *types.Block, *types.Commit) (state.State, error)) *Executor_ApplyBlock_Call { + _c.Call.Return(run) + return _c +} + // CreateProposalBlock provides a mock function with given fields: ctx, height, round, _a3, commit, proposerProTxHash, proposedAppVersion func (_m *Executor) CreateProposalBlock(ctx context.Context, height int64, round int32, _a3 state.State, commit *types.Commit, proposerProTxHash []byte, proposedAppVersion uint64) (*types.Block, state.CurrentRoundState, error) { ret := _m.Called(ctx, height, round, _a3, commit, proposerProTxHash, proposedAppVersion) @@ -81,11 +121,74 @@ func (_m *Executor) CreateProposalBlock(ctx context.Context, height int64, round return r0, r1, r2 } +// Executor_CreateProposalBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateProposalBlock' +type Executor_CreateProposalBlock_Call struct { + *mock.Call +} + +// CreateProposalBlock is a helper method to define mock.On call +// - ctx context.Context +// - height int64 +// - round int32 +// - _a3 state.State +// - commit *types.Commit +// - proposerProTxHash []byte +// - proposedAppVersion uint64 +func (_e *Executor_Expecter) CreateProposalBlock(ctx interface{}, height interface{}, round interface{}, _a3 interface{}, commit interface{}, proposerProTxHash interface{}, proposedAppVersion interface{}) *Executor_CreateProposalBlock_Call { + return &Executor_CreateProposalBlock_Call{Call: _e.mock.On("CreateProposalBlock", ctx, height, round, _a3, commit, proposerProTxHash, proposedAppVersion)} +} + +func (_c *Executor_CreateProposalBlock_Call) Run(run func(ctx context.Context, height int64, round int32, _a3 state.State, commit *types.Commit, proposerProTxHash []byte, proposedAppVersion uint64)) *Executor_CreateProposalBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int32), args[3].(state.State), args[4].(*types.Commit), args[5].([]byte), args[6].(uint64)) + }) + return _c +} + +func (_c *Executor_CreateProposalBlock_Call) Return(_a0 *types.Block, _a1 state.CurrentRoundState, _a2 error) *Executor_CreateProposalBlock_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *Executor_CreateProposalBlock_Call) RunAndReturn(run func(context.Context, int64, int32, state.State, *types.Commit, []byte, uint64) (*types.Block, state.CurrentRoundState, error)) *Executor_CreateProposalBlock_Call { + _c.Call.Return(run) + return _c +} + // ExtendVote provides a mock function with given fields: ctx, vote func (_m *Executor) ExtendVote(ctx context.Context, vote *types.Vote) { _m.Called(ctx, vote) } +// Executor_ExtendVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendVote' +type Executor_ExtendVote_Call struct { + *mock.Call +} + +// ExtendVote is a helper method to define mock.On call +// - ctx context.Context +// - vote *types.Vote +func (_e *Executor_Expecter) ExtendVote(ctx interface{}, vote interface{}) *Executor_ExtendVote_Call { + return &Executor_ExtendVote_Call{Call: _e.mock.On("ExtendVote", ctx, vote)} +} + +func (_c *Executor_ExtendVote_Call) Run(run func(ctx context.Context, vote *types.Vote)) *Executor_ExtendVote_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Vote)) + }) + return _c +} + +func (_c *Executor_ExtendVote_Call) Return() *Executor_ExtendVote_Call { + _c.Call.Return() + return _c +} + +func (_c *Executor_ExtendVote_Call) RunAndReturn(run func(context.Context, *types.Vote)) *Executor_ExtendVote_Call { + _c.Call.Return(run) + return _c +} + // FinalizeBlock provides a mock function with given fields: ctx, _a1, uncommittedState, blockID, block, commit func (_m *Executor) FinalizeBlock(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, blockID types.BlockID, block *types.Block, commit *types.Commit) (state.State, error) { ret := _m.Called(ctx, _a1, uncommittedState, blockID, block, commit) @@ -114,6 +217,39 @@ func (_m *Executor) FinalizeBlock(ctx context.Context, _a1 state.State, uncommit return r0, r1 } +// Executor_FinalizeBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalizeBlock' +type Executor_FinalizeBlock_Call struct { + *mock.Call +} + +// FinalizeBlock is a helper method to define mock.On call +// - ctx context.Context +// - _a1 state.State +// - uncommittedState state.CurrentRoundState +// - blockID types.BlockID +// - block *types.Block +// - commit *types.Commit +func (_e *Executor_Expecter) FinalizeBlock(ctx interface{}, _a1 interface{}, uncommittedState interface{}, blockID interface{}, block interface{}, commit interface{}) *Executor_FinalizeBlock_Call { + return &Executor_FinalizeBlock_Call{Call: _e.mock.On("FinalizeBlock", ctx, _a1, uncommittedState, blockID, block, commit)} +} + +func (_c *Executor_FinalizeBlock_Call) Run(run func(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, blockID types.BlockID, block *types.Block, commit *types.Commit)) *Executor_FinalizeBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(state.State), args[2].(state.CurrentRoundState), args[3].(types.BlockID), args[4].(*types.Block), args[5].(*types.Commit)) + }) + return _c +} + +func (_c *Executor_FinalizeBlock_Call) Return(_a0 state.State, _a1 error) *Executor_FinalizeBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Executor_FinalizeBlock_Call) RunAndReturn(run func(context.Context, state.State, state.CurrentRoundState, types.BlockID, *types.Block, *types.Commit) (state.State, error)) *Executor_FinalizeBlock_Call { + _c.Call.Return(run) + return _c +} + // ProcessProposal provides a mock function with given fields: ctx, block, round, _a3, verify func (_m *Executor) ProcessProposal(ctx context.Context, block *types.Block, round int32, _a3 state.State, verify bool) (state.CurrentRoundState, error) { ret := _m.Called(ctx, block, round, _a3, verify) @@ -142,6 +278,38 @@ func (_m *Executor) ProcessProposal(ctx context.Context, block *types.Block, rou return r0, r1 } +// Executor_ProcessProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessProposal' +type Executor_ProcessProposal_Call struct { + *mock.Call +} + +// ProcessProposal is a helper method to define mock.On call +// - ctx context.Context +// - block *types.Block +// - round int32 +// - _a3 state.State +// - verify bool +func (_e *Executor_Expecter) ProcessProposal(ctx interface{}, block interface{}, round interface{}, _a3 interface{}, verify interface{}) *Executor_ProcessProposal_Call { + return &Executor_ProcessProposal_Call{Call: _e.mock.On("ProcessProposal", ctx, block, round, _a3, verify)} +} + +func (_c *Executor_ProcessProposal_Call) Run(run func(ctx context.Context, block *types.Block, round int32, _a3 state.State, verify bool)) *Executor_ProcessProposal_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Block), args[2].(int32), args[3].(state.State), args[4].(bool)) + }) + return _c +} + +func (_c *Executor_ProcessProposal_Call) Return(_a0 state.CurrentRoundState, _a1 error) *Executor_ProcessProposal_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Executor_ProcessProposal_Call) RunAndReturn(run func(context.Context, *types.Block, int32, state.State, bool) (state.CurrentRoundState, error)) *Executor_ProcessProposal_Call { + _c.Call.Return(run) + return _c +} + // ValidateBlock provides a mock function with given fields: ctx, _a1, block func (_m *Executor) ValidateBlock(ctx context.Context, _a1 state.State, block *types.Block) error { ret := _m.Called(ctx, _a1, block) @@ -160,6 +328,36 @@ func (_m *Executor) ValidateBlock(ctx context.Context, _a1 state.State, block *t return r0 } +// Executor_ValidateBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateBlock' +type Executor_ValidateBlock_Call struct { + *mock.Call +} + +// ValidateBlock is a helper method to define mock.On call +// - ctx context.Context +// - _a1 state.State +// - block *types.Block +func (_e *Executor_Expecter) ValidateBlock(ctx interface{}, _a1 interface{}, block interface{}) *Executor_ValidateBlock_Call { + return &Executor_ValidateBlock_Call{Call: _e.mock.On("ValidateBlock", ctx, _a1, block)} +} + +func (_c *Executor_ValidateBlock_Call) Run(run func(ctx context.Context, _a1 state.State, block *types.Block)) *Executor_ValidateBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(state.State), args[2].(*types.Block)) + }) + return _c +} + +func (_c *Executor_ValidateBlock_Call) Return(_a0 error) *Executor_ValidateBlock_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Executor_ValidateBlock_Call) RunAndReturn(run func(context.Context, state.State, *types.Block) error) *Executor_ValidateBlock_Call { + _c.Call.Return(run) + return _c +} + // ValidateBlockWithRoundState provides a mock function with given fields: ctx, _a1, uncommittedState, block func (_m *Executor) ValidateBlockWithRoundState(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, block *types.Block) error { ret := _m.Called(ctx, _a1, uncommittedState, block) @@ -178,6 +376,37 @@ func (_m *Executor) ValidateBlockWithRoundState(ctx context.Context, _a1 state.S return r0 } +// Executor_ValidateBlockWithRoundState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateBlockWithRoundState' +type Executor_ValidateBlockWithRoundState_Call struct { + *mock.Call +} + +// ValidateBlockWithRoundState is a helper method to define mock.On call +// - ctx context.Context +// - _a1 state.State +// - uncommittedState state.CurrentRoundState +// - block *types.Block +func (_e *Executor_Expecter) ValidateBlockWithRoundState(ctx interface{}, _a1 interface{}, uncommittedState interface{}, block interface{}) *Executor_ValidateBlockWithRoundState_Call { + return &Executor_ValidateBlockWithRoundState_Call{Call: _e.mock.On("ValidateBlockWithRoundState", ctx, _a1, uncommittedState, block)} +} + +func (_c *Executor_ValidateBlockWithRoundState_Call) Run(run func(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, block *types.Block)) *Executor_ValidateBlockWithRoundState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(state.State), args[2].(state.CurrentRoundState), args[3].(*types.Block)) + }) + return _c +} + +func (_c *Executor_ValidateBlockWithRoundState_Call) Return(_a0 error) *Executor_ValidateBlockWithRoundState_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Executor_ValidateBlockWithRoundState_Call) RunAndReturn(run func(context.Context, state.State, state.CurrentRoundState, *types.Block) error) *Executor_ValidateBlockWithRoundState_Call { + _c.Call.Return(run) + return _c +} + // VerifyVoteExtension provides a mock function with given fields: ctx, vote func (_m *Executor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) error { ret := _m.Called(ctx, vote) @@ -196,6 +425,35 @@ func (_m *Executor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) e return r0 } +// Executor_VerifyVoteExtension_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyVoteExtension' +type Executor_VerifyVoteExtension_Call struct { + *mock.Call +} + +// VerifyVoteExtension is a helper method to define mock.On call +// - ctx context.Context +// - vote *types.Vote +func (_e *Executor_Expecter) VerifyVoteExtension(ctx interface{}, vote interface{}) *Executor_VerifyVoteExtension_Call { + return &Executor_VerifyVoteExtension_Call{Call: _e.mock.On("VerifyVoteExtension", ctx, vote)} +} + +func (_c *Executor_VerifyVoteExtension_Call) Run(run func(ctx context.Context, vote *types.Vote)) *Executor_VerifyVoteExtension_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Vote)) + }) + return _c +} + +func (_c *Executor_VerifyVoteExtension_Call) Return(_a0 error) *Executor_VerifyVoteExtension_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Executor_VerifyVoteExtension_Call) RunAndReturn(run func(context.Context, *types.Vote) error) *Executor_VerifyVoteExtension_Call { + _c.Call.Return(run) + return _c +} + // NewExecutor creates a new instance of Executor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewExecutor(t interface { diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go deleted file mode 100644 index 006a8b4e03..0000000000 --- a/internal/state/mocks/store.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - selectproposer "github.com/dashpay/tenderdash/internal/consensus/versioned/selectproposer" - state "github.com/dashpay/tenderdash/internal/state" - mock "github.com/stretchr/testify/mock" - - tendermintstate "github.com/dashpay/tenderdash/proto/tendermint/state" - - types "github.com/dashpay/tenderdash/types" -) - -// Store is an autogenerated mock type for the Store type -type Store struct { - mock.Mock -} - -// Bootstrap provides a mock function with given fields: _a0 -func (_m *Store) Bootstrap(_a0 state.State) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Bootstrap") - } - - var r0 error - if rf, ok := ret.Get(0).(func(state.State) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Close provides a mock function with given fields: -func (_m *Store) Close() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Close") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Load provides a mock function with given fields: -func (_m *Store) Load() (state.State, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Load") - } - - var r0 state.State - var r1 error - if rf, ok := ret.Get(0).(func() (state.State, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() state.State); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(state.State) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// LoadABCIResponses provides a mock function with given fields: _a0 -func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for LoadABCIResponses") - } - - var r0 *tendermintstate.ABCIResponses - var r1 error - if rf, ok := ret.Get(0).(func(int64) (*tendermintstate.ABCIResponses, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(int64) *tendermintstate.ABCIResponses); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*tendermintstate.ABCIResponses) - } - } - - if rf, ok := ret.Get(1).(func(int64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// LoadConsensusParams provides a mock function with given fields: _a0 -func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for LoadConsensusParams") - } - - var r0 types.ConsensusParams - var r1 error - if rf, ok := ret.Get(0).(func(int64) (types.ConsensusParams, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(int64) types.ConsensusParams); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(types.ConsensusParams) - } - - if rf, ok := ret.Get(1).(func(int64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// LoadValidators provides a mock function with given fields: _a0, _a1 -func (_m *Store) LoadValidators(_a0 int64, _a1 selectproposer.BlockStore) (*types.ValidatorSet, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for LoadValidators") - } - - var r0 *types.ValidatorSet - var r1 error - if rf, ok := ret.Get(0).(func(int64, selectproposer.BlockStore) (*types.ValidatorSet, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(int64, selectproposer.BlockStore) *types.ValidatorSet); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.ValidatorSet) - } - } - - if rf, ok := ret.Get(1).(func(int64, selectproposer.BlockStore) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// PruneStates provides a mock function with given fields: _a0 -func (_m *Store) PruneStates(_a0 int64) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for PruneStates") - } - - var r0 error - if rf, ok := ret.Get(0).(func(int64) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Save provides a mock function with given fields: _a0 -func (_m *Store) Save(_a0 state.State) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Save") - } - - var r0 error - if rf, ok := ret.Get(0).(func(state.State) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SaveABCIResponses provides a mock function with given fields: _a0, _a1 -func (_m *Store) SaveABCIResponses(_a0 int64, _a1 tendermintstate.ABCIResponses) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SaveABCIResponses") - } - - var r0 error - if rf, ok := ret.Get(0).(func(int64, tendermintstate.ABCIResponses) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SaveValidatorSets provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Store) SaveValidatorSets(_a0 int64, _a1 int64, _a2 *types.ValidatorSet) error { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for SaveValidatorSets") - } - - var r0 error - if rf, ok := ret.Get(0).(func(int64, int64, *types.ValidatorSet) error); ok { - r0 = rf(_a0, _a1, _a2) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStore(t interface { - mock.TestingT - Cleanup(func()) -}) *Store { - mock := &Store{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/statesync/mocks/Metricer.go b/internal/statesync/mocks/Metricer.go deleted file mode 100644 index c4721b304e..0000000000 --- a/internal/statesync/mocks/Metricer.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by mockery 2.9.4. DO NOT EDIT. - -package mocks - -import ( - mock "github.com/stretchr/testify/mock" - - time "time" -) - -// Metricer is an autogenerated mock type for the Metricer type -type Metricer struct { - mock.Mock -} - -// BackFillBlocksTotal provides a mock function with given fields: -func (_m *Metricer) BackFillBlocksTotal() int64 { - ret := _m.Called() - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// BackFilledBlocks provides a mock function with given fields: -func (_m *Metricer) BackFilledBlocks() int64 { - ret := _m.Called() - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// ChunkProcessAvgTime provides a mock function with given fields: -func (_m *Metricer) ChunkProcessAvgTime() time.Duration { - ret := _m.Called() - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - return r0 -} - -// SnapshotChunksCount provides a mock function with given fields: -func (_m *Metricer) SnapshotChunksCount() int64 { - ret := _m.Called() - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// SnapshotChunksTotal provides a mock function with given fields: -func (_m *Metricer) SnapshotChunksTotal() int64 { - ret := _m.Called() - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// SnapshotHeight provides a mock function with given fields: -func (_m *Metricer) SnapshotHeight() int64 { - ret := _m.Called() - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} - -// TotalSnapshots provides a mock function with given fields: -func (_m *Metricer) TotalSnapshots() int64 { - ret := _m.Called() - - var r0 int64 - if rf, ok := ret.Get(0).(func() int64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int64) - } - - return r0 -} diff --git a/internal/statesync/mocks/state_provider.go b/internal/statesync/mocks/state_provider.go deleted file mode 100644 index 73b6b7b372..0000000000 --- a/internal/statesync/mocks/state_provider.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - bytes "github.com/dashpay/tenderdash/libs/bytes" - - mock "github.com/stretchr/testify/mock" - - state "github.com/dashpay/tenderdash/internal/state" - - types "github.com/dashpay/tenderdash/types" -) - -// StateProvider is an autogenerated mock type for the StateProvider type -type StateProvider struct { - mock.Mock -} - -// AppHash provides a mock function with given fields: ctx, height -func (_m *StateProvider) AppHash(ctx context.Context, height uint64) (bytes.HexBytes, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for AppHash") - } - - var r0 bytes.HexBytes - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uint64) (bytes.HexBytes, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, uint64) bytes.HexBytes); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(bytes.HexBytes) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Commit provides a mock function with given fields: ctx, height -func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Commit, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for Commit") - } - - var r0 *types.Commit - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uint64) (*types.Commit, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, uint64) *types.Commit); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Commit) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// State provides a mock function with given fields: ctx, height -func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for State") - } - - var r0 state.State - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uint64) (state.State, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, uint64) state.State); ok { - r0 = rf(ctx, height) - } else { - r0 = ret.Get(0).(state.State) - } - - if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStateProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *StateProvider { - mock := &StateProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/internal/statesync/mocks/stateprovider.go b/internal/statesync/mocks/stateprovider.go new file mode 100644 index 0000000000..8ac2b1544c --- /dev/null +++ b/internal/statesync/mocks/stateprovider.go @@ -0,0 +1,217 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + context "context" + + bytes "github.com/dashpay/tenderdash/libs/bytes" + + mock "github.com/stretchr/testify/mock" + + state "github.com/dashpay/tenderdash/internal/state" + + types "github.com/dashpay/tenderdash/types" +) + +// StateProvider is an autogenerated mock type for the StateProvider type +type StateProvider struct { + mock.Mock +} + +type StateProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *StateProvider) EXPECT() *StateProvider_Expecter { + return &StateProvider_Expecter{mock: &_m.Mock} +} + +// AppHash provides a mock function with given fields: ctx, height +func (_m *StateProvider) AppHash(ctx context.Context, height uint64) (bytes.HexBytes, error) { + ret := _m.Called(ctx, height) + + if len(ret) == 0 { + panic("no return value specified for AppHash") + } + + var r0 bytes.HexBytes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uint64) (bytes.HexBytes, error)); ok { + return rf(ctx, height) + } + if rf, ok := ret.Get(0).(func(context.Context, uint64) bytes.HexBytes); ok { + r0 = rf(ctx, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(bytes.HexBytes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok { + r1 = rf(ctx, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StateProvider_AppHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppHash' +type StateProvider_AppHash_Call struct { + *mock.Call +} + +// AppHash is a helper method to define mock.On call +// - ctx context.Context +// - height uint64 +func (_e *StateProvider_Expecter) AppHash(ctx interface{}, height interface{}) *StateProvider_AppHash_Call { + return &StateProvider_AppHash_Call{Call: _e.mock.On("AppHash", ctx, height)} +} + +func (_c *StateProvider_AppHash_Call) Run(run func(ctx context.Context, height uint64)) *StateProvider_AppHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *StateProvider_AppHash_Call) Return(_a0 bytes.HexBytes, _a1 error) *StateProvider_AppHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StateProvider_AppHash_Call) RunAndReturn(run func(context.Context, uint64) (bytes.HexBytes, error)) *StateProvider_AppHash_Call { + _c.Call.Return(run) + return _c +} + +// Commit provides a mock function with given fields: ctx, height +func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Commit, error) { + ret := _m.Called(ctx, height) + + if len(ret) == 0 { + panic("no return value specified for Commit") + } + + var r0 *types.Commit + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uint64) (*types.Commit, error)); ok { + return rf(ctx, height) + } + if rf, ok := ret.Get(0).(func(context.Context, uint64) *types.Commit); ok { + r0 = rf(ctx, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Commit) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok { + r1 = rf(ctx, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StateProvider_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit' +type StateProvider_Commit_Call struct { + *mock.Call +} + +// Commit is a helper method to define mock.On call +// - ctx context.Context +// - height uint64 +func (_e *StateProvider_Expecter) Commit(ctx interface{}, height interface{}) *StateProvider_Commit_Call { + return &StateProvider_Commit_Call{Call: _e.mock.On("Commit", ctx, height)} +} + +func (_c *StateProvider_Commit_Call) Run(run func(ctx context.Context, height uint64)) *StateProvider_Commit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *StateProvider_Commit_Call) Return(_a0 *types.Commit, _a1 error) *StateProvider_Commit_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StateProvider_Commit_Call) RunAndReturn(run func(context.Context, uint64) (*types.Commit, error)) *StateProvider_Commit_Call { + _c.Call.Return(run) + return _c +} + +// State provides a mock function with given fields: ctx, height +func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, error) { + ret := _m.Called(ctx, height) + + if len(ret) == 0 { + panic("no return value specified for State") + } + + var r0 state.State + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uint64) (state.State, error)); ok { + return rf(ctx, height) + } + if rf, ok := ret.Get(0).(func(context.Context, uint64) state.State); ok { + r0 = rf(ctx, height) + } else { + r0 = ret.Get(0).(state.State) + } + + if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok { + r1 = rf(ctx, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StateProvider_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State' +type StateProvider_State_Call struct { + *mock.Call +} + +// State is a helper method to define mock.On call +// - ctx context.Context +// - height uint64 +func (_e *StateProvider_Expecter) State(ctx interface{}, height interface{}) *StateProvider_State_Call { + return &StateProvider_State_Call{Call: _e.mock.On("State", ctx, height)} +} + +func (_c *StateProvider_State_Call) Run(run func(ctx context.Context, height uint64)) *StateProvider_State_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *StateProvider_State_Call) Return(_a0 state.State, _a1 error) *StateProvider_State_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StateProvider_State_Call) RunAndReturn(run func(context.Context, uint64) (state.State, error)) *StateProvider_State_Call { + _c.Call.Return(run) + return _c +} + +// NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewStateProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *StateProvider { + mock := &StateProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/libs/store/mocks/store.go b/libs/store/mocks/store.go index 4a2b232fb5..1ad6e3bb49 100644 --- a/libs/store/mocks/store.go +++ b/libs/store/mocks/store.go @@ -12,6 +12,14 @@ type Store[K comparable, V any] struct { mock.Mock } +type Store_Expecter[K comparable, V any] struct { + mock *mock.Mock +} + +func (_m *Store[K, V]) EXPECT() *Store_Expecter[K, V] { + return &Store_Expecter[K, V]{mock: &_m.Mock} +} + // All provides a mock function with given fields: func (_m *Store[K, V]) All() []V { ret := _m.Called() @@ -32,11 +40,66 @@ func (_m *Store[K, V]) All() []V { return r0 } +// Store_All_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'All' +type Store_All_Call[K comparable, V any] struct { + *mock.Call +} + +// All is a helper method to define mock.On call +func (_e *Store_Expecter[K, V]) All() *Store_All_Call[K, V] { + return &Store_All_Call[K, V]{Call: _e.mock.On("All")} +} + +func (_c *Store_All_Call[K, V]) Run(run func()) *Store_All_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Store_All_Call[K, V]) Return(_a0 []V) *Store_All_Call[K, V] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_All_Call[K, V]) RunAndReturn(run func() []V) *Store_All_Call[K, V] { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: key func (_m *Store[K, V]) Delete(key K) { _m.Called(key) } +// Store_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Store_Delete_Call[K comparable, V any] struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - key K +func (_e *Store_Expecter[K, V]) Delete(key interface{}) *Store_Delete_Call[K, V] { + return &Store_Delete_Call[K, V]{Call: _e.mock.On("Delete", key)} +} + +func (_c *Store_Delete_Call[K, V]) Run(run func(key K)) *Store_Delete_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(K)) + }) + return _c +} + +func (_c *Store_Delete_Call[K, V]) Return() *Store_Delete_Call[K, V] { + _c.Call.Return() + return _c +} + +func (_c *Store_Delete_Call[K, V]) RunAndReturn(run func(K)) *Store_Delete_Call[K, V] { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: key func (_m *Store[K, V]) Get(key K) (V, bool) { ret := _m.Called(key) @@ -65,6 +128,34 @@ func (_m *Store[K, V]) Get(key K) (V, bool) { return r0, r1 } +// Store_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type Store_Get_Call[K comparable, V any] struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - key K +func (_e *Store_Expecter[K, V]) Get(key interface{}) *Store_Get_Call[K, V] { + return &Store_Get_Call[K, V]{Call: _e.mock.On("Get", key)} +} + +func (_c *Store_Get_Call[K, V]) Run(run func(key K)) *Store_Get_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(K)) + }) + return _c +} + +func (_c *Store_Get_Call[K, V]) Return(_a0 V, _a1 bool) *Store_Get_Call[K, V] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Store_Get_Call[K, V]) RunAndReturn(run func(K) (V, bool)) *Store_Get_Call[K, V] { + _c.Call.Return(run) + return _c +} + // GetAndDelete provides a mock function with given fields: key func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { ret := _m.Called(key) @@ -93,6 +184,34 @@ func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { return r0, r1 } +// Store_GetAndDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAndDelete' +type Store_GetAndDelete_Call[K comparable, V any] struct { + *mock.Call +} + +// GetAndDelete is a helper method to define mock.On call +// - key K +func (_e *Store_Expecter[K, V]) GetAndDelete(key interface{}) *Store_GetAndDelete_Call[K, V] { + return &Store_GetAndDelete_Call[K, V]{Call: _e.mock.On("GetAndDelete", key)} +} + +func (_c *Store_GetAndDelete_Call[K, V]) Run(run func(key K)) *Store_GetAndDelete_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(K)) + }) + return _c +} + +func (_c *Store_GetAndDelete_Call[K, V]) Return(_a0 V, _a1 bool) *Store_GetAndDelete_Call[K, V] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Store_GetAndDelete_Call[K, V]) RunAndReturn(run func(K) (V, bool)) *Store_GetAndDelete_Call[K, V] { + _c.Call.Return(run) + return _c +} + // IsZero provides a mock function with given fields: func (_m *Store[K, V]) IsZero() bool { ret := _m.Called() @@ -111,6 +230,33 @@ func (_m *Store[K, V]) IsZero() bool { return r0 } +// Store_IsZero_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsZero' +type Store_IsZero_Call[K comparable, V any] struct { + *mock.Call +} + +// IsZero is a helper method to define mock.On call +func (_e *Store_Expecter[K, V]) IsZero() *Store_IsZero_Call[K, V] { + return &Store_IsZero_Call[K, V]{Call: _e.mock.On("IsZero")} +} + +func (_c *Store_IsZero_Call[K, V]) Run(run func()) *Store_IsZero_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Store_IsZero_Call[K, V]) Return(_a0 bool) *Store_IsZero_Call[K, V] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_IsZero_Call[K, V]) RunAndReturn(run func() bool) *Store_IsZero_Call[K, V] { + _c.Call.Return(run) + return _c +} + // Len provides a mock function with given fields: func (_m *Store[K, V]) Len() int { ret := _m.Called() @@ -129,11 +275,67 @@ func (_m *Store[K, V]) Len() int { return r0 } +// Store_Len_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Len' +type Store_Len_Call[K comparable, V any] struct { + *mock.Call +} + +// Len is a helper method to define mock.On call +func (_e *Store_Expecter[K, V]) Len() *Store_Len_Call[K, V] { + return &Store_Len_Call[K, V]{Call: _e.mock.On("Len")} +} + +func (_c *Store_Len_Call[K, V]) Run(run func()) *Store_Len_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Store_Len_Call[K, V]) Return(_a0 int) *Store_Len_Call[K, V] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_Len_Call[K, V]) RunAndReturn(run func() int) *Store_Len_Call[K, V] { + _c.Call.Return(run) + return _c +} + // Put provides a mock function with given fields: key, data func (_m *Store[K, V]) Put(key K, data V) { _m.Called(key, data) } +// Store_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' +type Store_Put_Call[K comparable, V any] struct { + *mock.Call +} + +// Put is a helper method to define mock.On call +// - key K +// - data V +func (_e *Store_Expecter[K, V]) Put(key interface{}, data interface{}) *Store_Put_Call[K, V] { + return &Store_Put_Call[K, V]{Call: _e.mock.On("Put", key, data)} +} + +func (_c *Store_Put_Call[K, V]) Run(run func(key K, data V)) *Store_Put_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(K), args[1].(V)) + }) + return _c +} + +func (_c *Store_Put_Call[K, V]) Return() *Store_Put_Call[K, V] { + _c.Call.Return() + return _c +} + +func (_c *Store_Put_Call[K, V]) RunAndReturn(run func(K, V)) *Store_Put_Call[K, V] { + _c.Call.Return(run) + return _c +} + // Query provides a mock function with given fields: spec, limit func (_m *Store[K, V]) Query(spec store.QueryFunc[K, V], limit int) []V { ret := _m.Called(spec, limit) @@ -154,6 +356,35 @@ func (_m *Store[K, V]) Query(spec store.QueryFunc[K, V], limit int) []V { return r0 } +// Store_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' +type Store_Query_Call[K comparable, V any] struct { + *mock.Call +} + +// Query is a helper method to define mock.On call +// - spec store.QueryFunc[K,V] +// - limit int +func (_e *Store_Expecter[K, V]) Query(spec interface{}, limit interface{}) *Store_Query_Call[K, V] { + return &Store_Query_Call[K, V]{Call: _e.mock.On("Query", spec, limit)} +} + +func (_c *Store_Query_Call[K, V]) Run(run func(spec store.QueryFunc[K, V], limit int)) *Store_Query_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(store.QueryFunc[K, V]), args[1].(int)) + }) + return _c +} + +func (_c *Store_Query_Call[K, V]) Return(_a0 []V) *Store_Query_Call[K, V] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_Query_Call[K, V]) RunAndReturn(run func(store.QueryFunc[K, V], int) []V) *Store_Query_Call[K, V] { + _c.Call.Return(run) + return _c +} + // Update provides a mock function with given fields: key, updates func (_m *Store[K, V]) Update(key K, updates ...store.UpdateFunc[K, V]) { _va := make([]interface{}, len(updates)) @@ -166,6 +397,42 @@ func (_m *Store[K, V]) Update(key K, updates ...store.UpdateFunc[K, V]) { _m.Called(_ca...) } +// Store_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type Store_Update_Call[K comparable, V any] struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - key K +// - updates ...store.UpdateFunc[K,V] +func (_e *Store_Expecter[K, V]) Update(key interface{}, updates ...interface{}) *Store_Update_Call[K, V] { + return &Store_Update_Call[K, V]{Call: _e.mock.On("Update", + append([]interface{}{key}, updates...)...)} +} + +func (_c *Store_Update_Call[K, V]) Run(run func(key K, updates ...store.UpdateFunc[K, V])) *Store_Update_Call[K, V] { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]store.UpdateFunc[K, V], len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(store.UpdateFunc[K, V]) + } + } + run(args[0].(K), variadicArgs...) + }) + return _c +} + +func (_c *Store_Update_Call[K, V]) Return() *Store_Update_Call[K, V] { + _c.Call.Return() + return _c +} + +func (_c *Store_Update_Call[K, V]) RunAndReturn(run func(K, ...store.UpdateFunc[K, V])) *Store_Update_Call[K, V] { + _c.Call.Return(run) + return _c +} + // NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewStore[K comparable, V any](t interface { diff --git a/light/provider/mocks/provider.go b/light/provider/mocks/provider.go index 24cd675bf9..137e9958b0 100644 --- a/light/provider/mocks/provider.go +++ b/light/provider/mocks/provider.go @@ -15,6 +15,14 @@ type Provider struct { mock.Mock } +type Provider_Expecter struct { + mock *mock.Mock +} + +func (_m *Provider) EXPECT() *Provider_Expecter { + return &Provider_Expecter{mock: &_m.Mock} +} + // ID provides a mock function with given fields: func (_m *Provider) ID() string { ret := _m.Called() @@ -33,6 +41,33 @@ func (_m *Provider) ID() string { return r0 } +// Provider_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID' +type Provider_ID_Call struct { + *mock.Call +} + +// ID is a helper method to define mock.On call +func (_e *Provider_Expecter) ID() *Provider_ID_Call { + return &Provider_ID_Call{Call: _e.mock.On("ID")} +} + +func (_c *Provider_ID_Call) Run(run func()) *Provider_ID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Provider_ID_Call) Return(_a0 string) *Provider_ID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Provider_ID_Call) RunAndReturn(run func() string) *Provider_ID_Call { + _c.Call.Return(run) + return _c +} + // LightBlock provides a mock function with given fields: ctx, height func (_m *Provider) LightBlock(ctx context.Context, height int64) (*types.LightBlock, error) { ret := _m.Called(ctx, height) @@ -63,6 +98,35 @@ func (_m *Provider) LightBlock(ctx context.Context, height int64) (*types.LightB return r0, r1 } +// Provider_LightBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LightBlock' +type Provider_LightBlock_Call struct { + *mock.Call +} + +// LightBlock is a helper method to define mock.On call +// - ctx context.Context +// - height int64 +func (_e *Provider_Expecter) LightBlock(ctx interface{}, height interface{}) *Provider_LightBlock_Call { + return &Provider_LightBlock_Call{Call: _e.mock.On("LightBlock", ctx, height)} +} + +func (_c *Provider_LightBlock_Call) Run(run func(ctx context.Context, height int64)) *Provider_LightBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Provider_LightBlock_Call) Return(_a0 *types.LightBlock, _a1 error) *Provider_LightBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Provider_LightBlock_Call) RunAndReturn(run func(context.Context, int64) (*types.LightBlock, error)) *Provider_LightBlock_Call { + _c.Call.Return(run) + return _c +} + // ReportEvidence provides a mock function with given fields: _a0, _a1 func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) error { ret := _m.Called(_a0, _a1) @@ -81,6 +145,35 @@ func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) erro return r0 } +// Provider_ReportEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReportEvidence' +type Provider_ReportEvidence_Call struct { + *mock.Call +} + +// ReportEvidence is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Evidence +func (_e *Provider_Expecter) ReportEvidence(_a0 interface{}, _a1 interface{}) *Provider_ReportEvidence_Call { + return &Provider_ReportEvidence_Call{Call: _e.mock.On("ReportEvidence", _a0, _a1)} +} + +func (_c *Provider_ReportEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *Provider_ReportEvidence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Evidence)) + }) + return _c +} + +func (_c *Provider_ReportEvidence_Call) Return(_a0 error) *Provider_ReportEvidence_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Provider_ReportEvidence_Call) RunAndReturn(run func(context.Context, types.Evidence) error) *Provider_ReportEvidence_Call { + _c.Call.Return(run) + return _c +} + // NewProvider creates a new instance of Provider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewProvider(t interface { diff --git a/light/rpc/mocks/light_client.go b/light/rpc/mocks/light_client.go deleted file mode 100644 index 8d53cd4f91..0000000000 --- a/light/rpc/mocks/light_client.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - time "time" - - types "github.com/dashpay/tenderdash/types" -) - -// LightClient is an autogenerated mock type for the LightClient type -type LightClient struct { - mock.Mock -} - -// ChainID provides a mock function with given fields: -func (_m *LightClient) ChainID() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ChainID") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// Status provides a mock function with given fields: ctx -func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Status") - } - - var r0 *types.LightClientInfo - if rf, ok := ret.Get(0).(func(context.Context) *types.LightClientInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.LightClientInfo) - } - } - - return r0 -} - -// TrustedLightBlock provides a mock function with given fields: height -func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error) { - ret := _m.Called(height) - - if len(ret) == 0 { - panic("no return value specified for TrustedLightBlock") - } - - var r0 *types.LightBlock - var r1 error - if rf, ok := ret.Get(0).(func(int64) (*types.LightBlock, error)); ok { - return rf(height) - } - if rf, ok := ret.Get(0).(func(int64) *types.LightBlock); ok { - r0 = rf(height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.LightBlock) - } - } - - if rf, ok := ret.Get(1).(func(int64) error); ok { - r1 = rf(height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Update provides a mock function with given fields: ctx, now -func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightBlock, error) { - ret := _m.Called(ctx, now) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *types.LightBlock - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, time.Time) (*types.LightBlock, error)); ok { - return rf(ctx, now) - } - if rf, ok := ret.Get(0).(func(context.Context, time.Time) *types.LightBlock); ok { - r0 = rf(ctx, now) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.LightBlock) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { - r1 = rf(ctx, now) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// VerifyLightBlockAtHeight provides a mock function with given fields: ctx, height, now -func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) { - ret := _m.Called(ctx, height, now) - - if len(ret) == 0 { - panic("no return value specified for VerifyLightBlockAtHeight") - } - - var r0 *types.LightBlock - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) (*types.LightBlock, error)); ok { - return rf(ctx, height, now) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) *types.LightBlock); ok { - r0 = rf(ctx, height, now) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.LightBlock) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, time.Time) error); ok { - r1 = rf(ctx, height, now) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewLightClient(t interface { - mock.TestingT - Cleanup(func()) -}) *LightClient { - mock := &LightClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/light/rpc/mocks/lightclient.go b/light/rpc/mocks/lightclient.go new file mode 100644 index 0000000000..6edc4304d1 --- /dev/null +++ b/light/rpc/mocks/lightclient.go @@ -0,0 +1,310 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + time "time" + + types "github.com/dashpay/tenderdash/types" +) + +// LightClient is an autogenerated mock type for the LightClient type +type LightClient struct { + mock.Mock +} + +type LightClient_Expecter struct { + mock *mock.Mock +} + +func (_m *LightClient) EXPECT() *LightClient_Expecter { + return &LightClient_Expecter{mock: &_m.Mock} +} + +// ChainID provides a mock function with given fields: +func (_m *LightClient) ChainID() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for ChainID") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// LightClient_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' +type LightClient_ChainID_Call struct { + *mock.Call +} + +// ChainID is a helper method to define mock.On call +func (_e *LightClient_Expecter) ChainID() *LightClient_ChainID_Call { + return &LightClient_ChainID_Call{Call: _e.mock.On("ChainID")} +} + +func (_c *LightClient_ChainID_Call) Run(run func()) *LightClient_ChainID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LightClient_ChainID_Call) Return(_a0 string) *LightClient_ChainID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LightClient_ChainID_Call) RunAndReturn(run func() string) *LightClient_ChainID_Call { + _c.Call.Return(run) + return _c +} + +// Status provides a mock function with given fields: ctx +func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Status") + } + + var r0 *types.LightClientInfo + if rf, ok := ret.Get(0).(func(context.Context) *types.LightClientInfo); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.LightClientInfo) + } + } + + return r0 +} + +// LightClient_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' +type LightClient_Status_Call struct { + *mock.Call +} + +// Status is a helper method to define mock.On call +// - ctx context.Context +func (_e *LightClient_Expecter) Status(ctx interface{}) *LightClient_Status_Call { + return &LightClient_Status_Call{Call: _e.mock.On("Status", ctx)} +} + +func (_c *LightClient_Status_Call) Run(run func(ctx context.Context)) *LightClient_Status_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LightClient_Status_Call) Return(_a0 *types.LightClientInfo) *LightClient_Status_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LightClient_Status_Call) RunAndReturn(run func(context.Context) *types.LightClientInfo) *LightClient_Status_Call { + _c.Call.Return(run) + return _c +} + +// TrustedLightBlock provides a mock function with given fields: height +func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error) { + ret := _m.Called(height) + + if len(ret) == 0 { + panic("no return value specified for TrustedLightBlock") + } + + var r0 *types.LightBlock + var r1 error + if rf, ok := ret.Get(0).(func(int64) (*types.LightBlock, error)); ok { + return rf(height) + } + if rf, ok := ret.Get(0).(func(int64) *types.LightBlock); ok { + r0 = rf(height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.LightBlock) + } + } + + if rf, ok := ret.Get(1).(func(int64) error); ok { + r1 = rf(height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LightClient_TrustedLightBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TrustedLightBlock' +type LightClient_TrustedLightBlock_Call struct { + *mock.Call +} + +// TrustedLightBlock is a helper method to define mock.On call +// - height int64 +func (_e *LightClient_Expecter) TrustedLightBlock(height interface{}) *LightClient_TrustedLightBlock_Call { + return &LightClient_TrustedLightBlock_Call{Call: _e.mock.On("TrustedLightBlock", height)} +} + +func (_c *LightClient_TrustedLightBlock_Call) Run(run func(height int64)) *LightClient_TrustedLightBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *LightClient_TrustedLightBlock_Call) Return(_a0 *types.LightBlock, _a1 error) *LightClient_TrustedLightBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LightClient_TrustedLightBlock_Call) RunAndReturn(run func(int64) (*types.LightBlock, error)) *LightClient_TrustedLightBlock_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, now +func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightBlock, error) { + ret := _m.Called(ctx, now) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *types.LightBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, time.Time) (*types.LightBlock, error)); ok { + return rf(ctx, now) + } + if rf, ok := ret.Get(0).(func(context.Context, time.Time) *types.LightBlock); ok { + r0 = rf(ctx, now) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.LightBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, time.Time) error); ok { + r1 = rf(ctx, now) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LightClient_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type LightClient_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - now time.Time +func (_e *LightClient_Expecter) Update(ctx interface{}, now interface{}) *LightClient_Update_Call { + return &LightClient_Update_Call{Call: _e.mock.On("Update", ctx, now)} +} + +func (_c *LightClient_Update_Call) Run(run func(ctx context.Context, now time.Time)) *LightClient_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Time)) + }) + return _c +} + +func (_c *LightClient_Update_Call) Return(_a0 *types.LightBlock, _a1 error) *LightClient_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LightClient_Update_Call) RunAndReturn(run func(context.Context, time.Time) (*types.LightBlock, error)) *LightClient_Update_Call { + _c.Call.Return(run) + return _c +} + +// VerifyLightBlockAtHeight provides a mock function with given fields: ctx, height, now +func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) { + ret := _m.Called(ctx, height, now) + + if len(ret) == 0 { + panic("no return value specified for VerifyLightBlockAtHeight") + } + + var r0 *types.LightBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) (*types.LightBlock, error)); ok { + return rf(ctx, height, now) + } + if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) *types.LightBlock); ok { + r0 = rf(ctx, height, now) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.LightBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, int64, time.Time) error); ok { + r1 = rf(ctx, height, now) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LightClient_VerifyLightBlockAtHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyLightBlockAtHeight' +type LightClient_VerifyLightBlockAtHeight_Call struct { + *mock.Call +} + +// VerifyLightBlockAtHeight is a helper method to define mock.On call +// - ctx context.Context +// - height int64 +// - now time.Time +func (_e *LightClient_Expecter) VerifyLightBlockAtHeight(ctx interface{}, height interface{}, now interface{}) *LightClient_VerifyLightBlockAtHeight_Call { + return &LightClient_VerifyLightBlockAtHeight_Call{Call: _e.mock.On("VerifyLightBlockAtHeight", ctx, height, now)} +} + +func (_c *LightClient_VerifyLightBlockAtHeight_Call) Run(run func(ctx context.Context, height int64, now time.Time)) *LightClient_VerifyLightBlockAtHeight_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(time.Time)) + }) + return _c +} + +func (_c *LightClient_VerifyLightBlockAtHeight_Call) Return(_a0 *types.LightBlock, _a1 error) *LightClient_VerifyLightBlockAtHeight_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LightClient_VerifyLightBlockAtHeight_Call) RunAndReturn(run func(context.Context, int64, time.Time) (*types.LightBlock, error)) *LightClient_VerifyLightBlockAtHeight_Call { + _c.Call.Return(run) + return _c +} + +// NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewLightClient(t interface { + mock.TestingT + Cleanup(func()) +}) *LightClient { + mock := &LightClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/rpc/client/mocks/abci_client.go b/rpc/client/mocks/abci_client.go deleted file mode 100644 index 3d0cc35ca5..0000000000 --- a/rpc/client/mocks/abci_client.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - bytes "github.com/dashpay/tenderdash/libs/bytes" - client "github.com/dashpay/tenderdash/rpc/client" - - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/types" -) - -// ABCIClient is an autogenerated mock type for the ABCIClient type -type ABCIClient struct { - mock.Mock -} - -// ABCIInfo provides a mock function with given fields: _a0 -func (_m *ABCIClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ABCIInfo") - } - - var r0 *coretypes.ResultABCIInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultABCIInfo); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultABCIInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ABCIQuery provides a mock function with given fields: ctx, path, data -func (_m *ABCIClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { - ret := _m.Called(ctx, path, data) - - if len(ret) == 0 { - panic("no return value specified for ABCIQuery") - } - - var r0 *coretypes.ResultABCIQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { - return rf(ctx, path, data) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) *coretypes.ResultABCIQuery); ok { - r0 = rf(ctx, path, data) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultABCIQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bytes.HexBytes) error); ok { - r1 = rf(ctx, path, data) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ABCIQueryWithOptions provides a mock function with given fields: ctx, path, data, opts -func (_m *ABCIClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { - ret := _m.Called(ctx, path, data, opts) - - if len(ret) == 0 { - panic("no return value specified for ABCIQueryWithOptions") - } - - var r0 *coretypes.ResultABCIQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { - return rf(ctx, path, data, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) *coretypes.ResultABCIQuery); ok { - r0 = rf(ctx, path, data, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultABCIQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) error); ok { - r1 = rf(ctx, path, data, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastTx provides a mock function with given fields: _a0, _a1 -func (_m *ABCIClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastTx") - } - - var r0 *coretypes.ResultBroadcastTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *ABCIClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastTxAsync") - } - - var r0 *coretypes.ResultBroadcastTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastTxCommit provides a mock function with given fields: _a0, _a1 -func (_m *ABCIClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastTxCommit") - } - - var r0 *coretypes.ResultBroadcastTxCommit - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTxCommit); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastTxCommit) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastTxSync provides a mock function with given fields: _a0, _a1 -func (_m *ABCIClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastTxSync") - } - - var r0 *coretypes.ResultBroadcastTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewABCIClient creates a new instance of ABCIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewABCIClient(t interface { - mock.TestingT - Cleanup(func()) -}) *ABCIClient { - mock := &ABCIClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/client.go b/rpc/client/mocks/client.go index c62a3347a0..0b4d6fbf46 100644 --- a/rpc/client/mocks/client.go +++ b/rpc/client/mocks/client.go @@ -20,6 +20,14 @@ type Client struct { mock.Mock } +type Client_Expecter struct { + mock *mock.Mock +} + +func (_m *Client) EXPECT() *Client_Expecter { + return &Client_Expecter{mock: &_m.Mock} +} + // ABCIInfo provides a mock function with given fields: _a0 func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) @@ -50,6 +58,34 @@ func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, erro return r0, r1 } +// Client_ABCIInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIInfo' +type Client_ABCIInfo_Call struct { + *mock.Call +} + +// ABCIInfo is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) ABCIInfo(_a0 interface{}) *Client_ABCIInfo_Call { + return &Client_ABCIInfo_Call{Call: _e.mock.On("ABCIInfo", _a0)} +} + +func (_c *Client_ABCIInfo_Call) Run(run func(_a0 context.Context)) *Client_ABCIInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_ABCIInfo_Call) Return(_a0 *coretypes.ResultABCIInfo, _a1 error) *Client_ABCIInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ABCIInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultABCIInfo, error)) *Client_ABCIInfo_Call { + _c.Call.Return(run) + return _c +} + // ABCIQuery provides a mock function with given fields: ctx, path, data func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) @@ -80,6 +116,36 @@ func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexByte return r0, r1 } +// Client_ABCIQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIQuery' +type Client_ABCIQuery_Call struct { + *mock.Call +} + +// ABCIQuery is a helper method to define mock.On call +// - ctx context.Context +// - path string +// - data bytes.HexBytes +func (_e *Client_Expecter) ABCIQuery(ctx interface{}, path interface{}, data interface{}) *Client_ABCIQuery_Call { + return &Client_ABCIQuery_Call{Call: _e.mock.On("ABCIQuery", ctx, path, data)} +} + +func (_c *Client_ABCIQuery_Call) Run(run func(ctx context.Context, path string, data bytes.HexBytes)) *Client_ABCIQuery_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(bytes.HexBytes)) + }) + return _c +} + +func (_c *Client_ABCIQuery_Call) Return(_a0 *coretypes.ResultABCIQuery, _a1 error) *Client_ABCIQuery_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ABCIQuery_Call) RunAndReturn(run func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)) *Client_ABCIQuery_Call { + _c.Call.Return(run) + return _c +} + // ABCIQueryWithOptions provides a mock function with given fields: ctx, path, data, opts func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) @@ -110,6 +176,37 @@ func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data by return r0, r1 } +// Client_ABCIQueryWithOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIQueryWithOptions' +type Client_ABCIQueryWithOptions_Call struct { + *mock.Call +} + +// ABCIQueryWithOptions is a helper method to define mock.On call +// - ctx context.Context +// - path string +// - data bytes.HexBytes +// - opts client.ABCIQueryOptions +func (_e *Client_Expecter) ABCIQueryWithOptions(ctx interface{}, path interface{}, data interface{}, opts interface{}) *Client_ABCIQueryWithOptions_Call { + return &Client_ABCIQueryWithOptions_Call{Call: _e.mock.On("ABCIQueryWithOptions", ctx, path, data, opts)} +} + +func (_c *Client_ABCIQueryWithOptions_Call) Run(run func(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions)) *Client_ABCIQueryWithOptions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(bytes.HexBytes), args[3].(client.ABCIQueryOptions)) + }) + return _c +} + +func (_c *Client_ABCIQueryWithOptions_Call) Return(_a0 *coretypes.ResultABCIQuery, _a1 error) *Client_ABCIQueryWithOptions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ABCIQueryWithOptions_Call) RunAndReturn(run func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)) *Client_ABCIQueryWithOptions_Call { + _c.Call.Return(run) + return _c +} + // Block provides a mock function with given fields: ctx, height func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) @@ -140,6 +237,35 @@ func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBl return r0, r1 } +// Client_Block_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Block' +type Client_Block_Call struct { + *mock.Call +} + +// Block is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *Client_Expecter) Block(ctx interface{}, height interface{}) *Client_Block_Call { + return &Client_Block_Call{Call: _e.mock.On("Block", ctx, height)} +} + +func (_c *Client_Block_Call) Run(run func(ctx context.Context, height *int64)) *Client_Block_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *Client_Block_Call) Return(_a0 *coretypes.ResultBlock, _a1 error) *Client_Block_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Block_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultBlock, error)) *Client_Block_Call { + _c.Call.Return(run) + return _c +} + // BlockByHash provides a mock function with given fields: ctx, hash func (_m *Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) @@ -170,6 +296,35 @@ func (_m *Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*corety return r0, r1 } +// Client_BlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHash' +type Client_BlockByHash_Call struct { + *mock.Call +} + +// BlockByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash bytes.HexBytes +func (_e *Client_Expecter) BlockByHash(ctx interface{}, hash interface{}) *Client_BlockByHash_Call { + return &Client_BlockByHash_Call{Call: _e.mock.On("BlockByHash", ctx, hash)} +} + +func (_c *Client_BlockByHash_Call) Run(run func(ctx context.Context, hash bytes.HexBytes)) *Client_BlockByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *Client_BlockByHash_Call) Return(_a0 *coretypes.ResultBlock, _a1 error) *Client_BlockByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BlockByHash_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)) *Client_BlockByHash_Call { + _c.Call.Return(run) + return _c +} + // BlockResults provides a mock function with given fields: ctx, height func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) @@ -200,6 +355,35 @@ func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.R return r0, r1 } +// Client_BlockResults_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockResults' +type Client_BlockResults_Call struct { + *mock.Call +} + +// BlockResults is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *Client_Expecter) BlockResults(ctx interface{}, height interface{}) *Client_BlockResults_Call { + return &Client_BlockResults_Call{Call: _e.mock.On("BlockResults", ctx, height)} +} + +func (_c *Client_BlockResults_Call) Run(run func(ctx context.Context, height *int64)) *Client_BlockResults_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *Client_BlockResults_Call) Return(_a0 *coretypes.ResultBlockResults, _a1 error) *Client_BlockResults_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BlockResults_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultBlockResults, error)) *Client_BlockResults_Call { + _c.Call.Return(run) + return _c +} + // BlockSearch provides a mock function with given fields: ctx, query, page, perPage, orderBy func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) @@ -230,6 +414,38 @@ func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perP return r0, r1 } +// Client_BlockSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockSearch' +type Client_BlockSearch_Call struct { + *mock.Call +} + +// BlockSearch is a helper method to define mock.On call +// - ctx context.Context +// - query string +// - page *int +// - perPage *int +// - orderBy string +func (_e *Client_Expecter) BlockSearch(ctx interface{}, query interface{}, page interface{}, perPage interface{}, orderBy interface{}) *Client_BlockSearch_Call { + return &Client_BlockSearch_Call{Call: _e.mock.On("BlockSearch", ctx, query, page, perPage, orderBy)} +} + +func (_c *Client_BlockSearch_Call) Run(run func(ctx context.Context, query string, page *int, perPage *int, orderBy string)) *Client_BlockSearch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*int), args[3].(*int), args[4].(string)) + }) + return _c +} + +func (_c *Client_BlockSearch_Call) Return(_a0 *coretypes.ResultBlockSearch, _a1 error) *Client_BlockSearch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BlockSearch_Call) RunAndReturn(run func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)) *Client_BlockSearch_Call { + _c.Call.Return(run) + return _c +} + // BlockchainInfo provides a mock function with given fields: ctx, minHeight, maxHeight func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) @@ -260,6 +476,36 @@ func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight return r0, r1 } +// Client_BlockchainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockchainInfo' +type Client_BlockchainInfo_Call struct { + *mock.Call +} + +// BlockchainInfo is a helper method to define mock.On call +// - ctx context.Context +// - minHeight int64 +// - maxHeight int64 +func (_e *Client_Expecter) BlockchainInfo(ctx interface{}, minHeight interface{}, maxHeight interface{}) *Client_BlockchainInfo_Call { + return &Client_BlockchainInfo_Call{Call: _e.mock.On("BlockchainInfo", ctx, minHeight, maxHeight)} +} + +func (_c *Client_BlockchainInfo_Call) Run(run func(ctx context.Context, minHeight int64, maxHeight int64)) *Client_BlockchainInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64)) + }) + return _c +} + +func (_c *Client_BlockchainInfo_Call) Return(_a0 *coretypes.ResultBlockchainInfo, _a1 error) *Client_BlockchainInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BlockchainInfo_Call) RunAndReturn(run func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)) *Client_BlockchainInfo_Call { + _c.Call.Return(run) + return _c +} + // BroadcastEvidence provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) @@ -290,6 +536,35 @@ func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*c return r0, r1 } +// Client_BroadcastEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastEvidence' +type Client_BroadcastEvidence_Call struct { + *mock.Call +} + +// BroadcastEvidence is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Evidence +func (_e *Client_Expecter) BroadcastEvidence(_a0 interface{}, _a1 interface{}) *Client_BroadcastEvidence_Call { + return &Client_BroadcastEvidence_Call{Call: _e.mock.On("BroadcastEvidence", _a0, _a1)} +} + +func (_c *Client_BroadcastEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *Client_BroadcastEvidence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Evidence)) + }) + return _c +} + +func (_c *Client_BroadcastEvidence_Call) Return(_a0 *coretypes.ResultBroadcastEvidence, _a1 error) *Client_BroadcastEvidence_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BroadcastEvidence_Call) RunAndReturn(run func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)) *Client_BroadcastEvidence_Call { + _c.Call.Return(run) + return _c +} + // BroadcastTx provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -320,6 +595,35 @@ func (_m *Client) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.Res return r0, r1 } +// Client_BroadcastTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTx' +type Client_BroadcastTx_Call struct { + *mock.Call +} + +// BroadcastTx is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *Client_Expecter) BroadcastTx(_a0 interface{}, _a1 interface{}) *Client_BroadcastTx_Call { + return &Client_BroadcastTx_Call{Call: _e.mock.On("BroadcastTx", _a0, _a1)} +} + +func (_c *Client_BroadcastTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_BroadcastTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *Client_BroadcastTx_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *Client_BroadcastTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BroadcastTx_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *Client_BroadcastTx_Call { + _c.Call.Return(run) + return _c +} + // BroadcastTxAsync provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -350,6 +654,35 @@ func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretype return r0, r1 } +// Client_BroadcastTxAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxAsync' +type Client_BroadcastTxAsync_Call struct { + *mock.Call +} + +// BroadcastTxAsync is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *Client_Expecter) BroadcastTxAsync(_a0 interface{}, _a1 interface{}) *Client_BroadcastTxAsync_Call { + return &Client_BroadcastTxAsync_Call{Call: _e.mock.On("BroadcastTxAsync", _a0, _a1)} +} + +func (_c *Client_BroadcastTxAsync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_BroadcastTxAsync_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *Client_BroadcastTxAsync_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *Client_BroadcastTxAsync_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BroadcastTxAsync_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *Client_BroadcastTxAsync_Call { + _c.Call.Return(run) + return _c +} + // BroadcastTxCommit provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) @@ -380,6 +713,35 @@ func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretyp return r0, r1 } +// Client_BroadcastTxCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxCommit' +type Client_BroadcastTxCommit_Call struct { + *mock.Call +} + +// BroadcastTxCommit is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *Client_Expecter) BroadcastTxCommit(_a0 interface{}, _a1 interface{}) *Client_BroadcastTxCommit_Call { + return &Client_BroadcastTxCommit_Call{Call: _e.mock.On("BroadcastTxCommit", _a0, _a1)} +} + +func (_c *Client_BroadcastTxCommit_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_BroadcastTxCommit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *Client_BroadcastTxCommit_Call) Return(_a0 *coretypes.ResultBroadcastTxCommit, _a1 error) *Client_BroadcastTxCommit_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BroadcastTxCommit_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)) *Client_BroadcastTxCommit_Call { + _c.Call.Return(run) + return _c +} + // BroadcastTxSync provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -410,6 +772,35 @@ func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes return r0, r1 } +// Client_BroadcastTxSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxSync' +type Client_BroadcastTxSync_Call struct { + *mock.Call +} + +// BroadcastTxSync is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *Client_Expecter) BroadcastTxSync(_a0 interface{}, _a1 interface{}) *Client_BroadcastTxSync_Call { + return &Client_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", _a0, _a1)} +} + +func (_c *Client_BroadcastTxSync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_BroadcastTxSync_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *Client_BroadcastTxSync_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *Client_BroadcastTxSync_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BroadcastTxSync_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *Client_BroadcastTxSync_Call { + _c.Call.Return(run) + return _c +} + // CheckTx provides a mock function with given fields: _a0, _a1 func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) @@ -440,6 +831,35 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultC return r0, r1 } +// Client_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' +type Client_CheckTx_Call struct { + *mock.Call +} + +// CheckTx is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *Client_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *Client_CheckTx_Call { + return &Client_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} +} + +func (_c *Client_CheckTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_CheckTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *Client_CheckTx_Call) Return(_a0 *coretypes.ResultCheckTx, _a1 error) *Client_CheckTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CheckTx_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)) *Client_CheckTx_Call { + _c.Call.Return(run) + return _c +} + // Commit provides a mock function with given fields: ctx, height func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) @@ -470,6 +890,35 @@ func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultC return r0, r1 } +// Client_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit' +type Client_Commit_Call struct { + *mock.Call +} + +// Commit is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *Client_Expecter) Commit(ctx interface{}, height interface{}) *Client_Commit_Call { + return &Client_Commit_Call{Call: _e.mock.On("Commit", ctx, height)} +} + +func (_c *Client_Commit_Call) Run(run func(ctx context.Context, height *int64)) *Client_Commit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *Client_Commit_Call) Return(_a0 *coretypes.ResultCommit, _a1 error) *Client_Commit_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Commit_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultCommit, error)) *Client_Commit_Call { + _c.Call.Return(run) + return _c +} + // ConsensusParams provides a mock function with given fields: ctx, height func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) @@ -500,6 +949,35 @@ func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretype return r0, r1 } +// Client_ConsensusParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConsensusParams' +type Client_ConsensusParams_Call struct { + *mock.Call +} + +// ConsensusParams is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *Client_Expecter) ConsensusParams(ctx interface{}, height interface{}) *Client_ConsensusParams_Call { + return &Client_ConsensusParams_Call{Call: _e.mock.On("ConsensusParams", ctx, height)} +} + +func (_c *Client_ConsensusParams_Call) Run(run func(ctx context.Context, height *int64)) *Client_ConsensusParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *Client_ConsensusParams_Call) Return(_a0 *coretypes.ResultConsensusParams, _a1 error) *Client_ConsensusParams_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ConsensusParams_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)) *Client_ConsensusParams_Call { + _c.Call.Return(run) + return _c +} + // ConsensusState provides a mock function with given fields: _a0 func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) @@ -530,6 +1008,34 @@ func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensu return r0, r1 } +// Client_ConsensusState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConsensusState' +type Client_ConsensusState_Call struct { + *mock.Call +} + +// ConsensusState is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) ConsensusState(_a0 interface{}) *Client_ConsensusState_Call { + return &Client_ConsensusState_Call{Call: _e.mock.On("ConsensusState", _a0)} +} + +func (_c *Client_ConsensusState_Call) Run(run func(_a0 context.Context)) *Client_ConsensusState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_ConsensusState_Call) Return(_a0 *coretypes.ResultConsensusState, _a1 error) *Client_ConsensusState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ConsensusState_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultConsensusState, error)) *Client_ConsensusState_Call { + _c.Call.Return(run) + return _c +} + // DumpConsensusState provides a mock function with given fields: _a0 func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) @@ -560,6 +1066,34 @@ func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDump return r0, r1 } +// Client_DumpConsensusState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DumpConsensusState' +type Client_DumpConsensusState_Call struct { + *mock.Call +} + +// DumpConsensusState is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) DumpConsensusState(_a0 interface{}) *Client_DumpConsensusState_Call { + return &Client_DumpConsensusState_Call{Call: _e.mock.On("DumpConsensusState", _a0)} +} + +func (_c *Client_DumpConsensusState_Call) Run(run func(_a0 context.Context)) *Client_DumpConsensusState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_DumpConsensusState_Call) Return(_a0 *coretypes.ResultDumpConsensusState, _a1 error) *Client_DumpConsensusState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_DumpConsensusState_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultDumpConsensusState, error)) *Client_DumpConsensusState_Call { + _c.Call.Return(run) + return _c +} + // Events provides a mock function with given fields: ctx, req func (_m *Client) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) @@ -590,6 +1124,35 @@ func (_m *Client) Events(ctx context.Context, req *coretypes.RequestEvents) (*co return r0, r1 } +// Client_Events_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Events' +type Client_Events_Call struct { + *mock.Call +} + +// Events is a helper method to define mock.On call +// - ctx context.Context +// - req *coretypes.RequestEvents +func (_e *Client_Expecter) Events(ctx interface{}, req interface{}) *Client_Events_Call { + return &Client_Events_Call{Call: _e.mock.On("Events", ctx, req)} +} + +func (_c *Client_Events_Call) Run(run func(ctx context.Context, req *coretypes.RequestEvents)) *Client_Events_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*coretypes.RequestEvents)) + }) + return _c +} + +func (_c *Client_Events_Call) Return(_a0 *coretypes.ResultEvents, _a1 error) *Client_Events_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Events_Call) RunAndReturn(run func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)) *Client_Events_Call { + _c.Call.Return(run) + return _c +} + // Genesis provides a mock function with given fields: _a0 func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) @@ -620,6 +1183,34 @@ func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) return r0, r1 } +// Client_Genesis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Genesis' +type Client_Genesis_Call struct { + *mock.Call +} + +// Genesis is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) Genesis(_a0 interface{}) *Client_Genesis_Call { + return &Client_Genesis_Call{Call: _e.mock.On("Genesis", _a0)} +} + +func (_c *Client_Genesis_Call) Run(run func(_a0 context.Context)) *Client_Genesis_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_Genesis_Call) Return(_a0 *coretypes.ResultGenesis, _a1 error) *Client_Genesis_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Genesis_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultGenesis, error)) *Client_Genesis_Call { + _c.Call.Return(run) + return _c +} + // GenesisChunked provides a mock function with given fields: _a0, _a1 func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) @@ -650,6 +1241,35 @@ func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.Resu return r0, r1 } +// Client_GenesisChunked_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenesisChunked' +type Client_GenesisChunked_Call struct { + *mock.Call +} + +// GenesisChunked is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 uint +func (_e *Client_Expecter) GenesisChunked(_a0 interface{}, _a1 interface{}) *Client_GenesisChunked_Call { + return &Client_GenesisChunked_Call{Call: _e.mock.On("GenesisChunked", _a0, _a1)} +} + +func (_c *Client_GenesisChunked_Call) Run(run func(_a0 context.Context, _a1 uint)) *Client_GenesisChunked_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint)) + }) + return _c +} + +func (_c *Client_GenesisChunked_Call) Return(_a0 *coretypes.ResultGenesisChunk, _a1 error) *Client_GenesisChunked_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_GenesisChunked_Call) RunAndReturn(run func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)) *Client_GenesisChunked_Call { + _c.Call.Return(run) + return _c +} + // Header provides a mock function with given fields: ctx, height func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) @@ -680,6 +1300,35 @@ func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultH return r0, r1 } +// Client_Header_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Header' +type Client_Header_Call struct { + *mock.Call +} + +// Header is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *Client_Expecter) Header(ctx interface{}, height interface{}) *Client_Header_Call { + return &Client_Header_Call{Call: _e.mock.On("Header", ctx, height)} +} + +func (_c *Client_Header_Call) Run(run func(ctx context.Context, height *int64)) *Client_Header_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *Client_Header_Call) Return(_a0 *coretypes.ResultHeader, _a1 error) *Client_Header_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Header_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultHeader, error)) *Client_Header_Call { + _c.Call.Return(run) + return _c +} + // HeaderByHash provides a mock function with given fields: ctx, hash func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) @@ -710,6 +1359,35 @@ func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coret return r0, r1 } +// Client_HeaderByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByHash' +type Client_HeaderByHash_Call struct { + *mock.Call +} + +// HeaderByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash bytes.HexBytes +func (_e *Client_Expecter) HeaderByHash(ctx interface{}, hash interface{}) *Client_HeaderByHash_Call { + return &Client_HeaderByHash_Call{Call: _e.mock.On("HeaderByHash", ctx, hash)} +} + +func (_c *Client_HeaderByHash_Call) Run(run func(ctx context.Context, hash bytes.HexBytes)) *Client_HeaderByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *Client_HeaderByHash_Call) Return(_a0 *coretypes.ResultHeader, _a1 error) *Client_HeaderByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_HeaderByHash_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)) *Client_HeaderByHash_Call { + _c.Call.Return(run) + return _c +} + // Health provides a mock function with given fields: _a0 func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) @@ -740,6 +1418,34 @@ func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { return r0, r1 } +// Client_Health_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Health' +type Client_Health_Call struct { + *mock.Call +} + +// Health is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) Health(_a0 interface{}) *Client_Health_Call { + return &Client_Health_Call{Call: _e.mock.On("Health", _a0)} +} + +func (_c *Client_Health_Call) Run(run func(_a0 context.Context)) *Client_Health_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_Health_Call) Return(_a0 *coretypes.ResultHealth, _a1 error) *Client_Health_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Health_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultHealth, error)) *Client_Health_Call { + _c.Call.Return(run) + return _c +} + // NetInfo provides a mock function with given fields: _a0 func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) @@ -770,6 +1476,34 @@ func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) return r0, r1 } +// Client_NetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NetInfo' +type Client_NetInfo_Call struct { + *mock.Call +} + +// NetInfo is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) NetInfo(_a0 interface{}) *Client_NetInfo_Call { + return &Client_NetInfo_Call{Call: _e.mock.On("NetInfo", _a0)} +} + +func (_c *Client_NetInfo_Call) Run(run func(_a0 context.Context)) *Client_NetInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_NetInfo_Call) Return(_a0 *coretypes.ResultNetInfo, _a1 error) *Client_NetInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_NetInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultNetInfo, error)) *Client_NetInfo_Call { + _c.Call.Return(run) + return _c +} + // NumUnconfirmedTxs provides a mock function with given fields: _a0 func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) @@ -800,6 +1534,34 @@ func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUncon return r0, r1 } +// Client_NumUnconfirmedTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NumUnconfirmedTxs' +type Client_NumUnconfirmedTxs_Call struct { + *mock.Call +} + +// NumUnconfirmedTxs is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) NumUnconfirmedTxs(_a0 interface{}) *Client_NumUnconfirmedTxs_Call { + return &Client_NumUnconfirmedTxs_Call{Call: _e.mock.On("NumUnconfirmedTxs", _a0)} +} + +func (_c *Client_NumUnconfirmedTxs_Call) Run(run func(_a0 context.Context)) *Client_NumUnconfirmedTxs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_NumUnconfirmedTxs_Call) Return(_a0 *coretypes.ResultUnconfirmedTxs, _a1 error) *Client_NumUnconfirmedTxs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_NumUnconfirmedTxs_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)) *Client_NumUnconfirmedTxs_Call { + _c.Call.Return(run) + return _c +} + // RemoveTx provides a mock function with given fields: _a0, _a1 func (_m *Client) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) @@ -818,6 +1580,35 @@ func (_m *Client) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { return r0 } +// Client_RemoveTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveTx' +type Client_RemoveTx_Call struct { + *mock.Call +} + +// RemoveTx is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.TxKey +func (_e *Client_Expecter) RemoveTx(_a0 interface{}, _a1 interface{}) *Client_RemoveTx_Call { + return &Client_RemoveTx_Call{Call: _e.mock.On("RemoveTx", _a0, _a1)} +} + +func (_c *Client_RemoveTx_Call) Run(run func(_a0 context.Context, _a1 types.TxKey)) *Client_RemoveTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.TxKey)) + }) + return _c +} + +func (_c *Client_RemoveTx_Call) Return(_a0 error) *Client_RemoveTx_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_RemoveTx_Call) RunAndReturn(run func(context.Context, types.TxKey) error) *Client_RemoveTx_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Client) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -836,6 +1627,34 @@ func (_m *Client) Start(_a0 context.Context) error { return r0 } +// Client_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Client_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) Start(_a0 interface{}) *Client_Start_Call { + return &Client_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *Client_Start_Call) Run(run func(_a0 context.Context)) *Client_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_Start_Call) Return(_a0 error) *Client_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Start_Call) RunAndReturn(run func(context.Context) error) *Client_Start_Call { + _c.Call.Return(run) + return _c +} + // Status provides a mock function with given fields: _a0 func (_m *Client) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) @@ -866,6 +1685,34 @@ func (_m *Client) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { return r0, r1 } +// Client_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' +type Client_Status_Call struct { + *mock.Call +} + +// Status is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Client_Expecter) Status(_a0 interface{}) *Client_Status_Call { + return &Client_Status_Call{Call: _e.mock.On("Status", _a0)} +} + +func (_c *Client_Status_Call) Run(run func(_a0 context.Context)) *Client_Status_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_Status_Call) Return(_a0 *coretypes.ResultStatus, _a1 error) *Client_Status_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Status_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultStatus, error)) *Client_Status_Call { + _c.Call.Return(run) + return _c +} + // Subscribe provides a mock function with given fields: ctx, subscriber, query, outCapacity func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) { _va := make([]interface{}, len(outCapacity)) @@ -903,6 +1750,44 @@ func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string return r0, r1 } +// Client_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe' +type Client_Subscribe_Call struct { + *mock.Call +} + +// Subscribe is a helper method to define mock.On call +// - ctx context.Context +// - subscriber string +// - query string +// - outCapacity ...int +func (_e *Client_Expecter) Subscribe(ctx interface{}, subscriber interface{}, query interface{}, outCapacity ...interface{}) *Client_Subscribe_Call { + return &Client_Subscribe_Call{Call: _e.mock.On("Subscribe", + append([]interface{}{ctx, subscriber, query}, outCapacity...)...)} +} + +func (_c *Client_Subscribe_Call) Run(run func(ctx context.Context, subscriber string, query string, outCapacity ...int)) *Client_Subscribe_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]int, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(int) + } + } + run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...) + }) + return _c +} + +func (_c *Client_Subscribe_Call) Return(out <-chan coretypes.ResultEvent, err error) *Client_Subscribe_Call { + _c.Call.Return(out, err) + return _c +} + +func (_c *Client_Subscribe_Call) RunAndReturn(run func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)) *Client_Subscribe_Call { + _c.Call.Return(run) + return _c +} + // Tx provides a mock function with given fields: ctx, hash, prove func (_m *Client) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) @@ -933,6 +1818,36 @@ func (_m *Client) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*cor return r0, r1 } +// Client_Tx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tx' +type Client_Tx_Call struct { + *mock.Call +} + +// Tx is a helper method to define mock.On call +// - ctx context.Context +// - hash bytes.HexBytes +// - prove bool +func (_e *Client_Expecter) Tx(ctx interface{}, hash interface{}, prove interface{}) *Client_Tx_Call { + return &Client_Tx_Call{Call: _e.mock.On("Tx", ctx, hash, prove)} +} + +func (_c *Client_Tx_Call) Run(run func(ctx context.Context, hash bytes.HexBytes, prove bool)) *Client_Tx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes), args[2].(bool)) + }) + return _c +} + +func (_c *Client_Tx_Call) Return(_a0 *coretypes.ResultTx, _a1 error) *Client_Tx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Tx_Call) RunAndReturn(run func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)) *Client_Tx_Call { + _c.Call.Return(run) + return _c +} + // TxSearch provides a mock function with given fields: ctx, query, prove, page, perPage, orderBy func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) @@ -963,6 +1878,39 @@ func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page * return r0, r1 } +// Client_TxSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxSearch' +type Client_TxSearch_Call struct { + *mock.Call +} + +// TxSearch is a helper method to define mock.On call +// - ctx context.Context +// - query string +// - prove bool +// - page *int +// - perPage *int +// - orderBy string +func (_e *Client_Expecter) TxSearch(ctx interface{}, query interface{}, prove interface{}, page interface{}, perPage interface{}, orderBy interface{}) *Client_TxSearch_Call { + return &Client_TxSearch_Call{Call: _e.mock.On("TxSearch", ctx, query, prove, page, perPage, orderBy)} +} + +func (_c *Client_TxSearch_Call) Run(run func(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string)) *Client_TxSearch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(bool), args[3].(*int), args[4].(*int), args[5].(string)) + }) + return _c +} + +func (_c *Client_TxSearch_Call) Return(_a0 *coretypes.ResultTxSearch, _a1 error) *Client_TxSearch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_TxSearch_Call) RunAndReturn(run func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)) *Client_TxSearch_Call { + _c.Call.Return(run) + return _c +} + // UnconfirmedTxs provides a mock function with given fields: ctx, page, perPage func (_m *Client) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) @@ -993,6 +1941,36 @@ func (_m *Client) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) ( return r0, r1 } +// Client_UnconfirmedTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnconfirmedTxs' +type Client_UnconfirmedTxs_Call struct { + *mock.Call +} + +// UnconfirmedTxs is a helper method to define mock.On call +// - ctx context.Context +// - page *int +// - perPage *int +func (_e *Client_Expecter) UnconfirmedTxs(ctx interface{}, page interface{}, perPage interface{}) *Client_UnconfirmedTxs_Call { + return &Client_UnconfirmedTxs_Call{Call: _e.mock.On("UnconfirmedTxs", ctx, page, perPage)} +} + +func (_c *Client_UnconfirmedTxs_Call) Run(run func(ctx context.Context, page *int, perPage *int)) *Client_UnconfirmedTxs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int), args[2].(*int)) + }) + return _c +} + +func (_c *Client_UnconfirmedTxs_Call) Return(_a0 *coretypes.ResultUnconfirmedTxs, _a1 error) *Client_UnconfirmedTxs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_UnconfirmedTxs_Call) RunAndReturn(run func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)) *Client_UnconfirmedTxs_Call { + _c.Call.Return(run) + return _c +} + // Unsubscribe provides a mock function with given fields: ctx, subscriber, query func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) @@ -1011,6 +1989,36 @@ func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query stri return r0 } +// Client_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' +type Client_Unsubscribe_Call struct { + *mock.Call +} + +// Unsubscribe is a helper method to define mock.On call +// - ctx context.Context +// - subscriber string +// - query string +func (_e *Client_Expecter) Unsubscribe(ctx interface{}, subscriber interface{}, query interface{}) *Client_Unsubscribe_Call { + return &Client_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", ctx, subscriber, query)} +} + +func (_c *Client_Unsubscribe_Call) Run(run func(ctx context.Context, subscriber string, query string)) *Client_Unsubscribe_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *Client_Unsubscribe_Call) Return(_a0 error) *Client_Unsubscribe_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Unsubscribe_Call) RunAndReturn(run func(context.Context, string, string) error) *Client_Unsubscribe_Call { + _c.Call.Return(run) + return _c +} + // UnsubscribeAll provides a mock function with given fields: ctx, subscriber func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) @@ -1029,6 +2037,35 @@ func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { return r0 } +// Client_UnsubscribeAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubscribeAll' +type Client_UnsubscribeAll_Call struct { + *mock.Call +} + +// UnsubscribeAll is a helper method to define mock.On call +// - ctx context.Context +// - subscriber string +func (_e *Client_Expecter) UnsubscribeAll(ctx interface{}, subscriber interface{}) *Client_UnsubscribeAll_Call { + return &Client_UnsubscribeAll_Call{Call: _e.mock.On("UnsubscribeAll", ctx, subscriber)} +} + +func (_c *Client_UnsubscribeAll_Call) Run(run func(ctx context.Context, subscriber string)) *Client_UnsubscribeAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Client_UnsubscribeAll_Call) Return(_a0 error) *Client_UnsubscribeAll_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_UnsubscribeAll_Call) RunAndReturn(run func(context.Context, string) error) *Client_UnsubscribeAll_Call { + _c.Call.Return(run) + return _c +} + // Validators provides a mock function with given fields: ctx, height, page, perPage, requestQuorumInfo func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) @@ -1059,6 +2096,38 @@ func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perP return r0, r1 } +// Client_Validators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validators' +type Client_Validators_Call struct { + *mock.Call +} + +// Validators is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +// - page *int +// - perPage *int +// - requestQuorumInfo *bool +func (_e *Client_Expecter) Validators(ctx interface{}, height interface{}, page interface{}, perPage interface{}, requestQuorumInfo interface{}) *Client_Validators_Call { + return &Client_Validators_Call{Call: _e.mock.On("Validators", ctx, height, page, perPage, requestQuorumInfo)} +} + +func (_c *Client_Validators_Call) Run(run func(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool)) *Client_Validators_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64), args[2].(*int), args[3].(*int), args[4].(*bool)) + }) + return _c +} + +func (_c *Client_Validators_Call) Return(_a0 *coretypes.ResultValidators, _a1 error) *Client_Validators_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_Validators_Call) RunAndReturn(run func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)) *Client_Validators_Call { + _c.Call.Return(run) + return _c +} + // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClient(t interface { diff --git a/rpc/client/mocks/events_client.go b/rpc/client/mocks/events_client.go deleted file mode 100644 index 469ce79ada..0000000000 --- a/rpc/client/mocks/events_client.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - mock "github.com/stretchr/testify/mock" -) - -// EventsClient is an autogenerated mock type for the EventsClient type -type EventsClient struct { - mock.Mock -} - -// Events provides a mock function with given fields: ctx, req -func (_m *EventsClient) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { - ret := _m.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for Events") - } - - var r0 *coretypes.ResultEvents - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { - return rf(ctx, req) - } - if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) *coretypes.ResultEvents); ok { - r0 = rf(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultEvents) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *coretypes.RequestEvents) error); ok { - r1 = rf(ctx, req) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewEventsClient creates a new instance of EventsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEventsClient(t interface { - mock.TestingT - Cleanup(func()) -}) *EventsClient { - mock := &EventsClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/evidence_client.go b/rpc/client/mocks/evidence_client.go deleted file mode 100644 index fbd8316844..0000000000 --- a/rpc/client/mocks/evidence_client.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/types" -) - -// EvidenceClient is an autogenerated mock type for the EvidenceClient type -type EvidenceClient struct { - mock.Mock -} - -// BroadcastEvidence provides a mock function with given fields: _a0, _a1 -func (_m *EvidenceClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastEvidence") - } - - var r0 *coretypes.ResultBroadcastEvidence - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) *coretypes.ResultBroadcastEvidence); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastEvidence) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Evidence) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewEvidenceClient creates a new instance of EvidenceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEvidenceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *EvidenceClient { - mock := &EvidenceClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/history_client.go b/rpc/client/mocks/history_client.go deleted file mode 100644 index f4ae961c72..0000000000 --- a/rpc/client/mocks/history_client.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - mock "github.com/stretchr/testify/mock" -) - -// HistoryClient is an autogenerated mock type for the HistoryClient type -type HistoryClient struct { - mock.Mock -} - -// BlockchainInfo provides a mock function with given fields: ctx, minHeight, maxHeight -func (_m *HistoryClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { - ret := _m.Called(ctx, minHeight, maxHeight) - - if len(ret) == 0 { - panic("no return value specified for BlockchainInfo") - } - - var r0 *coretypes.ResultBlockchainInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { - return rf(ctx, minHeight, maxHeight) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, int64) *coretypes.ResultBlockchainInfo); ok { - r0 = rf(ctx, minHeight, maxHeight) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlockchainInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok { - r1 = rf(ctx, minHeight, maxHeight) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Genesis provides a mock function with given fields: _a0 -func (_m *HistoryClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Genesis") - } - - var r0 *coretypes.ResultGenesis - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultGenesis); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultGenesis) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GenesisChunked provides a mock function with given fields: _a0, _a1 -func (_m *HistoryClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GenesisChunked") - } - - var r0 *coretypes.ResultGenesisChunk - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, uint) *coretypes.ResultGenesisChunk); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultGenesisChunk) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewHistoryClient creates a new instance of HistoryClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewHistoryClient(t interface { - mock.TestingT - Cleanup(func()) -}) *HistoryClient { - mock := &HistoryClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/mempool_client.go b/rpc/client/mocks/mempool_client.go deleted file mode 100644 index f294b23de2..0000000000 --- a/rpc/client/mocks/mempool_client.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/types" -) - -// MempoolClient is an autogenerated mock type for the MempoolClient type -type MempoolClient struct { - mock.Mock -} - -// CheckTx provides a mock function with given fields: _a0, _a1 -func (_m *MempoolClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for CheckTx") - } - - var r0 *coretypes.ResultCheckTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultCheckTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultCheckTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NumUnconfirmedTxs provides a mock function with given fields: _a0 -func (_m *MempoolClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for NumUnconfirmedTxs") - } - - var r0 *coretypes.ResultUnconfirmedTxs - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultUnconfirmedTxs); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RemoveTx provides a mock function with given fields: _a0, _a1 -func (_m *MempoolClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for RemoveTx") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// UnconfirmedTxs provides a mock function with given fields: ctx, page, perPage -func (_m *MempoolClient) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { - ret := _m.Called(ctx, page, perPage) - - if len(ret) == 0 { - panic("no return value specified for UnconfirmedTxs") - } - - var r0 *coretypes.ResultUnconfirmedTxs - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { - return rf(ctx, page, perPage) - } - if rf, ok := ret.Get(0).(func(context.Context, *int, *int) *coretypes.ResultUnconfirmedTxs); ok { - r0 = rf(ctx, page, perPage) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int, *int) error); ok { - r1 = rf(ctx, page, perPage) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewMempoolClient creates a new instance of MempoolClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMempoolClient(t interface { - mock.TestingT - Cleanup(func()) -}) *MempoolClient { - mock := &MempoolClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/network_client.go b/rpc/client/mocks/network_client.go deleted file mode 100644 index f9ae2ea916..0000000000 --- a/rpc/client/mocks/network_client.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - mock "github.com/stretchr/testify/mock" -) - -// NetworkClient is an autogenerated mock type for the NetworkClient type -type NetworkClient struct { - mock.Mock -} - -// ConsensusParams provides a mock function with given fields: ctx, height -func (_m *NetworkClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for ConsensusParams") - } - - var r0 *coretypes.ResultConsensusParams - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultConsensusParams); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultConsensusParams) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ConsensusState provides a mock function with given fields: _a0 -func (_m *NetworkClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ConsensusState") - } - - var r0 *coretypes.ResultConsensusState - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultConsensusState); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultConsensusState) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DumpConsensusState provides a mock function with given fields: _a0 -func (_m *NetworkClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for DumpConsensusState") - } - - var r0 *coretypes.ResultDumpConsensusState - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultDumpConsensusState); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultDumpConsensusState) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Health provides a mock function with given fields: _a0 -func (_m *NetworkClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Health") - } - - var r0 *coretypes.ResultHealth - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultHealth); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultHealth) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NetInfo provides a mock function with given fields: _a0 -func (_m *NetworkClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for NetInfo") - } - - var r0 *coretypes.ResultNetInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultNetInfo); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultNetInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewNetworkClient creates a new instance of NetworkClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewNetworkClient(t interface { - mock.TestingT - Cleanup(func()) -}) *NetworkClient { - mock := &NetworkClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/remote_client.go b/rpc/client/mocks/remote_client.go deleted file mode 100644 index 1708786162..0000000000 --- a/rpc/client/mocks/remote_client.go +++ /dev/null @@ -1,1092 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - bytes "github.com/dashpay/tenderdash/libs/bytes" - client "github.com/dashpay/tenderdash/rpc/client" - - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - - mock "github.com/stretchr/testify/mock" - - types "github.com/dashpay/tenderdash/types" -) - -// RemoteClient is an autogenerated mock type for the RemoteClient type -type RemoteClient struct { - mock.Mock -} - -// ABCIInfo provides a mock function with given fields: _a0 -func (_m *RemoteClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ABCIInfo") - } - - var r0 *coretypes.ResultABCIInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultABCIInfo); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultABCIInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ABCIQuery provides a mock function with given fields: ctx, path, data -func (_m *RemoteClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { - ret := _m.Called(ctx, path, data) - - if len(ret) == 0 { - panic("no return value specified for ABCIQuery") - } - - var r0 *coretypes.ResultABCIQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { - return rf(ctx, path, data) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) *coretypes.ResultABCIQuery); ok { - r0 = rf(ctx, path, data) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultABCIQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bytes.HexBytes) error); ok { - r1 = rf(ctx, path, data) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ABCIQueryWithOptions provides a mock function with given fields: ctx, path, data, opts -func (_m *RemoteClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { - ret := _m.Called(ctx, path, data, opts) - - if len(ret) == 0 { - panic("no return value specified for ABCIQueryWithOptions") - } - - var r0 *coretypes.ResultABCIQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { - return rf(ctx, path, data, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) *coretypes.ResultABCIQuery); ok { - r0 = rf(ctx, path, data, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultABCIQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) error); ok { - r1 = rf(ctx, path, data, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Block provides a mock function with given fields: ctx, height -func (_m *RemoteClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for Block") - } - - var r0 *coretypes.ResultBlock - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultBlock); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlock) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockByHash provides a mock function with given fields: ctx, hash -func (_m *RemoteClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { - ret := _m.Called(ctx, hash) - - if len(ret) == 0 { - panic("no return value specified for BlockByHash") - } - - var r0 *coretypes.ResultBlock - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { - return rf(ctx, hash) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *coretypes.ResultBlock); ok { - r0 = rf(ctx, hash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlock) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { - r1 = rf(ctx, hash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockResults provides a mock function with given fields: ctx, height -func (_m *RemoteClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for BlockResults") - } - - var r0 *coretypes.ResultBlockResults - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultBlockResults); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlockResults) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockSearch provides a mock function with given fields: ctx, query, page, perPage, orderBy -func (_m *RemoteClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { - ret := _m.Called(ctx, query, page, perPage, orderBy) - - if len(ret) == 0 { - panic("no return value specified for BlockSearch") - } - - var r0 *coretypes.ResultBlockSearch - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { - return rf(ctx, query, page, perPage, orderBy) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) *coretypes.ResultBlockSearch); ok { - r0 = rf(ctx, query, page, perPage, orderBy) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlockSearch) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *int, *int, string) error); ok { - r1 = rf(ctx, query, page, perPage, orderBy) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockchainInfo provides a mock function with given fields: ctx, minHeight, maxHeight -func (_m *RemoteClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { - ret := _m.Called(ctx, minHeight, maxHeight) - - if len(ret) == 0 { - panic("no return value specified for BlockchainInfo") - } - - var r0 *coretypes.ResultBlockchainInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { - return rf(ctx, minHeight, maxHeight) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, int64) *coretypes.ResultBlockchainInfo); ok { - r0 = rf(ctx, minHeight, maxHeight) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlockchainInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok { - r1 = rf(ctx, minHeight, maxHeight) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastEvidence provides a mock function with given fields: _a0, _a1 -func (_m *RemoteClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastEvidence") - } - - var r0 *coretypes.ResultBroadcastEvidence - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) *coretypes.ResultBroadcastEvidence); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastEvidence) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Evidence) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastTx provides a mock function with given fields: _a0, _a1 -func (_m *RemoteClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastTx") - } - - var r0 *coretypes.ResultBroadcastTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastTxAsync provides a mock function with given fields: _a0, _a1 -func (_m *RemoteClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastTxAsync") - } - - var r0 *coretypes.ResultBroadcastTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastTxCommit provides a mock function with given fields: _a0, _a1 -func (_m *RemoteClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastTxCommit") - } - - var r0 *coretypes.ResultBroadcastTxCommit - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTxCommit); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastTxCommit) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BroadcastTxSync provides a mock function with given fields: _a0, _a1 -func (_m *RemoteClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for BroadcastTxSync") - } - - var r0 *coretypes.ResultBroadcastTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CheckTx provides a mock function with given fields: _a0, _a1 -func (_m *RemoteClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for CheckTx") - } - - var r0 *coretypes.ResultCheckTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultCheckTx); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultCheckTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Commit provides a mock function with given fields: ctx, height -func (_m *RemoteClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for Commit") - } - - var r0 *coretypes.ResultCommit - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultCommit); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultCommit) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ConsensusParams provides a mock function with given fields: ctx, height -func (_m *RemoteClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for ConsensusParams") - } - - var r0 *coretypes.ResultConsensusParams - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultConsensusParams); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultConsensusParams) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ConsensusState provides a mock function with given fields: _a0 -func (_m *RemoteClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ConsensusState") - } - - var r0 *coretypes.ResultConsensusState - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultConsensusState); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultConsensusState) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DumpConsensusState provides a mock function with given fields: _a0 -func (_m *RemoteClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for DumpConsensusState") - } - - var r0 *coretypes.ResultDumpConsensusState - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultDumpConsensusState); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultDumpConsensusState) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Events provides a mock function with given fields: ctx, req -func (_m *RemoteClient) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { - ret := _m.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for Events") - } - - var r0 *coretypes.ResultEvents - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { - return rf(ctx, req) - } - if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) *coretypes.ResultEvents); ok { - r0 = rf(ctx, req) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultEvents) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *coretypes.RequestEvents) error); ok { - r1 = rf(ctx, req) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Genesis provides a mock function with given fields: _a0 -func (_m *RemoteClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Genesis") - } - - var r0 *coretypes.ResultGenesis - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultGenesis); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultGenesis) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GenesisChunked provides a mock function with given fields: _a0, _a1 -func (_m *RemoteClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GenesisChunked") - } - - var r0 *coretypes.ResultGenesisChunk - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, uint) *coretypes.ResultGenesisChunk); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultGenesisChunk) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Header provides a mock function with given fields: ctx, height -func (_m *RemoteClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for Header") - } - - var r0 *coretypes.ResultHeader - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultHeader); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultHeader) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// HeaderByHash provides a mock function with given fields: ctx, hash -func (_m *RemoteClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { - ret := _m.Called(ctx, hash) - - if len(ret) == 0 { - panic("no return value specified for HeaderByHash") - } - - var r0 *coretypes.ResultHeader - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { - return rf(ctx, hash) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *coretypes.ResultHeader); ok { - r0 = rf(ctx, hash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultHeader) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { - r1 = rf(ctx, hash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Health provides a mock function with given fields: _a0 -func (_m *RemoteClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Health") - } - - var r0 *coretypes.ResultHealth - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultHealth); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultHealth) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NetInfo provides a mock function with given fields: _a0 -func (_m *RemoteClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for NetInfo") - } - - var r0 *coretypes.ResultNetInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultNetInfo); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultNetInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NumUnconfirmedTxs provides a mock function with given fields: _a0 -func (_m *RemoteClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for NumUnconfirmedTxs") - } - - var r0 *coretypes.ResultUnconfirmedTxs - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultUnconfirmedTxs); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Remote provides a mock function with given fields: -func (_m *RemoteClient) Remote() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Remote") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// RemoveTx provides a mock function with given fields: _a0, _a1 -func (_m *RemoteClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for RemoveTx") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Start provides a mock function with given fields: _a0 -func (_m *RemoteClient) Start(_a0 context.Context) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Start") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Status provides a mock function with given fields: _a0 -func (_m *RemoteClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Status") - } - - var r0 *coretypes.ResultStatus - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultStatus); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultStatus) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Subscribe provides a mock function with given fields: ctx, subscriber, query, outCapacity -func (_m *RemoteClient) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) { - _va := make([]interface{}, len(outCapacity)) - for _i := range outCapacity { - _va[_i] = outCapacity[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, subscriber, query) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Subscribe") - } - - var r0 <-chan coretypes.ResultEvent - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { - return rf(ctx, subscriber, query, outCapacity...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) <-chan coretypes.ResultEvent); ok { - r0 = rf(ctx, subscriber, query, outCapacity...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan coretypes.ResultEvent) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, ...int) error); ok { - r1 = rf(ctx, subscriber, query, outCapacity...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Tx provides a mock function with given fields: ctx, hash, prove -func (_m *RemoteClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { - ret := _m.Called(ctx, hash, prove) - - if len(ret) == 0 { - panic("no return value specified for Tx") - } - - var r0 *coretypes.ResultTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { - return rf(ctx, hash, prove) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) *coretypes.ResultTx); ok { - r0 = rf(ctx, hash, prove) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes, bool) error); ok { - r1 = rf(ctx, hash, prove) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TxSearch provides a mock function with given fields: ctx, query, prove, page, perPage, orderBy -func (_m *RemoteClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { - ret := _m.Called(ctx, query, prove, page, perPage, orderBy) - - if len(ret) == 0 { - panic("no return value specified for TxSearch") - } - - var r0 *coretypes.ResultTxSearch - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { - return rf(ctx, query, prove, page, perPage, orderBy) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) *coretypes.ResultTxSearch); ok { - r0 = rf(ctx, query, prove, page, perPage, orderBy) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultTxSearch) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bool, *int, *int, string) error); ok { - r1 = rf(ctx, query, prove, page, perPage, orderBy) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// UnconfirmedTxs provides a mock function with given fields: ctx, page, perPage -func (_m *RemoteClient) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { - ret := _m.Called(ctx, page, perPage) - - if len(ret) == 0 { - panic("no return value specified for UnconfirmedTxs") - } - - var r0 *coretypes.ResultUnconfirmedTxs - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { - return rf(ctx, page, perPage) - } - if rf, ok := ret.Get(0).(func(context.Context, *int, *int) *coretypes.ResultUnconfirmedTxs); ok { - r0 = rf(ctx, page, perPage) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int, *int) error); ok { - r1 = rf(ctx, page, perPage) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Unsubscribe provides a mock function with given fields: ctx, subscriber, query -func (_m *RemoteClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { - ret := _m.Called(ctx, subscriber, query) - - if len(ret) == 0 { - panic("no return value specified for Unsubscribe") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, subscriber, query) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// UnsubscribeAll provides a mock function with given fields: ctx, subscriber -func (_m *RemoteClient) UnsubscribeAll(ctx context.Context, subscriber string) error { - ret := _m.Called(ctx, subscriber) - - if len(ret) == 0 { - panic("no return value specified for UnsubscribeAll") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, subscriber) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Validators provides a mock function with given fields: ctx, height, page, perPage, requestQuorumInfo -func (_m *RemoteClient) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { - ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) - - if len(ret) == 0 { - panic("no return value specified for Validators") - } - - var r0 *coretypes.ResultValidators - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { - return rf(ctx, height, page, perPage, requestQuorumInfo) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) *coretypes.ResultValidators); ok { - r0 = rf(ctx, height, page, perPage, requestQuorumInfo) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultValidators) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64, *int, *int, *bool) error); ok { - r1 = rf(ctx, height, page, perPage, requestQuorumInfo) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewRemoteClient creates a new instance of RemoteClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewRemoteClient(t interface { - mock.TestingT - Cleanup(func()) -}) *RemoteClient { - mock := &RemoteClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/remoteclient.go b/rpc/client/mocks/remoteclient.go new file mode 100644 index 0000000000..1fed245b7e --- /dev/null +++ b/rpc/client/mocks/remoteclient.go @@ -0,0 +1,2188 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + bytes "github.com/dashpay/tenderdash/libs/bytes" + client "github.com/dashpay/tenderdash/rpc/client" + + context "context" + + coretypes "github.com/dashpay/tenderdash/rpc/coretypes" + + mock "github.com/stretchr/testify/mock" + + types "github.com/dashpay/tenderdash/types" +) + +// RemoteClient is an autogenerated mock type for the RemoteClient type +type RemoteClient struct { + mock.Mock +} + +type RemoteClient_Expecter struct { + mock *mock.Mock +} + +func (_m *RemoteClient) EXPECT() *RemoteClient_Expecter { + return &RemoteClient_Expecter{mock: &_m.Mock} +} + +// ABCIInfo provides a mock function with given fields: _a0 +func (_m *RemoteClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for ABCIInfo") + } + + var r0 *coretypes.ResultABCIInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultABCIInfo); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultABCIInfo) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_ABCIInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIInfo' +type RemoteClient_ABCIInfo_Call struct { + *mock.Call +} + +// ABCIInfo is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) ABCIInfo(_a0 interface{}) *RemoteClient_ABCIInfo_Call { + return &RemoteClient_ABCIInfo_Call{Call: _e.mock.On("ABCIInfo", _a0)} +} + +func (_c *RemoteClient_ABCIInfo_Call) Run(run func(_a0 context.Context)) *RemoteClient_ABCIInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_ABCIInfo_Call) Return(_a0 *coretypes.ResultABCIInfo, _a1 error) *RemoteClient_ABCIInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_ABCIInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultABCIInfo, error)) *RemoteClient_ABCIInfo_Call { + _c.Call.Return(run) + return _c +} + +// ABCIQuery provides a mock function with given fields: ctx, path, data +func (_m *RemoteClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { + ret := _m.Called(ctx, path, data) + + if len(ret) == 0 { + panic("no return value specified for ABCIQuery") + } + + var r0 *coretypes.ResultABCIQuery + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { + return rf(ctx, path, data) + } + if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) *coretypes.ResultABCIQuery); ok { + r0 = rf(ctx, path, data) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultABCIQuery) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, bytes.HexBytes) error); ok { + r1 = rf(ctx, path, data) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_ABCIQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIQuery' +type RemoteClient_ABCIQuery_Call struct { + *mock.Call +} + +// ABCIQuery is a helper method to define mock.On call +// - ctx context.Context +// - path string +// - data bytes.HexBytes +func (_e *RemoteClient_Expecter) ABCIQuery(ctx interface{}, path interface{}, data interface{}) *RemoteClient_ABCIQuery_Call { + return &RemoteClient_ABCIQuery_Call{Call: _e.mock.On("ABCIQuery", ctx, path, data)} +} + +func (_c *RemoteClient_ABCIQuery_Call) Run(run func(ctx context.Context, path string, data bytes.HexBytes)) *RemoteClient_ABCIQuery_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(bytes.HexBytes)) + }) + return _c +} + +func (_c *RemoteClient_ABCIQuery_Call) Return(_a0 *coretypes.ResultABCIQuery, _a1 error) *RemoteClient_ABCIQuery_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_ABCIQuery_Call) RunAndReturn(run func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)) *RemoteClient_ABCIQuery_Call { + _c.Call.Return(run) + return _c +} + +// ABCIQueryWithOptions provides a mock function with given fields: ctx, path, data, opts +func (_m *RemoteClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { + ret := _m.Called(ctx, path, data, opts) + + if len(ret) == 0 { + panic("no return value specified for ABCIQueryWithOptions") + } + + var r0 *coretypes.ResultABCIQuery + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { + return rf(ctx, path, data, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) *coretypes.ResultABCIQuery); ok { + r0 = rf(ctx, path, data, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultABCIQuery) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) error); ok { + r1 = rf(ctx, path, data, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_ABCIQueryWithOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIQueryWithOptions' +type RemoteClient_ABCIQueryWithOptions_Call struct { + *mock.Call +} + +// ABCIQueryWithOptions is a helper method to define mock.On call +// - ctx context.Context +// - path string +// - data bytes.HexBytes +// - opts client.ABCIQueryOptions +func (_e *RemoteClient_Expecter) ABCIQueryWithOptions(ctx interface{}, path interface{}, data interface{}, opts interface{}) *RemoteClient_ABCIQueryWithOptions_Call { + return &RemoteClient_ABCIQueryWithOptions_Call{Call: _e.mock.On("ABCIQueryWithOptions", ctx, path, data, opts)} +} + +func (_c *RemoteClient_ABCIQueryWithOptions_Call) Run(run func(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions)) *RemoteClient_ABCIQueryWithOptions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(bytes.HexBytes), args[3].(client.ABCIQueryOptions)) + }) + return _c +} + +func (_c *RemoteClient_ABCIQueryWithOptions_Call) Return(_a0 *coretypes.ResultABCIQuery, _a1 error) *RemoteClient_ABCIQueryWithOptions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_ABCIQueryWithOptions_Call) RunAndReturn(run func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)) *RemoteClient_ABCIQueryWithOptions_Call { + _c.Call.Return(run) + return _c +} + +// Block provides a mock function with given fields: ctx, height +func (_m *RemoteClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { + ret := _m.Called(ctx, height) + + if len(ret) == 0 { + panic("no return value specified for Block") + } + + var r0 *coretypes.ResultBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { + return rf(ctx, height) + } + if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultBlock); ok { + r0 = rf(ctx, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { + r1 = rf(ctx, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Block_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Block' +type RemoteClient_Block_Call struct { + *mock.Call +} + +// Block is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *RemoteClient_Expecter) Block(ctx interface{}, height interface{}) *RemoteClient_Block_Call { + return &RemoteClient_Block_Call{Call: _e.mock.On("Block", ctx, height)} +} + +func (_c *RemoteClient_Block_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_Block_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *RemoteClient_Block_Call) Return(_a0 *coretypes.ResultBlock, _a1 error) *RemoteClient_Block_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Block_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultBlock, error)) *RemoteClient_Block_Call { + _c.Call.Return(run) + return _c +} + +// BlockByHash provides a mock function with given fields: ctx, hash +func (_m *RemoteClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { + ret := _m.Called(ctx, hash) + + if len(ret) == 0 { + panic("no return value specified for BlockByHash") + } + + var r0 *coretypes.ResultBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { + return rf(ctx, hash) + } + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *coretypes.ResultBlock); ok { + r0 = rf(ctx, hash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + r1 = rf(ctx, hash) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHash' +type RemoteClient_BlockByHash_Call struct { + *mock.Call +} + +// BlockByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash bytes.HexBytes +func (_e *RemoteClient_Expecter) BlockByHash(ctx interface{}, hash interface{}) *RemoteClient_BlockByHash_Call { + return &RemoteClient_BlockByHash_Call{Call: _e.mock.On("BlockByHash", ctx, hash)} +} + +func (_c *RemoteClient_BlockByHash_Call) Run(run func(ctx context.Context, hash bytes.HexBytes)) *RemoteClient_BlockByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *RemoteClient_BlockByHash_Call) Return(_a0 *coretypes.ResultBlock, _a1 error) *RemoteClient_BlockByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BlockByHash_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)) *RemoteClient_BlockByHash_Call { + _c.Call.Return(run) + return _c +} + +// BlockResults provides a mock function with given fields: ctx, height +func (_m *RemoteClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { + ret := _m.Called(ctx, height) + + if len(ret) == 0 { + panic("no return value specified for BlockResults") + } + + var r0 *coretypes.ResultBlockResults + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { + return rf(ctx, height) + } + if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultBlockResults); ok { + r0 = rf(ctx, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBlockResults) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { + r1 = rf(ctx, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BlockResults_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockResults' +type RemoteClient_BlockResults_Call struct { + *mock.Call +} + +// BlockResults is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *RemoteClient_Expecter) BlockResults(ctx interface{}, height interface{}) *RemoteClient_BlockResults_Call { + return &RemoteClient_BlockResults_Call{Call: _e.mock.On("BlockResults", ctx, height)} +} + +func (_c *RemoteClient_BlockResults_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_BlockResults_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *RemoteClient_BlockResults_Call) Return(_a0 *coretypes.ResultBlockResults, _a1 error) *RemoteClient_BlockResults_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BlockResults_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultBlockResults, error)) *RemoteClient_BlockResults_Call { + _c.Call.Return(run) + return _c +} + +// BlockSearch provides a mock function with given fields: ctx, query, page, perPage, orderBy +func (_m *RemoteClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { + ret := _m.Called(ctx, query, page, perPage, orderBy) + + if len(ret) == 0 { + panic("no return value specified for BlockSearch") + } + + var r0 *coretypes.ResultBlockSearch + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { + return rf(ctx, query, page, perPage, orderBy) + } + if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) *coretypes.ResultBlockSearch); ok { + r0 = rf(ctx, query, page, perPage, orderBy) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBlockSearch) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, *int, *int, string) error); ok { + r1 = rf(ctx, query, page, perPage, orderBy) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BlockSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockSearch' +type RemoteClient_BlockSearch_Call struct { + *mock.Call +} + +// BlockSearch is a helper method to define mock.On call +// - ctx context.Context +// - query string +// - page *int +// - perPage *int +// - orderBy string +func (_e *RemoteClient_Expecter) BlockSearch(ctx interface{}, query interface{}, page interface{}, perPage interface{}, orderBy interface{}) *RemoteClient_BlockSearch_Call { + return &RemoteClient_BlockSearch_Call{Call: _e.mock.On("BlockSearch", ctx, query, page, perPage, orderBy)} +} + +func (_c *RemoteClient_BlockSearch_Call) Run(run func(ctx context.Context, query string, page *int, perPage *int, orderBy string)) *RemoteClient_BlockSearch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*int), args[3].(*int), args[4].(string)) + }) + return _c +} + +func (_c *RemoteClient_BlockSearch_Call) Return(_a0 *coretypes.ResultBlockSearch, _a1 error) *RemoteClient_BlockSearch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BlockSearch_Call) RunAndReturn(run func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)) *RemoteClient_BlockSearch_Call { + _c.Call.Return(run) + return _c +} + +// BlockchainInfo provides a mock function with given fields: ctx, minHeight, maxHeight +func (_m *RemoteClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { + ret := _m.Called(ctx, minHeight, maxHeight) + + if len(ret) == 0 { + panic("no return value specified for BlockchainInfo") + } + + var r0 *coretypes.ResultBlockchainInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { + return rf(ctx, minHeight, maxHeight) + } + if rf, ok := ret.Get(0).(func(context.Context, int64, int64) *coretypes.ResultBlockchainInfo); ok { + r0 = rf(ctx, minHeight, maxHeight) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBlockchainInfo) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, int64, int64) error); ok { + r1 = rf(ctx, minHeight, maxHeight) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BlockchainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockchainInfo' +type RemoteClient_BlockchainInfo_Call struct { + *mock.Call +} + +// BlockchainInfo is a helper method to define mock.On call +// - ctx context.Context +// - minHeight int64 +// - maxHeight int64 +func (_e *RemoteClient_Expecter) BlockchainInfo(ctx interface{}, minHeight interface{}, maxHeight interface{}) *RemoteClient_BlockchainInfo_Call { + return &RemoteClient_BlockchainInfo_Call{Call: _e.mock.On("BlockchainInfo", ctx, minHeight, maxHeight)} +} + +func (_c *RemoteClient_BlockchainInfo_Call) Run(run func(ctx context.Context, minHeight int64, maxHeight int64)) *RemoteClient_BlockchainInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64)) + }) + return _c +} + +func (_c *RemoteClient_BlockchainInfo_Call) Return(_a0 *coretypes.ResultBlockchainInfo, _a1 error) *RemoteClient_BlockchainInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BlockchainInfo_Call) RunAndReturn(run func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)) *RemoteClient_BlockchainInfo_Call { + _c.Call.Return(run) + return _c +} + +// BroadcastEvidence provides a mock function with given fields: _a0, _a1 +func (_m *RemoteClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for BroadcastEvidence") + } + + var r0 *coretypes.ResultBroadcastEvidence + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) *coretypes.ResultBroadcastEvidence); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBroadcastEvidence) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.Evidence) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BroadcastEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastEvidence' +type RemoteClient_BroadcastEvidence_Call struct { + *mock.Call +} + +// BroadcastEvidence is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Evidence +func (_e *RemoteClient_Expecter) BroadcastEvidence(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastEvidence_Call { + return &RemoteClient_BroadcastEvidence_Call{Call: _e.mock.On("BroadcastEvidence", _a0, _a1)} +} + +func (_c *RemoteClient_BroadcastEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *RemoteClient_BroadcastEvidence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Evidence)) + }) + return _c +} + +func (_c *RemoteClient_BroadcastEvidence_Call) Return(_a0 *coretypes.ResultBroadcastEvidence, _a1 error) *RemoteClient_BroadcastEvidence_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BroadcastEvidence_Call) RunAndReturn(run func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)) *RemoteClient_BroadcastEvidence_Call { + _c.Call.Return(run) + return _c +} + +// BroadcastTx provides a mock function with given fields: _a0, _a1 +func (_m *RemoteClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for BroadcastTx") + } + + var r0 *coretypes.ResultBroadcastTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BroadcastTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTx' +type RemoteClient_BroadcastTx_Call struct { + *mock.Call +} + +// BroadcastTx is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *RemoteClient_Expecter) BroadcastTx(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastTx_Call { + return &RemoteClient_BroadcastTx_Call{Call: _e.mock.On("BroadcastTx", _a0, _a1)} +} + +func (_c *RemoteClient_BroadcastTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_BroadcastTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *RemoteClient_BroadcastTx_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *RemoteClient_BroadcastTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BroadcastTx_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *RemoteClient_BroadcastTx_Call { + _c.Call.Return(run) + return _c +} + +// BroadcastTxAsync provides a mock function with given fields: _a0, _a1 +func (_m *RemoteClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for BroadcastTxAsync") + } + + var r0 *coretypes.ResultBroadcastTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BroadcastTxAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxAsync' +type RemoteClient_BroadcastTxAsync_Call struct { + *mock.Call +} + +// BroadcastTxAsync is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *RemoteClient_Expecter) BroadcastTxAsync(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastTxAsync_Call { + return &RemoteClient_BroadcastTxAsync_Call{Call: _e.mock.On("BroadcastTxAsync", _a0, _a1)} +} + +func (_c *RemoteClient_BroadcastTxAsync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_BroadcastTxAsync_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *RemoteClient_BroadcastTxAsync_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *RemoteClient_BroadcastTxAsync_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BroadcastTxAsync_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *RemoteClient_BroadcastTxAsync_Call { + _c.Call.Return(run) + return _c +} + +// BroadcastTxCommit provides a mock function with given fields: _a0, _a1 +func (_m *RemoteClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for BroadcastTxCommit") + } + + var r0 *coretypes.ResultBroadcastTxCommit + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTxCommit); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBroadcastTxCommit) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BroadcastTxCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxCommit' +type RemoteClient_BroadcastTxCommit_Call struct { + *mock.Call +} + +// BroadcastTxCommit is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *RemoteClient_Expecter) BroadcastTxCommit(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastTxCommit_Call { + return &RemoteClient_BroadcastTxCommit_Call{Call: _e.mock.On("BroadcastTxCommit", _a0, _a1)} +} + +func (_c *RemoteClient_BroadcastTxCommit_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_BroadcastTxCommit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *RemoteClient_BroadcastTxCommit_Call) Return(_a0 *coretypes.ResultBroadcastTxCommit, _a1 error) *RemoteClient_BroadcastTxCommit_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BroadcastTxCommit_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)) *RemoteClient_BroadcastTxCommit_Call { + _c.Call.Return(run) + return _c +} + +// BroadcastTxSync provides a mock function with given fields: _a0, _a1 +func (_m *RemoteClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } + + var r0 *coretypes.ResultBroadcastTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultBroadcastTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultBroadcastTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_BroadcastTxSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxSync' +type RemoteClient_BroadcastTxSync_Call struct { + *mock.Call +} + +// BroadcastTxSync is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *RemoteClient_Expecter) BroadcastTxSync(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastTxSync_Call { + return &RemoteClient_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", _a0, _a1)} +} + +func (_c *RemoteClient_BroadcastTxSync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_BroadcastTxSync_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *RemoteClient_BroadcastTxSync_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *RemoteClient_BroadcastTxSync_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_BroadcastTxSync_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *RemoteClient_BroadcastTxSync_Call { + _c.Call.Return(run) + return _c +} + +// CheckTx provides a mock function with given fields: _a0, _a1 +func (_m *RemoteClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + + var r0 *coretypes.ResultCheckTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, types.Tx) *coretypes.ResultCheckTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultCheckTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.Tx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' +type RemoteClient_CheckTx_Call struct { + *mock.Call +} + +// CheckTx is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.Tx +func (_e *RemoteClient_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *RemoteClient_CheckTx_Call { + return &RemoteClient_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} +} + +func (_c *RemoteClient_CheckTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_CheckTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx)) + }) + return _c +} + +func (_c *RemoteClient_CheckTx_Call) Return(_a0 *coretypes.ResultCheckTx, _a1 error) *RemoteClient_CheckTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_CheckTx_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)) *RemoteClient_CheckTx_Call { + _c.Call.Return(run) + return _c +} + +// Commit provides a mock function with given fields: ctx, height +func (_m *RemoteClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { + ret := _m.Called(ctx, height) + + if len(ret) == 0 { + panic("no return value specified for Commit") + } + + var r0 *coretypes.ResultCommit + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { + return rf(ctx, height) + } + if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultCommit); ok { + r0 = rf(ctx, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultCommit) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { + r1 = rf(ctx, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit' +type RemoteClient_Commit_Call struct { + *mock.Call +} + +// Commit is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *RemoteClient_Expecter) Commit(ctx interface{}, height interface{}) *RemoteClient_Commit_Call { + return &RemoteClient_Commit_Call{Call: _e.mock.On("Commit", ctx, height)} +} + +func (_c *RemoteClient_Commit_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_Commit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *RemoteClient_Commit_Call) Return(_a0 *coretypes.ResultCommit, _a1 error) *RemoteClient_Commit_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Commit_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultCommit, error)) *RemoteClient_Commit_Call { + _c.Call.Return(run) + return _c +} + +// ConsensusParams provides a mock function with given fields: ctx, height +func (_m *RemoteClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { + ret := _m.Called(ctx, height) + + if len(ret) == 0 { + panic("no return value specified for ConsensusParams") + } + + var r0 *coretypes.ResultConsensusParams + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { + return rf(ctx, height) + } + if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultConsensusParams); ok { + r0 = rf(ctx, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultConsensusParams) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { + r1 = rf(ctx, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_ConsensusParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConsensusParams' +type RemoteClient_ConsensusParams_Call struct { + *mock.Call +} + +// ConsensusParams is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *RemoteClient_Expecter) ConsensusParams(ctx interface{}, height interface{}) *RemoteClient_ConsensusParams_Call { + return &RemoteClient_ConsensusParams_Call{Call: _e.mock.On("ConsensusParams", ctx, height)} +} + +func (_c *RemoteClient_ConsensusParams_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_ConsensusParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *RemoteClient_ConsensusParams_Call) Return(_a0 *coretypes.ResultConsensusParams, _a1 error) *RemoteClient_ConsensusParams_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_ConsensusParams_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)) *RemoteClient_ConsensusParams_Call { + _c.Call.Return(run) + return _c +} + +// ConsensusState provides a mock function with given fields: _a0 +func (_m *RemoteClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for ConsensusState") + } + + var r0 *coretypes.ResultConsensusState + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultConsensusState); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultConsensusState) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_ConsensusState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConsensusState' +type RemoteClient_ConsensusState_Call struct { + *mock.Call +} + +// ConsensusState is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) ConsensusState(_a0 interface{}) *RemoteClient_ConsensusState_Call { + return &RemoteClient_ConsensusState_Call{Call: _e.mock.On("ConsensusState", _a0)} +} + +func (_c *RemoteClient_ConsensusState_Call) Run(run func(_a0 context.Context)) *RemoteClient_ConsensusState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_ConsensusState_Call) Return(_a0 *coretypes.ResultConsensusState, _a1 error) *RemoteClient_ConsensusState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_ConsensusState_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultConsensusState, error)) *RemoteClient_ConsensusState_Call { + _c.Call.Return(run) + return _c +} + +// DumpConsensusState provides a mock function with given fields: _a0 +func (_m *RemoteClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for DumpConsensusState") + } + + var r0 *coretypes.ResultDumpConsensusState + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultDumpConsensusState); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultDumpConsensusState) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_DumpConsensusState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DumpConsensusState' +type RemoteClient_DumpConsensusState_Call struct { + *mock.Call +} + +// DumpConsensusState is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) DumpConsensusState(_a0 interface{}) *RemoteClient_DumpConsensusState_Call { + return &RemoteClient_DumpConsensusState_Call{Call: _e.mock.On("DumpConsensusState", _a0)} +} + +func (_c *RemoteClient_DumpConsensusState_Call) Run(run func(_a0 context.Context)) *RemoteClient_DumpConsensusState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_DumpConsensusState_Call) Return(_a0 *coretypes.ResultDumpConsensusState, _a1 error) *RemoteClient_DumpConsensusState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_DumpConsensusState_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultDumpConsensusState, error)) *RemoteClient_DumpConsensusState_Call { + _c.Call.Return(run) + return _c +} + +// Events provides a mock function with given fields: ctx, req +func (_m *RemoteClient) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for Events") + } + + var r0 *coretypes.ResultEvents + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) *coretypes.ResultEvents); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultEvents) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *coretypes.RequestEvents) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Events_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Events' +type RemoteClient_Events_Call struct { + *mock.Call +} + +// Events is a helper method to define mock.On call +// - ctx context.Context +// - req *coretypes.RequestEvents +func (_e *RemoteClient_Expecter) Events(ctx interface{}, req interface{}) *RemoteClient_Events_Call { + return &RemoteClient_Events_Call{Call: _e.mock.On("Events", ctx, req)} +} + +func (_c *RemoteClient_Events_Call) Run(run func(ctx context.Context, req *coretypes.RequestEvents)) *RemoteClient_Events_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*coretypes.RequestEvents)) + }) + return _c +} + +func (_c *RemoteClient_Events_Call) Return(_a0 *coretypes.ResultEvents, _a1 error) *RemoteClient_Events_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Events_Call) RunAndReturn(run func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)) *RemoteClient_Events_Call { + _c.Call.Return(run) + return _c +} + +// Genesis provides a mock function with given fields: _a0 +func (_m *RemoteClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Genesis") + } + + var r0 *coretypes.ResultGenesis + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultGenesis); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultGenesis) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Genesis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Genesis' +type RemoteClient_Genesis_Call struct { + *mock.Call +} + +// Genesis is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) Genesis(_a0 interface{}) *RemoteClient_Genesis_Call { + return &RemoteClient_Genesis_Call{Call: _e.mock.On("Genesis", _a0)} +} + +func (_c *RemoteClient_Genesis_Call) Run(run func(_a0 context.Context)) *RemoteClient_Genesis_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_Genesis_Call) Return(_a0 *coretypes.ResultGenesis, _a1 error) *RemoteClient_Genesis_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Genesis_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultGenesis, error)) *RemoteClient_Genesis_Call { + _c.Call.Return(run) + return _c +} + +// GenesisChunked provides a mock function with given fields: _a0, _a1 +func (_m *RemoteClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for GenesisChunked") + } + + var r0 *coretypes.ResultGenesisChunk + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, uint) *coretypes.ResultGenesisChunk); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultGenesisChunk) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uint) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_GenesisChunked_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenesisChunked' +type RemoteClient_GenesisChunked_Call struct { + *mock.Call +} + +// GenesisChunked is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 uint +func (_e *RemoteClient_Expecter) GenesisChunked(_a0 interface{}, _a1 interface{}) *RemoteClient_GenesisChunked_Call { + return &RemoteClient_GenesisChunked_Call{Call: _e.mock.On("GenesisChunked", _a0, _a1)} +} + +func (_c *RemoteClient_GenesisChunked_Call) Run(run func(_a0 context.Context, _a1 uint)) *RemoteClient_GenesisChunked_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint)) + }) + return _c +} + +func (_c *RemoteClient_GenesisChunked_Call) Return(_a0 *coretypes.ResultGenesisChunk, _a1 error) *RemoteClient_GenesisChunked_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_GenesisChunked_Call) RunAndReturn(run func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)) *RemoteClient_GenesisChunked_Call { + _c.Call.Return(run) + return _c +} + +// Header provides a mock function with given fields: ctx, height +func (_m *RemoteClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { + ret := _m.Called(ctx, height) + + if len(ret) == 0 { + panic("no return value specified for Header") + } + + var r0 *coretypes.ResultHeader + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { + return rf(ctx, height) + } + if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultHeader); ok { + r0 = rf(ctx, height) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultHeader) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { + r1 = rf(ctx, height) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Header_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Header' +type RemoteClient_Header_Call struct { + *mock.Call +} + +// Header is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +func (_e *RemoteClient_Expecter) Header(ctx interface{}, height interface{}) *RemoteClient_Header_Call { + return &RemoteClient_Header_Call{Call: _e.mock.On("Header", ctx, height)} +} + +func (_c *RemoteClient_Header_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_Header_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64)) + }) + return _c +} + +func (_c *RemoteClient_Header_Call) Return(_a0 *coretypes.ResultHeader, _a1 error) *RemoteClient_Header_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Header_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultHeader, error)) *RemoteClient_Header_Call { + _c.Call.Return(run) + return _c +} + +// HeaderByHash provides a mock function with given fields: ctx, hash +func (_m *RemoteClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { + ret := _m.Called(ctx, hash) + + if len(ret) == 0 { + panic("no return value specified for HeaderByHash") + } + + var r0 *coretypes.ResultHeader + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { + return rf(ctx, hash) + } + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *coretypes.ResultHeader); ok { + r0 = rf(ctx, hash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultHeader) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + r1 = rf(ctx, hash) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_HeaderByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByHash' +type RemoteClient_HeaderByHash_Call struct { + *mock.Call +} + +// HeaderByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash bytes.HexBytes +func (_e *RemoteClient_Expecter) HeaderByHash(ctx interface{}, hash interface{}) *RemoteClient_HeaderByHash_Call { + return &RemoteClient_HeaderByHash_Call{Call: _e.mock.On("HeaderByHash", ctx, hash)} +} + +func (_c *RemoteClient_HeaderByHash_Call) Run(run func(ctx context.Context, hash bytes.HexBytes)) *RemoteClient_HeaderByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *RemoteClient_HeaderByHash_Call) Return(_a0 *coretypes.ResultHeader, _a1 error) *RemoteClient_HeaderByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_HeaderByHash_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)) *RemoteClient_HeaderByHash_Call { + _c.Call.Return(run) + return _c +} + +// Health provides a mock function with given fields: _a0 +func (_m *RemoteClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Health") + } + + var r0 *coretypes.ResultHealth + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultHealth); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultHealth) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Health_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Health' +type RemoteClient_Health_Call struct { + *mock.Call +} + +// Health is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) Health(_a0 interface{}) *RemoteClient_Health_Call { + return &RemoteClient_Health_Call{Call: _e.mock.On("Health", _a0)} +} + +func (_c *RemoteClient_Health_Call) Run(run func(_a0 context.Context)) *RemoteClient_Health_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_Health_Call) Return(_a0 *coretypes.ResultHealth, _a1 error) *RemoteClient_Health_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Health_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultHealth, error)) *RemoteClient_Health_Call { + _c.Call.Return(run) + return _c +} + +// NetInfo provides a mock function with given fields: _a0 +func (_m *RemoteClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for NetInfo") + } + + var r0 *coretypes.ResultNetInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultNetInfo); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultNetInfo) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_NetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NetInfo' +type RemoteClient_NetInfo_Call struct { + *mock.Call +} + +// NetInfo is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) NetInfo(_a0 interface{}) *RemoteClient_NetInfo_Call { + return &RemoteClient_NetInfo_Call{Call: _e.mock.On("NetInfo", _a0)} +} + +func (_c *RemoteClient_NetInfo_Call) Run(run func(_a0 context.Context)) *RemoteClient_NetInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_NetInfo_Call) Return(_a0 *coretypes.ResultNetInfo, _a1 error) *RemoteClient_NetInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_NetInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultNetInfo, error)) *RemoteClient_NetInfo_Call { + _c.Call.Return(run) + return _c +} + +// NumUnconfirmedTxs provides a mock function with given fields: _a0 +func (_m *RemoteClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for NumUnconfirmedTxs") + } + + var r0 *coretypes.ResultUnconfirmedTxs + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultUnconfirmedTxs); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_NumUnconfirmedTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NumUnconfirmedTxs' +type RemoteClient_NumUnconfirmedTxs_Call struct { + *mock.Call +} + +// NumUnconfirmedTxs is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) NumUnconfirmedTxs(_a0 interface{}) *RemoteClient_NumUnconfirmedTxs_Call { + return &RemoteClient_NumUnconfirmedTxs_Call{Call: _e.mock.On("NumUnconfirmedTxs", _a0)} +} + +func (_c *RemoteClient_NumUnconfirmedTxs_Call) Run(run func(_a0 context.Context)) *RemoteClient_NumUnconfirmedTxs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_NumUnconfirmedTxs_Call) Return(_a0 *coretypes.ResultUnconfirmedTxs, _a1 error) *RemoteClient_NumUnconfirmedTxs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_NumUnconfirmedTxs_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)) *RemoteClient_NumUnconfirmedTxs_Call { + _c.Call.Return(run) + return _c +} + +// Remote provides a mock function with given fields: +func (_m *RemoteClient) Remote() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Remote") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// RemoteClient_Remote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remote' +type RemoteClient_Remote_Call struct { + *mock.Call +} + +// Remote is a helper method to define mock.On call +func (_e *RemoteClient_Expecter) Remote() *RemoteClient_Remote_Call { + return &RemoteClient_Remote_Call{Call: _e.mock.On("Remote")} +} + +func (_c *RemoteClient_Remote_Call) Run(run func()) *RemoteClient_Remote_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RemoteClient_Remote_Call) Return(_a0 string) *RemoteClient_Remote_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RemoteClient_Remote_Call) RunAndReturn(run func() string) *RemoteClient_Remote_Call { + _c.Call.Return(run) + return _c +} + +// RemoveTx provides a mock function with given fields: _a0, _a1 +func (_m *RemoteClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for RemoveTx") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// RemoteClient_RemoveTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveTx' +type RemoteClient_RemoveTx_Call struct { + *mock.Call +} + +// RemoveTx is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.TxKey +func (_e *RemoteClient_Expecter) RemoveTx(_a0 interface{}, _a1 interface{}) *RemoteClient_RemoveTx_Call { + return &RemoteClient_RemoveTx_Call{Call: _e.mock.On("RemoveTx", _a0, _a1)} +} + +func (_c *RemoteClient_RemoveTx_Call) Run(run func(_a0 context.Context, _a1 types.TxKey)) *RemoteClient_RemoveTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.TxKey)) + }) + return _c +} + +func (_c *RemoteClient_RemoveTx_Call) Return(_a0 error) *RemoteClient_RemoveTx_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RemoteClient_RemoveTx_Call) RunAndReturn(run func(context.Context, types.TxKey) error) *RemoteClient_RemoveTx_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function with given fields: _a0 +func (_m *RemoteClient) Start(_a0 context.Context) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Start") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// RemoteClient_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type RemoteClient_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) Start(_a0 interface{}) *RemoteClient_Start_Call { + return &RemoteClient_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *RemoteClient_Start_Call) Run(run func(_a0 context.Context)) *RemoteClient_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_Start_Call) Return(_a0 error) *RemoteClient_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RemoteClient_Start_Call) RunAndReturn(run func(context.Context) error) *RemoteClient_Start_Call { + _c.Call.Return(run) + return _c +} + +// Status provides a mock function with given fields: _a0 +func (_m *RemoteClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Status") + } + + var r0 *coretypes.ResultStatus + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultStatus); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultStatus) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' +type RemoteClient_Status_Call struct { + *mock.Call +} + +// Status is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RemoteClient_Expecter) Status(_a0 interface{}) *RemoteClient_Status_Call { + return &RemoteClient_Status_Call{Call: _e.mock.On("Status", _a0)} +} + +func (_c *RemoteClient_Status_Call) Run(run func(_a0 context.Context)) *RemoteClient_Status_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RemoteClient_Status_Call) Return(_a0 *coretypes.ResultStatus, _a1 error) *RemoteClient_Status_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Status_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultStatus, error)) *RemoteClient_Status_Call { + _c.Call.Return(run) + return _c +} + +// Subscribe provides a mock function with given fields: ctx, subscriber, query, outCapacity +func (_m *RemoteClient) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) { + _va := make([]interface{}, len(outCapacity)) + for _i := range outCapacity { + _va[_i] = outCapacity[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, subscriber, query) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + + var r0 <-chan coretypes.ResultEvent + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { + return rf(ctx, subscriber, query, outCapacity...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) <-chan coretypes.ResultEvent); ok { + r0 = rf(ctx, subscriber, query, outCapacity...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan coretypes.ResultEvent) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, ...int) error); ok { + r1 = rf(ctx, subscriber, query, outCapacity...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe' +type RemoteClient_Subscribe_Call struct { + *mock.Call +} + +// Subscribe is a helper method to define mock.On call +// - ctx context.Context +// - subscriber string +// - query string +// - outCapacity ...int +func (_e *RemoteClient_Expecter) Subscribe(ctx interface{}, subscriber interface{}, query interface{}, outCapacity ...interface{}) *RemoteClient_Subscribe_Call { + return &RemoteClient_Subscribe_Call{Call: _e.mock.On("Subscribe", + append([]interface{}{ctx, subscriber, query}, outCapacity...)...)} +} + +func (_c *RemoteClient_Subscribe_Call) Run(run func(ctx context.Context, subscriber string, query string, outCapacity ...int)) *RemoteClient_Subscribe_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]int, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(int) + } + } + run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...) + }) + return _c +} + +func (_c *RemoteClient_Subscribe_Call) Return(out <-chan coretypes.ResultEvent, err error) *RemoteClient_Subscribe_Call { + _c.Call.Return(out, err) + return _c +} + +func (_c *RemoteClient_Subscribe_Call) RunAndReturn(run func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)) *RemoteClient_Subscribe_Call { + _c.Call.Return(run) + return _c +} + +// Tx provides a mock function with given fields: ctx, hash, prove +func (_m *RemoteClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { + ret := _m.Called(ctx, hash, prove) + + if len(ret) == 0 { + panic("no return value specified for Tx") + } + + var r0 *coretypes.ResultTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { + return rf(ctx, hash, prove) + } + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) *coretypes.ResultTx); ok { + r0 = rf(ctx, hash, prove) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes, bool) error); ok { + r1 = rf(ctx, hash, prove) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Tx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tx' +type RemoteClient_Tx_Call struct { + *mock.Call +} + +// Tx is a helper method to define mock.On call +// - ctx context.Context +// - hash bytes.HexBytes +// - prove bool +func (_e *RemoteClient_Expecter) Tx(ctx interface{}, hash interface{}, prove interface{}) *RemoteClient_Tx_Call { + return &RemoteClient_Tx_Call{Call: _e.mock.On("Tx", ctx, hash, prove)} +} + +func (_c *RemoteClient_Tx_Call) Run(run func(ctx context.Context, hash bytes.HexBytes, prove bool)) *RemoteClient_Tx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes), args[2].(bool)) + }) + return _c +} + +func (_c *RemoteClient_Tx_Call) Return(_a0 *coretypes.ResultTx, _a1 error) *RemoteClient_Tx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Tx_Call) RunAndReturn(run func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)) *RemoteClient_Tx_Call { + _c.Call.Return(run) + return _c +} + +// TxSearch provides a mock function with given fields: ctx, query, prove, page, perPage, orderBy +func (_m *RemoteClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { + ret := _m.Called(ctx, query, prove, page, perPage, orderBy) + + if len(ret) == 0 { + panic("no return value specified for TxSearch") + } + + var r0 *coretypes.ResultTxSearch + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { + return rf(ctx, query, prove, page, perPage, orderBy) + } + if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) *coretypes.ResultTxSearch); ok { + r0 = rf(ctx, query, prove, page, perPage, orderBy) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultTxSearch) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, bool, *int, *int, string) error); ok { + r1 = rf(ctx, query, prove, page, perPage, orderBy) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_TxSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxSearch' +type RemoteClient_TxSearch_Call struct { + *mock.Call +} + +// TxSearch is a helper method to define mock.On call +// - ctx context.Context +// - query string +// - prove bool +// - page *int +// - perPage *int +// - orderBy string +func (_e *RemoteClient_Expecter) TxSearch(ctx interface{}, query interface{}, prove interface{}, page interface{}, perPage interface{}, orderBy interface{}) *RemoteClient_TxSearch_Call { + return &RemoteClient_TxSearch_Call{Call: _e.mock.On("TxSearch", ctx, query, prove, page, perPage, orderBy)} +} + +func (_c *RemoteClient_TxSearch_Call) Run(run func(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string)) *RemoteClient_TxSearch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(bool), args[3].(*int), args[4].(*int), args[5].(string)) + }) + return _c +} + +func (_c *RemoteClient_TxSearch_Call) Return(_a0 *coretypes.ResultTxSearch, _a1 error) *RemoteClient_TxSearch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_TxSearch_Call) RunAndReturn(run func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)) *RemoteClient_TxSearch_Call { + _c.Call.Return(run) + return _c +} + +// UnconfirmedTxs provides a mock function with given fields: ctx, page, perPage +func (_m *RemoteClient) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { + ret := _m.Called(ctx, page, perPage) + + if len(ret) == 0 { + panic("no return value specified for UnconfirmedTxs") + } + + var r0 *coretypes.ResultUnconfirmedTxs + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { + return rf(ctx, page, perPage) + } + if rf, ok := ret.Get(0).(func(context.Context, *int, *int) *coretypes.ResultUnconfirmedTxs); ok { + r0 = rf(ctx, page, perPage) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultUnconfirmedTxs) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *int, *int) error); ok { + r1 = rf(ctx, page, perPage) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_UnconfirmedTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnconfirmedTxs' +type RemoteClient_UnconfirmedTxs_Call struct { + *mock.Call +} + +// UnconfirmedTxs is a helper method to define mock.On call +// - ctx context.Context +// - page *int +// - perPage *int +func (_e *RemoteClient_Expecter) UnconfirmedTxs(ctx interface{}, page interface{}, perPage interface{}) *RemoteClient_UnconfirmedTxs_Call { + return &RemoteClient_UnconfirmedTxs_Call{Call: _e.mock.On("UnconfirmedTxs", ctx, page, perPage)} +} + +func (_c *RemoteClient_UnconfirmedTxs_Call) Run(run func(ctx context.Context, page *int, perPage *int)) *RemoteClient_UnconfirmedTxs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int), args[2].(*int)) + }) + return _c +} + +func (_c *RemoteClient_UnconfirmedTxs_Call) Return(_a0 *coretypes.ResultUnconfirmedTxs, _a1 error) *RemoteClient_UnconfirmedTxs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_UnconfirmedTxs_Call) RunAndReturn(run func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)) *RemoteClient_UnconfirmedTxs_Call { + _c.Call.Return(run) + return _c +} + +// Unsubscribe provides a mock function with given fields: ctx, subscriber, query +func (_m *RemoteClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { + ret := _m.Called(ctx, subscriber, query) + + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { + r0 = rf(ctx, subscriber, query) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// RemoteClient_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' +type RemoteClient_Unsubscribe_Call struct { + *mock.Call +} + +// Unsubscribe is a helper method to define mock.On call +// - ctx context.Context +// - subscriber string +// - query string +func (_e *RemoteClient_Expecter) Unsubscribe(ctx interface{}, subscriber interface{}, query interface{}) *RemoteClient_Unsubscribe_Call { + return &RemoteClient_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", ctx, subscriber, query)} +} + +func (_c *RemoteClient_Unsubscribe_Call) Run(run func(ctx context.Context, subscriber string, query string)) *RemoteClient_Unsubscribe_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *RemoteClient_Unsubscribe_Call) Return(_a0 error) *RemoteClient_Unsubscribe_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RemoteClient_Unsubscribe_Call) RunAndReturn(run func(context.Context, string, string) error) *RemoteClient_Unsubscribe_Call { + _c.Call.Return(run) + return _c +} + +// UnsubscribeAll provides a mock function with given fields: ctx, subscriber +func (_m *RemoteClient) UnsubscribeAll(ctx context.Context, subscriber string) error { + ret := _m.Called(ctx, subscriber) + + if len(ret) == 0 { + panic("no return value specified for UnsubscribeAll") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = rf(ctx, subscriber) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// RemoteClient_UnsubscribeAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubscribeAll' +type RemoteClient_UnsubscribeAll_Call struct { + *mock.Call +} + +// UnsubscribeAll is a helper method to define mock.On call +// - ctx context.Context +// - subscriber string +func (_e *RemoteClient_Expecter) UnsubscribeAll(ctx interface{}, subscriber interface{}) *RemoteClient_UnsubscribeAll_Call { + return &RemoteClient_UnsubscribeAll_Call{Call: _e.mock.On("UnsubscribeAll", ctx, subscriber)} +} + +func (_c *RemoteClient_UnsubscribeAll_Call) Run(run func(ctx context.Context, subscriber string)) *RemoteClient_UnsubscribeAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *RemoteClient_UnsubscribeAll_Call) Return(_a0 error) *RemoteClient_UnsubscribeAll_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RemoteClient_UnsubscribeAll_Call) RunAndReturn(run func(context.Context, string) error) *RemoteClient_UnsubscribeAll_Call { + _c.Call.Return(run) + return _c +} + +// Validators provides a mock function with given fields: ctx, height, page, perPage, requestQuorumInfo +func (_m *RemoteClient) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { + ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) + + if len(ret) == 0 { + panic("no return value specified for Validators") + } + + var r0 *coretypes.ResultValidators + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { + return rf(ctx, height, page, perPage, requestQuorumInfo) + } + if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) *coretypes.ResultValidators); ok { + r0 = rf(ctx, height, page, perPage, requestQuorumInfo) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretypes.ResultValidators) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *int64, *int, *int, *bool) error); ok { + r1 = rf(ctx, height, page, perPage, requestQuorumInfo) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoteClient_Validators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validators' +type RemoteClient_Validators_Call struct { + *mock.Call +} + +// Validators is a helper method to define mock.On call +// - ctx context.Context +// - height *int64 +// - page *int +// - perPage *int +// - requestQuorumInfo *bool +func (_e *RemoteClient_Expecter) Validators(ctx interface{}, height interface{}, page interface{}, perPage interface{}, requestQuorumInfo interface{}) *RemoteClient_Validators_Call { + return &RemoteClient_Validators_Call{Call: _e.mock.On("Validators", ctx, height, page, perPage, requestQuorumInfo)} +} + +func (_c *RemoteClient_Validators_Call) Run(run func(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool)) *RemoteClient_Validators_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int64), args[2].(*int), args[3].(*int), args[4].(*bool)) + }) + return _c +} + +func (_c *RemoteClient_Validators_Call) Return(_a0 *coretypes.ResultValidators, _a1 error) *RemoteClient_Validators_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RemoteClient_Validators_Call) RunAndReturn(run func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)) *RemoteClient_Validators_Call { + _c.Call.Return(run) + return _c +} + +// NewRemoteClient creates a new instance of RemoteClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewRemoteClient(t interface { + mock.TestingT + Cleanup(func()) +}) *RemoteClient { + mock := &RemoteClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/rpc/client/mocks/sign_client.go b/rpc/client/mocks/sign_client.go deleted file mode 100644 index dea02efa1d..0000000000 --- a/rpc/client/mocks/sign_client.go +++ /dev/null @@ -1,332 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - bytes "github.com/dashpay/tenderdash/libs/bytes" - - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - - mock "github.com/stretchr/testify/mock" -) - -// SignClient is an autogenerated mock type for the SignClient type -type SignClient struct { - mock.Mock -} - -// Block provides a mock function with given fields: ctx, height -func (_m *SignClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for Block") - } - - var r0 *coretypes.ResultBlock - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultBlock); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlock) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockByHash provides a mock function with given fields: ctx, hash -func (_m *SignClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { - ret := _m.Called(ctx, hash) - - if len(ret) == 0 { - panic("no return value specified for BlockByHash") - } - - var r0 *coretypes.ResultBlock - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { - return rf(ctx, hash) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *coretypes.ResultBlock); ok { - r0 = rf(ctx, hash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlock) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { - r1 = rf(ctx, hash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockResults provides a mock function with given fields: ctx, height -func (_m *SignClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for BlockResults") - } - - var r0 *coretypes.ResultBlockResults - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultBlockResults); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlockResults) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockSearch provides a mock function with given fields: ctx, query, page, perPage, orderBy -func (_m *SignClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { - ret := _m.Called(ctx, query, page, perPage, orderBy) - - if len(ret) == 0 { - panic("no return value specified for BlockSearch") - } - - var r0 *coretypes.ResultBlockSearch - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { - return rf(ctx, query, page, perPage, orderBy) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) *coretypes.ResultBlockSearch); ok { - r0 = rf(ctx, query, page, perPage, orderBy) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultBlockSearch) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *int, *int, string) error); ok { - r1 = rf(ctx, query, page, perPage, orderBy) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Commit provides a mock function with given fields: ctx, height -func (_m *SignClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for Commit") - } - - var r0 *coretypes.ResultCommit - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultCommit); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultCommit) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Header provides a mock function with given fields: ctx, height -func (_m *SignClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { - ret := _m.Called(ctx, height) - - if len(ret) == 0 { - panic("no return value specified for Header") - } - - var r0 *coretypes.ResultHeader - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { - return rf(ctx, height) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64) *coretypes.ResultHeader); ok { - r0 = rf(ctx, height) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultHeader) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64) error); ok { - r1 = rf(ctx, height) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// HeaderByHash provides a mock function with given fields: ctx, hash -func (_m *SignClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { - ret := _m.Called(ctx, hash) - - if len(ret) == 0 { - panic("no return value specified for HeaderByHash") - } - - var r0 *coretypes.ResultHeader - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { - return rf(ctx, hash) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *coretypes.ResultHeader); ok { - r0 = rf(ctx, hash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultHeader) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { - r1 = rf(ctx, hash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Tx provides a mock function with given fields: ctx, hash, prove -func (_m *SignClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { - ret := _m.Called(ctx, hash, prove) - - if len(ret) == 0 { - panic("no return value specified for Tx") - } - - var r0 *coretypes.ResultTx - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { - return rf(ctx, hash, prove) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) *coretypes.ResultTx); ok { - r0 = rf(ctx, hash, prove) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultTx) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes, bool) error); ok { - r1 = rf(ctx, hash, prove) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TxSearch provides a mock function with given fields: ctx, query, prove, page, perPage, orderBy -func (_m *SignClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { - ret := _m.Called(ctx, query, prove, page, perPage, orderBy) - - if len(ret) == 0 { - panic("no return value specified for TxSearch") - } - - var r0 *coretypes.ResultTxSearch - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { - return rf(ctx, query, prove, page, perPage, orderBy) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) *coretypes.ResultTxSearch); ok { - r0 = rf(ctx, query, prove, page, perPage, orderBy) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultTxSearch) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bool, *int, *int, string) error); ok { - r1 = rf(ctx, query, prove, page, perPage, orderBy) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Validators provides a mock function with given fields: ctx, height, page, perPage, requestQuorumInfo -func (_m *SignClient) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { - ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) - - if len(ret) == 0 { - panic("no return value specified for Validators") - } - - var r0 *coretypes.ResultValidators - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { - return rf(ctx, height, page, perPage, requestQuorumInfo) - } - if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) *coretypes.ResultValidators); ok { - r0 = rf(ctx, height, page, perPage, requestQuorumInfo) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultValidators) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *int64, *int, *int, *bool) error); ok { - r1 = rf(ctx, height, page, perPage, requestQuorumInfo) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewSignClient creates a new instance of SignClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSignClient(t interface { - mock.TestingT - Cleanup(func()) -}) *SignClient { - mock := &SignClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/status_client.go b/rpc/client/mocks/status_client.go deleted file mode 100644 index 71f5a6f6a5..0000000000 --- a/rpc/client/mocks/status_client.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - mock "github.com/stretchr/testify/mock" -) - -// StatusClient is an autogenerated mock type for the StatusClient type -type StatusClient struct { - mock.Mock -} - -// Status provides a mock function with given fields: _a0 -func (_m *StatusClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Status") - } - - var r0 *coretypes.ResultStatus - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *coretypes.ResultStatus); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.ResultStatus) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewStatusClient creates a new instance of StatusClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStatusClient(t interface { - mock.TestingT - Cleanup(func()) -}) *StatusClient { - mock := &StatusClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/rpc/client/mocks/subscription_client.go b/rpc/client/mocks/subscription_client.go deleted file mode 100644 index 84095a2b03..0000000000 --- a/rpc/client/mocks/subscription_client.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - context "context" - - coretypes "github.com/dashpay/tenderdash/rpc/coretypes" - mock "github.com/stretchr/testify/mock" -) - -// SubscriptionClient is an autogenerated mock type for the SubscriptionClient type -type SubscriptionClient struct { - mock.Mock -} - -// Subscribe provides a mock function with given fields: ctx, subscriber, query, outCapacity -func (_m *SubscriptionClient) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) { - _va := make([]interface{}, len(outCapacity)) - for _i := range outCapacity { - _va[_i] = outCapacity[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, subscriber, query) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Subscribe") - } - - var r0 <-chan coretypes.ResultEvent - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { - return rf(ctx, subscriber, query, outCapacity...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) <-chan coretypes.ResultEvent); ok { - r0 = rf(ctx, subscriber, query, outCapacity...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan coretypes.ResultEvent) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, ...int) error); ok { - r1 = rf(ctx, subscriber, query, outCapacity...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Unsubscribe provides a mock function with given fields: ctx, subscriber, query -func (_m *SubscriptionClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { - ret := _m.Called(ctx, subscriber, query) - - if len(ret) == 0 { - panic("no return value specified for Unsubscribe") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, subscriber, query) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// UnsubscribeAll provides a mock function with given fields: ctx, subscriber -func (_m *SubscriptionClient) UnsubscribeAll(ctx context.Context, subscriber string) error { - ret := _m.Called(ctx, subscriber) - - if len(ret) == 0 { - panic("no return value specified for UnsubscribeAll") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, subscriber) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewSubscriptionClient creates a new instance of SubscriptionClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSubscriptionClient(t interface { - mock.TestingT - Cleanup(func()) -}) *SubscriptionClient { - mock := &SubscriptionClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/types/mocks/block_event_publisher.go b/types/mocks/block_event_publisher.go deleted file mode 100644 index 8f5c17f637..0000000000 --- a/types/mocks/block_event_publisher.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - types "github.com/dashpay/tenderdash/types" - mock "github.com/stretchr/testify/mock" -) - -// BlockEventPublisher is an autogenerated mock type for the BlockEventPublisher type -type BlockEventPublisher struct { - mock.Mock -} - -// PublishEventNewBlock provides a mock function with given fields: _a0 -func (_m *BlockEventPublisher) PublishEventNewBlock(_a0 types.EventDataNewBlock) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for PublishEventNewBlock") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.EventDataNewBlock) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// PublishEventNewBlockHeader provides a mock function with given fields: _a0 -func (_m *BlockEventPublisher) PublishEventNewBlockHeader(_a0 types.EventDataNewBlockHeader) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for PublishEventNewBlockHeader") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.EventDataNewBlockHeader) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// PublishEventNewEvidence provides a mock function with given fields: _a0 -func (_m *BlockEventPublisher) PublishEventNewEvidence(_a0 types.EventDataNewEvidence) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for PublishEventNewEvidence") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.EventDataNewEvidence) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// PublishEventTx provides a mock function with given fields: _a0 -func (_m *BlockEventPublisher) PublishEventTx(_a0 types.EventDataTx) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for PublishEventTx") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.EventDataTx) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// PublishEventValidatorSetUpdates provides a mock function with given fields: _a0 -func (_m *BlockEventPublisher) PublishEventValidatorSetUpdates(_a0 types.EventDataValidatorSetUpdate) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for PublishEventValidatorSetUpdates") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.EventDataValidatorSetUpdate) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewBlockEventPublisher creates a new instance of BlockEventPublisher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBlockEventPublisher(t interface { - mock.TestingT - Cleanup(func()) -}) *BlockEventPublisher { - mock := &BlockEventPublisher{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/types/mocks/blockeventpublisher.go b/types/mocks/blockeventpublisher.go new file mode 100644 index 0000000000..c94dac30fa --- /dev/null +++ b/types/mocks/blockeventpublisher.go @@ -0,0 +1,265 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + types "github.com/dashpay/tenderdash/types" + mock "github.com/stretchr/testify/mock" +) + +// BlockEventPublisher is an autogenerated mock type for the BlockEventPublisher type +type BlockEventPublisher struct { + mock.Mock +} + +type BlockEventPublisher_Expecter struct { + mock *mock.Mock +} + +func (_m *BlockEventPublisher) EXPECT() *BlockEventPublisher_Expecter { + return &BlockEventPublisher_Expecter{mock: &_m.Mock} +} + +// PublishEventNewBlock provides a mock function with given fields: _a0 +func (_m *BlockEventPublisher) PublishEventNewBlock(_a0 types.EventDataNewBlock) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for PublishEventNewBlock") + } + + var r0 error + if rf, ok := ret.Get(0).(func(types.EventDataNewBlock) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BlockEventPublisher_PublishEventNewBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventNewBlock' +type BlockEventPublisher_PublishEventNewBlock_Call struct { + *mock.Call +} + +// PublishEventNewBlock is a helper method to define mock.On call +// - _a0 types.EventDataNewBlock +func (_e *BlockEventPublisher_Expecter) PublishEventNewBlock(_a0 interface{}) *BlockEventPublisher_PublishEventNewBlock_Call { + return &BlockEventPublisher_PublishEventNewBlock_Call{Call: _e.mock.On("PublishEventNewBlock", _a0)} +} + +func (_c *BlockEventPublisher_PublishEventNewBlock_Call) Run(run func(_a0 types.EventDataNewBlock)) *BlockEventPublisher_PublishEventNewBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.EventDataNewBlock)) + }) + return _c +} + +func (_c *BlockEventPublisher_PublishEventNewBlock_Call) Return(_a0 error) *BlockEventPublisher_PublishEventNewBlock_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockEventPublisher_PublishEventNewBlock_Call) RunAndReturn(run func(types.EventDataNewBlock) error) *BlockEventPublisher_PublishEventNewBlock_Call { + _c.Call.Return(run) + return _c +} + +// PublishEventNewBlockHeader provides a mock function with given fields: _a0 +func (_m *BlockEventPublisher) PublishEventNewBlockHeader(_a0 types.EventDataNewBlockHeader) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for PublishEventNewBlockHeader") + } + + var r0 error + if rf, ok := ret.Get(0).(func(types.EventDataNewBlockHeader) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BlockEventPublisher_PublishEventNewBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventNewBlockHeader' +type BlockEventPublisher_PublishEventNewBlockHeader_Call struct { + *mock.Call +} + +// PublishEventNewBlockHeader is a helper method to define mock.On call +// - _a0 types.EventDataNewBlockHeader +func (_e *BlockEventPublisher_Expecter) PublishEventNewBlockHeader(_a0 interface{}) *BlockEventPublisher_PublishEventNewBlockHeader_Call { + return &BlockEventPublisher_PublishEventNewBlockHeader_Call{Call: _e.mock.On("PublishEventNewBlockHeader", _a0)} +} + +func (_c *BlockEventPublisher_PublishEventNewBlockHeader_Call) Run(run func(_a0 types.EventDataNewBlockHeader)) *BlockEventPublisher_PublishEventNewBlockHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.EventDataNewBlockHeader)) + }) + return _c +} + +func (_c *BlockEventPublisher_PublishEventNewBlockHeader_Call) Return(_a0 error) *BlockEventPublisher_PublishEventNewBlockHeader_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockEventPublisher_PublishEventNewBlockHeader_Call) RunAndReturn(run func(types.EventDataNewBlockHeader) error) *BlockEventPublisher_PublishEventNewBlockHeader_Call { + _c.Call.Return(run) + return _c +} + +// PublishEventNewEvidence provides a mock function with given fields: _a0 +func (_m *BlockEventPublisher) PublishEventNewEvidence(_a0 types.EventDataNewEvidence) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for PublishEventNewEvidence") + } + + var r0 error + if rf, ok := ret.Get(0).(func(types.EventDataNewEvidence) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BlockEventPublisher_PublishEventNewEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventNewEvidence' +type BlockEventPublisher_PublishEventNewEvidence_Call struct { + *mock.Call +} + +// PublishEventNewEvidence is a helper method to define mock.On call +// - _a0 types.EventDataNewEvidence +func (_e *BlockEventPublisher_Expecter) PublishEventNewEvidence(_a0 interface{}) *BlockEventPublisher_PublishEventNewEvidence_Call { + return &BlockEventPublisher_PublishEventNewEvidence_Call{Call: _e.mock.On("PublishEventNewEvidence", _a0)} +} + +func (_c *BlockEventPublisher_PublishEventNewEvidence_Call) Run(run func(_a0 types.EventDataNewEvidence)) *BlockEventPublisher_PublishEventNewEvidence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.EventDataNewEvidence)) + }) + return _c +} + +func (_c *BlockEventPublisher_PublishEventNewEvidence_Call) Return(_a0 error) *BlockEventPublisher_PublishEventNewEvidence_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockEventPublisher_PublishEventNewEvidence_Call) RunAndReturn(run func(types.EventDataNewEvidence) error) *BlockEventPublisher_PublishEventNewEvidence_Call { + _c.Call.Return(run) + return _c +} + +// PublishEventTx provides a mock function with given fields: _a0 +func (_m *BlockEventPublisher) PublishEventTx(_a0 types.EventDataTx) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for PublishEventTx") + } + + var r0 error + if rf, ok := ret.Get(0).(func(types.EventDataTx) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BlockEventPublisher_PublishEventTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventTx' +type BlockEventPublisher_PublishEventTx_Call struct { + *mock.Call +} + +// PublishEventTx is a helper method to define mock.On call +// - _a0 types.EventDataTx +func (_e *BlockEventPublisher_Expecter) PublishEventTx(_a0 interface{}) *BlockEventPublisher_PublishEventTx_Call { + return &BlockEventPublisher_PublishEventTx_Call{Call: _e.mock.On("PublishEventTx", _a0)} +} + +func (_c *BlockEventPublisher_PublishEventTx_Call) Run(run func(_a0 types.EventDataTx)) *BlockEventPublisher_PublishEventTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.EventDataTx)) + }) + return _c +} + +func (_c *BlockEventPublisher_PublishEventTx_Call) Return(_a0 error) *BlockEventPublisher_PublishEventTx_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockEventPublisher_PublishEventTx_Call) RunAndReturn(run func(types.EventDataTx) error) *BlockEventPublisher_PublishEventTx_Call { + _c.Call.Return(run) + return _c +} + +// PublishEventValidatorSetUpdates provides a mock function with given fields: _a0 +func (_m *BlockEventPublisher) PublishEventValidatorSetUpdates(_a0 types.EventDataValidatorSetUpdate) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for PublishEventValidatorSetUpdates") + } + + var r0 error + if rf, ok := ret.Get(0).(func(types.EventDataValidatorSetUpdate) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BlockEventPublisher_PublishEventValidatorSetUpdates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventValidatorSetUpdates' +type BlockEventPublisher_PublishEventValidatorSetUpdates_Call struct { + *mock.Call +} + +// PublishEventValidatorSetUpdates is a helper method to define mock.On call +// - _a0 types.EventDataValidatorSetUpdate +func (_e *BlockEventPublisher_Expecter) PublishEventValidatorSetUpdates(_a0 interface{}) *BlockEventPublisher_PublishEventValidatorSetUpdates_Call { + return &BlockEventPublisher_PublishEventValidatorSetUpdates_Call{Call: _e.mock.On("PublishEventValidatorSetUpdates", _a0)} +} + +func (_c *BlockEventPublisher_PublishEventValidatorSetUpdates_Call) Run(run func(_a0 types.EventDataValidatorSetUpdate)) *BlockEventPublisher_PublishEventValidatorSetUpdates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.EventDataValidatorSetUpdate)) + }) + return _c +} + +func (_c *BlockEventPublisher_PublishEventValidatorSetUpdates_Call) Return(_a0 error) *BlockEventPublisher_PublishEventValidatorSetUpdates_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BlockEventPublisher_PublishEventValidatorSetUpdates_Call) RunAndReturn(run func(types.EventDataValidatorSetUpdate) error) *BlockEventPublisher_PublishEventValidatorSetUpdates_Call { + _c.Call.Return(run) + return _c +} + +// NewBlockEventPublisher creates a new instance of BlockEventPublisher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBlockEventPublisher(t interface { + mock.TestingT + Cleanup(func()) +}) *BlockEventPublisher { + mock := &BlockEventPublisher{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/types/mocks/priv_validator.go b/types/mocks/priv_validator.go deleted file mode 100644 index 4fff072e51..0000000000 --- a/types/mocks/priv_validator.go +++ /dev/null @@ -1,290 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks - -import ( - btcjson "github.com/dashpay/dashd-go/btcjson" - bytes "github.com/dashpay/tenderdash/libs/bytes" - - context "context" - - crypto "github.com/dashpay/tenderdash/crypto" - - log "github.com/dashpay/tenderdash/libs/log" - - mock "github.com/stretchr/testify/mock" - - tenderminttypes "github.com/dashpay/tenderdash/proto/tendermint/types" - - types "github.com/dashpay/tenderdash/types" -) - -// PrivValidator is an autogenerated mock type for the PrivValidator type -type PrivValidator struct { - mock.Mock -} - -// ExtractIntoValidator provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash bytes.HexBytes) *types.Validator { - ret := _m.Called(ctx, quorumHash) - - if len(ret) == 0 { - panic("no return value specified for ExtractIntoValidator") - } - - var r0 *types.Validator - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *types.Validator); ok { - r0 = rf(ctx, quorumHash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Validator) - } - } - - return r0 -} - -// GetFirstQuorumHash provides a mock function with given fields: _a0 -func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetFirstQuorumHash") - } - - var r0 bytes.HexBytes - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) bytes.HexBytes); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(bytes.HexBytes) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetHeight provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexBytes) (int64, error) { - ret := _m.Called(ctx, quorumHash) - - if len(ret) == 0 { - panic("no return value specified for GetHeight") - } - - var r0 int64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (int64, error)); ok { - return rf(ctx, quorumHash) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) int64); ok { - r0 = rf(ctx, quorumHash) - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { - r1 = rf(ctx, quorumHash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPrivateKey provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PrivKey, error) { - ret := _m.Called(ctx, quorumHash) - - if len(ret) == 0 { - panic("no return value specified for GetPrivateKey") - } - - var r0 crypto.PrivKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PrivKey, error)); ok { - return rf(ctx, quorumHash) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PrivKey); ok { - r0 = rf(ctx, quorumHash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.PrivKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { - r1 = rf(ctx, quorumHash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetProTxHash provides a mock function with given fields: _a0 -func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetProTxHash") - } - - var r0 bytes.HexBytes - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) bytes.HexBytes); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(bytes.HexBytes) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPubKey provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { - ret := _m.Called(ctx, quorumHash) - - if len(ret) == 0 { - panic("no return value specified for GetPubKey") - } - - var r0 crypto.PubKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { - return rf(ctx, quorumHash) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PubKey); ok { - r0 = rf(ctx, quorumHash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.PubKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { - r1 = rf(ctx, quorumHash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetThresholdPublicKey provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { - ret := _m.Called(ctx, quorumHash) - - if len(ret) == 0 { - panic("no return value specified for GetThresholdPublicKey") - } - - var r0 crypto.PubKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { - return rf(ctx, quorumHash) - } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PubKey); ok { - r0 = rf(ctx, quorumHash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.PubKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { - r1 = rf(ctx, quorumHash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SignProposal provides a mock function with given fields: ctx, chainID, quorumType, quorumHash, proposal -func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, proposal *tenderminttypes.Proposal) (bytes.HexBytes, error) { - ret := _m.Called(ctx, chainID, quorumType, quorumHash, proposal) - - if len(ret) == 0 { - panic("no return value specified for SignProposal") - } - - var r0 bytes.HexBytes - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) (bytes.HexBytes, error)); ok { - return rf(ctx, chainID, quorumType, quorumHash, proposal) - } - if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) bytes.HexBytes); ok { - r0 = rf(ctx, chainID, quorumType, quorumHash, proposal) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(bytes.HexBytes) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) error); ok { - r1 = rf(ctx, chainID, quorumType, quorumHash, proposal) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SignVote provides a mock function with given fields: ctx, chainID, quorumType, quorumHash, vote, logger -func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, vote *tenderminttypes.Vote, logger log.Logger) error { - ret := _m.Called(ctx, chainID, quorumType, quorumHash, vote, logger) - - if len(ret) == 0 { - panic("no return value specified for SignVote") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Vote, log.Logger) error); ok { - r0 = rf(ctx, chainID, quorumType, quorumHash, vote, logger) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// UpdatePrivateKey provides a mock function with given fields: ctx, privateKey, quorumHash, thresholdPublicKey, height -func (_m *PrivValidator) UpdatePrivateKey(ctx context.Context, privateKey crypto.PrivKey, quorumHash bytes.HexBytes, thresholdPublicKey crypto.PubKey, height int64) { - _m.Called(ctx, privateKey, quorumHash, thresholdPublicKey, height) -} - -// NewPrivValidator creates a new instance of PrivValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPrivValidator(t interface { - mock.TestingT - Cleanup(func()) -}) *PrivValidator { - mock := &PrivValidator{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/types/mocks/privvalidator.go b/types/mocks/privvalidator.go new file mode 100644 index 0000000000..ab43f2c703 --- /dev/null +++ b/types/mocks/privvalidator.go @@ -0,0 +1,596 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + btcjson "github.com/dashpay/dashd-go/btcjson" + bytes "github.com/dashpay/tenderdash/libs/bytes" + + context "context" + + crypto "github.com/dashpay/tenderdash/crypto" + + log "github.com/dashpay/tenderdash/libs/log" + + mock "github.com/stretchr/testify/mock" + + tenderminttypes "github.com/dashpay/tenderdash/proto/tendermint/types" + + types "github.com/dashpay/tenderdash/types" +) + +// PrivValidator is an autogenerated mock type for the PrivValidator type +type PrivValidator struct { + mock.Mock +} + +type PrivValidator_Expecter struct { + mock *mock.Mock +} + +func (_m *PrivValidator) EXPECT() *PrivValidator_Expecter { + return &PrivValidator_Expecter{mock: &_m.Mock} +} + +// ExtractIntoValidator provides a mock function with given fields: ctx, quorumHash +func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash bytes.HexBytes) *types.Validator { + ret := _m.Called(ctx, quorumHash) + + if len(ret) == 0 { + panic("no return value specified for ExtractIntoValidator") + } + + var r0 *types.Validator + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *types.Validator); ok { + r0 = rf(ctx, quorumHash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Validator) + } + } + + return r0 +} + +// PrivValidator_ExtractIntoValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtractIntoValidator' +type PrivValidator_ExtractIntoValidator_Call struct { + *mock.Call +} + +// ExtractIntoValidator is a helper method to define mock.On call +// - ctx context.Context +// - quorumHash bytes.HexBytes +func (_e *PrivValidator_Expecter) ExtractIntoValidator(ctx interface{}, quorumHash interface{}) *PrivValidator_ExtractIntoValidator_Call { + return &PrivValidator_ExtractIntoValidator_Call{Call: _e.mock.On("ExtractIntoValidator", ctx, quorumHash)} +} + +func (_c *PrivValidator_ExtractIntoValidator_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_ExtractIntoValidator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *PrivValidator_ExtractIntoValidator_Call) Return(_a0 *types.Validator) *PrivValidator_ExtractIntoValidator_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PrivValidator_ExtractIntoValidator_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) *types.Validator) *PrivValidator_ExtractIntoValidator_Call { + _c.Call.Return(run) + return _c +} + +// GetFirstQuorumHash provides a mock function with given fields: _a0 +func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetFirstQuorumHash") + } + + var r0 bytes.HexBytes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) bytes.HexBytes); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(bytes.HexBytes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PrivValidator_GetFirstQuorumHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFirstQuorumHash' +type PrivValidator_GetFirstQuorumHash_Call struct { + *mock.Call +} + +// GetFirstQuorumHash is a helper method to define mock.On call +// - _a0 context.Context +func (_e *PrivValidator_Expecter) GetFirstQuorumHash(_a0 interface{}) *PrivValidator_GetFirstQuorumHash_Call { + return &PrivValidator_GetFirstQuorumHash_Call{Call: _e.mock.On("GetFirstQuorumHash", _a0)} +} + +func (_c *PrivValidator_GetFirstQuorumHash_Call) Run(run func(_a0 context.Context)) *PrivValidator_GetFirstQuorumHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *PrivValidator_GetFirstQuorumHash_Call) Return(_a0 bytes.HexBytes, _a1 error) *PrivValidator_GetFirstQuorumHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_GetFirstQuorumHash_Call) RunAndReturn(run func(context.Context) (bytes.HexBytes, error)) *PrivValidator_GetFirstQuorumHash_Call { + _c.Call.Return(run) + return _c +} + +// GetHeight provides a mock function with given fields: ctx, quorumHash +func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexBytes) (int64, error) { + ret := _m.Called(ctx, quorumHash) + + if len(ret) == 0 { + panic("no return value specified for GetHeight") + } + + var r0 int64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (int64, error)); ok { + return rf(ctx, quorumHash) + } + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) int64); ok { + r0 = rf(ctx, quorumHash) + } else { + r0 = ret.Get(0).(int64) + } + + if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + r1 = rf(ctx, quorumHash) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PrivValidator_GetHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHeight' +type PrivValidator_GetHeight_Call struct { + *mock.Call +} + +// GetHeight is a helper method to define mock.On call +// - ctx context.Context +// - quorumHash bytes.HexBytes +func (_e *PrivValidator_Expecter) GetHeight(ctx interface{}, quorumHash interface{}) *PrivValidator_GetHeight_Call { + return &PrivValidator_GetHeight_Call{Call: _e.mock.On("GetHeight", ctx, quorumHash)} +} + +func (_c *PrivValidator_GetHeight_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_GetHeight_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *PrivValidator_GetHeight_Call) Return(_a0 int64, _a1 error) *PrivValidator_GetHeight_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_GetHeight_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (int64, error)) *PrivValidator_GetHeight_Call { + _c.Call.Return(run) + return _c +} + +// GetPrivateKey provides a mock function with given fields: ctx, quorumHash +func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PrivKey, error) { + ret := _m.Called(ctx, quorumHash) + + if len(ret) == 0 { + panic("no return value specified for GetPrivateKey") + } + + var r0 crypto.PrivKey + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PrivKey, error)); ok { + return rf(ctx, quorumHash) + } + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PrivKey); ok { + r0 = rf(ctx, quorumHash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(crypto.PrivKey) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + r1 = rf(ctx, quorumHash) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PrivValidator_GetPrivateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrivateKey' +type PrivValidator_GetPrivateKey_Call struct { + *mock.Call +} + +// GetPrivateKey is a helper method to define mock.On call +// - ctx context.Context +// - quorumHash bytes.HexBytes +func (_e *PrivValidator_Expecter) GetPrivateKey(ctx interface{}, quorumHash interface{}) *PrivValidator_GetPrivateKey_Call { + return &PrivValidator_GetPrivateKey_Call{Call: _e.mock.On("GetPrivateKey", ctx, quorumHash)} +} + +func (_c *PrivValidator_GetPrivateKey_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_GetPrivateKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *PrivValidator_GetPrivateKey_Call) Return(_a0 crypto.PrivKey, _a1 error) *PrivValidator_GetPrivateKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_GetPrivateKey_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (crypto.PrivKey, error)) *PrivValidator_GetPrivateKey_Call { + _c.Call.Return(run) + return _c +} + +// GetProTxHash provides a mock function with given fields: _a0 +func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetProTxHash") + } + + var r0 bytes.HexBytes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(context.Context) bytes.HexBytes); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(bytes.HexBytes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PrivValidator_GetProTxHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProTxHash' +type PrivValidator_GetProTxHash_Call struct { + *mock.Call +} + +// GetProTxHash is a helper method to define mock.On call +// - _a0 context.Context +func (_e *PrivValidator_Expecter) GetProTxHash(_a0 interface{}) *PrivValidator_GetProTxHash_Call { + return &PrivValidator_GetProTxHash_Call{Call: _e.mock.On("GetProTxHash", _a0)} +} + +func (_c *PrivValidator_GetProTxHash_Call) Run(run func(_a0 context.Context)) *PrivValidator_GetProTxHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *PrivValidator_GetProTxHash_Call) Return(_a0 bytes.HexBytes, _a1 error) *PrivValidator_GetProTxHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_GetProTxHash_Call) RunAndReturn(run func(context.Context) (bytes.HexBytes, error)) *PrivValidator_GetProTxHash_Call { + _c.Call.Return(run) + return _c +} + +// GetPubKey provides a mock function with given fields: ctx, quorumHash +func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { + ret := _m.Called(ctx, quorumHash) + + if len(ret) == 0 { + panic("no return value specified for GetPubKey") + } + + var r0 crypto.PubKey + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { + return rf(ctx, quorumHash) + } + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PubKey); ok { + r0 = rf(ctx, quorumHash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(crypto.PubKey) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + r1 = rf(ctx, quorumHash) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PrivValidator_GetPubKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPubKey' +type PrivValidator_GetPubKey_Call struct { + *mock.Call +} + +// GetPubKey is a helper method to define mock.On call +// - ctx context.Context +// - quorumHash bytes.HexBytes +func (_e *PrivValidator_Expecter) GetPubKey(ctx interface{}, quorumHash interface{}) *PrivValidator_GetPubKey_Call { + return &PrivValidator_GetPubKey_Call{Call: _e.mock.On("GetPubKey", ctx, quorumHash)} +} + +func (_c *PrivValidator_GetPubKey_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_GetPubKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *PrivValidator_GetPubKey_Call) Return(_a0 crypto.PubKey, _a1 error) *PrivValidator_GetPubKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_GetPubKey_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (crypto.PubKey, error)) *PrivValidator_GetPubKey_Call { + _c.Call.Return(run) + return _c +} + +// GetThresholdPublicKey provides a mock function with given fields: ctx, quorumHash +func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { + ret := _m.Called(ctx, quorumHash) + + if len(ret) == 0 { + panic("no return value specified for GetThresholdPublicKey") + } + + var r0 crypto.PubKey + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { + return rf(ctx, quorumHash) + } + if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PubKey); ok { + r0 = rf(ctx, quorumHash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(crypto.PubKey) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + r1 = rf(ctx, quorumHash) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PrivValidator_GetThresholdPublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetThresholdPublicKey' +type PrivValidator_GetThresholdPublicKey_Call struct { + *mock.Call +} + +// GetThresholdPublicKey is a helper method to define mock.On call +// - ctx context.Context +// - quorumHash bytes.HexBytes +func (_e *PrivValidator_Expecter) GetThresholdPublicKey(ctx interface{}, quorumHash interface{}) *PrivValidator_GetThresholdPublicKey_Call { + return &PrivValidator_GetThresholdPublicKey_Call{Call: _e.mock.On("GetThresholdPublicKey", ctx, quorumHash)} +} + +func (_c *PrivValidator_GetThresholdPublicKey_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_GetThresholdPublicKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bytes.HexBytes)) + }) + return _c +} + +func (_c *PrivValidator_GetThresholdPublicKey_Call) Return(_a0 crypto.PubKey, _a1 error) *PrivValidator_GetThresholdPublicKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_GetThresholdPublicKey_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (crypto.PubKey, error)) *PrivValidator_GetThresholdPublicKey_Call { + _c.Call.Return(run) + return _c +} + +// SignProposal provides a mock function with given fields: ctx, chainID, quorumType, quorumHash, proposal +func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, proposal *tenderminttypes.Proposal) (bytes.HexBytes, error) { + ret := _m.Called(ctx, chainID, quorumType, quorumHash, proposal) + + if len(ret) == 0 { + panic("no return value specified for SignProposal") + } + + var r0 bytes.HexBytes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) (bytes.HexBytes, error)); ok { + return rf(ctx, chainID, quorumType, quorumHash, proposal) + } + if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) bytes.HexBytes); ok { + r0 = rf(ctx, chainID, quorumType, quorumHash, proposal) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(bytes.HexBytes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) error); ok { + r1 = rf(ctx, chainID, quorumType, quorumHash, proposal) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PrivValidator_SignProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignProposal' +type PrivValidator_SignProposal_Call struct { + *mock.Call +} + +// SignProposal is a helper method to define mock.On call +// - ctx context.Context +// - chainID string +// - quorumType btcjson.LLMQType +// - quorumHash bytes.HexBytes +// - proposal *tenderminttypes.Proposal +func (_e *PrivValidator_Expecter) SignProposal(ctx interface{}, chainID interface{}, quorumType interface{}, quorumHash interface{}, proposal interface{}) *PrivValidator_SignProposal_Call { + return &PrivValidator_SignProposal_Call{Call: _e.mock.On("SignProposal", ctx, chainID, quorumType, quorumHash, proposal)} +} + +func (_c *PrivValidator_SignProposal_Call) Run(run func(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, proposal *tenderminttypes.Proposal)) *PrivValidator_SignProposal_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(btcjson.LLMQType), args[3].(bytes.HexBytes), args[4].(*tenderminttypes.Proposal)) + }) + return _c +} + +func (_c *PrivValidator_SignProposal_Call) Return(_a0 bytes.HexBytes, _a1 error) *PrivValidator_SignProposal_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_SignProposal_Call) RunAndReturn(run func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) (bytes.HexBytes, error)) *PrivValidator_SignProposal_Call { + _c.Call.Return(run) + return _c +} + +// SignVote provides a mock function with given fields: ctx, chainID, quorumType, quorumHash, vote, logger +func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, vote *tenderminttypes.Vote, logger log.Logger) error { + ret := _m.Called(ctx, chainID, quorumType, quorumHash, vote, logger) + + if len(ret) == 0 { + panic("no return value specified for SignVote") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Vote, log.Logger) error); ok { + r0 = rf(ctx, chainID, quorumType, quorumHash, vote, logger) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// PrivValidator_SignVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignVote' +type PrivValidator_SignVote_Call struct { + *mock.Call +} + +// SignVote is a helper method to define mock.On call +// - ctx context.Context +// - chainID string +// - quorumType btcjson.LLMQType +// - quorumHash bytes.HexBytes +// - vote *tenderminttypes.Vote +// - logger log.Logger +func (_e *PrivValidator_Expecter) SignVote(ctx interface{}, chainID interface{}, quorumType interface{}, quorumHash interface{}, vote interface{}, logger interface{}) *PrivValidator_SignVote_Call { + return &PrivValidator_SignVote_Call{Call: _e.mock.On("SignVote", ctx, chainID, quorumType, quorumHash, vote, logger)} +} + +func (_c *PrivValidator_SignVote_Call) Run(run func(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, vote *tenderminttypes.Vote, logger log.Logger)) *PrivValidator_SignVote_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(btcjson.LLMQType), args[3].(bytes.HexBytes), args[4].(*tenderminttypes.Vote), args[5].(log.Logger)) + }) + return _c +} + +func (_c *PrivValidator_SignVote_Call) Return(_a0 error) *PrivValidator_SignVote_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PrivValidator_SignVote_Call) RunAndReturn(run func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Vote, log.Logger) error) *PrivValidator_SignVote_Call { + _c.Call.Return(run) + return _c +} + +// UpdatePrivateKey provides a mock function with given fields: ctx, privateKey, quorumHash, thresholdPublicKey, height +func (_m *PrivValidator) UpdatePrivateKey(ctx context.Context, privateKey crypto.PrivKey, quorumHash bytes.HexBytes, thresholdPublicKey crypto.PubKey, height int64) { + _m.Called(ctx, privateKey, quorumHash, thresholdPublicKey, height) +} + +// PrivValidator_UpdatePrivateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePrivateKey' +type PrivValidator_UpdatePrivateKey_Call struct { + *mock.Call +} + +// UpdatePrivateKey is a helper method to define mock.On call +// - ctx context.Context +// - privateKey crypto.PrivKey +// - quorumHash bytes.HexBytes +// - thresholdPublicKey crypto.PubKey +// - height int64 +func (_e *PrivValidator_Expecter) UpdatePrivateKey(ctx interface{}, privateKey interface{}, quorumHash interface{}, thresholdPublicKey interface{}, height interface{}) *PrivValidator_UpdatePrivateKey_Call { + return &PrivValidator_UpdatePrivateKey_Call{Call: _e.mock.On("UpdatePrivateKey", ctx, privateKey, quorumHash, thresholdPublicKey, height)} +} + +func (_c *PrivValidator_UpdatePrivateKey_Call) Run(run func(ctx context.Context, privateKey crypto.PrivKey, quorumHash bytes.HexBytes, thresholdPublicKey crypto.PubKey, height int64)) *PrivValidator_UpdatePrivateKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(crypto.PrivKey), args[2].(bytes.HexBytes), args[3].(crypto.PubKey), args[4].(int64)) + }) + return _c +} + +func (_c *PrivValidator_UpdatePrivateKey_Call) Return() *PrivValidator_UpdatePrivateKey_Call { + _c.Call.Return() + return _c +} + +func (_c *PrivValidator_UpdatePrivateKey_Call) RunAndReturn(run func(context.Context, crypto.PrivKey, bytes.HexBytes, crypto.PubKey, int64)) *PrivValidator_UpdatePrivateKey_Call { + _c.Call.Return(run) + return _c +} + +// NewPrivValidator creates a new instance of PrivValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewPrivValidator(t interface { + mock.TestingT + Cleanup(func()) +}) *PrivValidator { + mock := &PrivValidator{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} From 2416140a2a609cc2b0568ea2fa587e7c0a01b37f Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:05:31 +0200 Subject: [PATCH 12/16] chore: no expecters --- .mockery.yaml | 3 +- abci/client/mocks/client.go | 551 --------- abci/types/mocks/application.go | 385 ------ dash/core/mocks/client.go | 236 ---- internal/consensus/mocks/gossiper.go | 188 --- .../selectproposer/mocks/proposerselector.go | 149 --- internal/evidence/mocks/blockstore.go | 118 -- internal/mempool/mocks/mempool.go | 375 ------ internal/p2p/client/mocks/blockclient.go | 95 -- internal/p2p/client/mocks/snapshotclient.go | 129 -- internal/p2p/mocks/channel.go | 148 --- internal/p2p/mocks/connection.go | 205 --- internal/p2p/mocks/transport.go | 229 ---- internal/state/indexer/mocks/eventsink.go | 232 ---- internal/state/mocks/blockstore.go | 425 ------- internal/state/mocks/evidencepool.go | 124 -- internal/state/mocks/executor.go | 258 ---- internal/state/mocks/store.go | 256 ++++ internal/statesync/mocks/stateprovider.go | 95 -- libs/store/mocks/store.go | 267 ---- light/provider/mocks/provider.go | 93 -- light/rpc/mocks/lightclient.go | 150 --- rpc/client/mocks/client.go | 1069 ---------------- rpc/client/mocks/remoteclient.go | 1096 ----------------- types/mocks/blockeventpublisher.go | 148 --- types/mocks/privvalidator.go | 306 ----- 26 files changed, 258 insertions(+), 7072 deletions(-) create mode 100644 internal/state/mocks/store.go diff --git a/.mockery.yaml b/.mockery.yaml index 5156d7dbb6..80776dad4b 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -1,5 +1,5 @@ --- -with-expecter: true +with-expecter: false dir: "{{.InterfaceDir}}/mocks" mockname: "{{.InterfaceName}}" outpkg: "mocks" @@ -44,6 +44,7 @@ packages: BlockStore: EvidencePool: Executor: + Store: github.com/dashpay/tenderdash/internal/state/indexer: interfaces: EventSink: diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index a639902562..433a0cb60d 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -14,14 +14,6 @@ type Client struct { mock.Mock } -type Client_Expecter struct { - mock *mock.Mock -} - -func (_m *Client) EXPECT() *Client_Expecter { - return &Client_Expecter{mock: &_m.Mock} -} - // ApplySnapshotChunk provides a mock function with given fields: _a0, _a1 func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) @@ -52,35 +44,6 @@ func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestAppl return r0, r1 } -// Client_ApplySnapshotChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplySnapshotChunk' -type Client_ApplySnapshotChunk_Call struct { - *mock.Call -} - -// ApplySnapshotChunk is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestApplySnapshotChunk -func (_e *Client_Expecter) ApplySnapshotChunk(_a0 interface{}, _a1 interface{}) *Client_ApplySnapshotChunk_Call { - return &Client_ApplySnapshotChunk_Call{Call: _e.mock.On("ApplySnapshotChunk", _a0, _a1)} -} - -func (_c *Client_ApplySnapshotChunk_Call) Run(run func(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk)) *Client_ApplySnapshotChunk_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestApplySnapshotChunk)) - }) - return _c -} - -func (_c *Client_ApplySnapshotChunk_Call) Return(_a0 *types.ResponseApplySnapshotChunk, _a1 error) *Client_ApplySnapshotChunk_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ApplySnapshotChunk_Call) RunAndReturn(run func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)) *Client_ApplySnapshotChunk_Call { - _c.Call.Return(run) - return _c -} - // CheckTx provides a mock function with given fields: _a0, _a1 func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) @@ -111,35 +74,6 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*type return r0, r1 } -// Client_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' -type Client_CheckTx_Call struct { - *mock.Call -} - -// CheckTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestCheckTx -func (_e *Client_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *Client_CheckTx_Call { - return &Client_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} -} - -func (_c *Client_CheckTx_Call) Run(run func(_a0 context.Context, _a1 *types.RequestCheckTx)) *Client_CheckTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestCheckTx)) - }) - return _c -} - -func (_c *Client_CheckTx_Call) Return(_a0 *types.ResponseCheckTx, _a1 error) *Client_CheckTx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_CheckTx_Call) RunAndReturn(run func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)) *Client_CheckTx_Call { - _c.Call.Return(run) - return _c -} - // Echo provides a mock function with given fields: _a0, _a1 func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) { ret := _m.Called(_a0, _a1) @@ -170,35 +104,6 @@ func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, er return r0, r1 } -// Client_Echo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Echo' -type Client_Echo_Call struct { - *mock.Call -} - -// Echo is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 string -func (_e *Client_Expecter) Echo(_a0 interface{}, _a1 interface{}) *Client_Echo_Call { - return &Client_Echo_Call{Call: _e.mock.On("Echo", _a0, _a1)} -} - -func (_c *Client_Echo_Call) Run(run func(_a0 context.Context, _a1 string)) *Client_Echo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *Client_Echo_Call) Return(_a0 *types.ResponseEcho, _a1 error) *Client_Echo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Echo_Call) RunAndReturn(run func(context.Context, string) (*types.ResponseEcho, error)) *Client_Echo_Call { - _c.Call.Return(run) - return _c -} - // Error provides a mock function with given fields: func (_m *Client) Error() error { ret := _m.Called() @@ -217,33 +122,6 @@ func (_m *Client) Error() error { return r0 } -// Client_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error' -type Client_Error_Call struct { - *mock.Call -} - -// Error is a helper method to define mock.On call -func (_e *Client_Expecter) Error() *Client_Error_Call { - return &Client_Error_Call{Call: _e.mock.On("Error")} -} - -func (_c *Client_Error_Call) Run(run func()) *Client_Error_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Error_Call) Return(_a0 error) *Client_Error_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Error_Call) RunAndReturn(run func() error) *Client_Error_Call { - _c.Call.Return(run) - return _c -} - // ExtendVote provides a mock function with given fields: _a0, _a1 func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) @@ -274,35 +152,6 @@ func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) return r0, r1 } -// Client_ExtendVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendVote' -type Client_ExtendVote_Call struct { - *mock.Call -} - -// ExtendVote is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestExtendVote -func (_e *Client_Expecter) ExtendVote(_a0 interface{}, _a1 interface{}) *Client_ExtendVote_Call { - return &Client_ExtendVote_Call{Call: _e.mock.On("ExtendVote", _a0, _a1)} -} - -func (_c *Client_ExtendVote_Call) Run(run func(_a0 context.Context, _a1 *types.RequestExtendVote)) *Client_ExtendVote_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestExtendVote)) - }) - return _c -} - -func (_c *Client_ExtendVote_Call) Return(_a0 *types.ResponseExtendVote, _a1 error) *Client_ExtendVote_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ExtendVote_Call) RunAndReturn(run func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)) *Client_ExtendVote_Call { - _c.Call.Return(run) - return _c -} - // FinalizeBlock provides a mock function with given fields: _a0, _a1 func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) @@ -333,35 +182,6 @@ func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeB return r0, r1 } -// Client_FinalizeBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalizeBlock' -type Client_FinalizeBlock_Call struct { - *mock.Call -} - -// FinalizeBlock is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestFinalizeBlock -func (_e *Client_Expecter) FinalizeBlock(_a0 interface{}, _a1 interface{}) *Client_FinalizeBlock_Call { - return &Client_FinalizeBlock_Call{Call: _e.mock.On("FinalizeBlock", _a0, _a1)} -} - -func (_c *Client_FinalizeBlock_Call) Run(run func(_a0 context.Context, _a1 *types.RequestFinalizeBlock)) *Client_FinalizeBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestFinalizeBlock)) - }) - return _c -} - -func (_c *Client_FinalizeBlock_Call) Return(_a0 *types.ResponseFinalizeBlock, _a1 error) *Client_FinalizeBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_FinalizeBlock_Call) RunAndReturn(run func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)) *Client_FinalizeBlock_Call { - _c.Call.Return(run) - return _c -} - // Flush provides a mock function with given fields: _a0 func (_m *Client) Flush(_a0 context.Context) error { ret := _m.Called(_a0) @@ -380,34 +200,6 @@ func (_m *Client) Flush(_a0 context.Context) error { return r0 } -// Client_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush' -type Client_Flush_Call struct { - *mock.Call -} - -// Flush is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) Flush(_a0 interface{}) *Client_Flush_Call { - return &Client_Flush_Call{Call: _e.mock.On("Flush", _a0)} -} - -func (_c *Client_Flush_Call) Run(run func(_a0 context.Context)) *Client_Flush_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_Flush_Call) Return(_a0 error) *Client_Flush_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Flush_Call) RunAndReturn(run func(context.Context) error) *Client_Flush_Call { - _c.Call.Return(run) - return _c -} - // Info provides a mock function with given fields: _a0, _a1 func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) @@ -438,35 +230,6 @@ func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.Resp return r0, r1 } -// Client_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info' -type Client_Info_Call struct { - *mock.Call -} - -// Info is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestInfo -func (_e *Client_Expecter) Info(_a0 interface{}, _a1 interface{}) *Client_Info_Call { - return &Client_Info_Call{Call: _e.mock.On("Info", _a0, _a1)} -} - -func (_c *Client_Info_Call) Run(run func(_a0 context.Context, _a1 *types.RequestInfo)) *Client_Info_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestInfo)) - }) - return _c -} - -func (_c *Client_Info_Call) Return(_a0 *types.ResponseInfo, _a1 error) *Client_Info_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Info_Call) RunAndReturn(run func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)) *Client_Info_Call { - _c.Call.Return(run) - return _c -} - // InitChain provides a mock function with given fields: _a0, _a1 func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) @@ -497,35 +260,6 @@ func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (* return r0, r1 } -// Client_InitChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitChain' -type Client_InitChain_Call struct { - *mock.Call -} - -// InitChain is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestInitChain -func (_e *Client_Expecter) InitChain(_a0 interface{}, _a1 interface{}) *Client_InitChain_Call { - return &Client_InitChain_Call{Call: _e.mock.On("InitChain", _a0, _a1)} -} - -func (_c *Client_InitChain_Call) Run(run func(_a0 context.Context, _a1 *types.RequestInitChain)) *Client_InitChain_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestInitChain)) - }) - return _c -} - -func (_c *Client_InitChain_Call) Return(_a0 *types.ResponseInitChain, _a1 error) *Client_InitChain_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_InitChain_Call) RunAndReturn(run func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)) *Client_InitChain_Call { - _c.Call.Return(run) - return _c -} - // IsRunning provides a mock function with given fields: func (_m *Client) IsRunning() bool { ret := _m.Called() @@ -544,33 +278,6 @@ func (_m *Client) IsRunning() bool { return r0 } -// Client_IsRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRunning' -type Client_IsRunning_Call struct { - *mock.Call -} - -// IsRunning is a helper method to define mock.On call -func (_e *Client_Expecter) IsRunning() *Client_IsRunning_Call { - return &Client_IsRunning_Call{Call: _e.mock.On("IsRunning")} -} - -func (_c *Client_IsRunning_Call) Run(run func()) *Client_IsRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_IsRunning_Call) Return(_a0 bool) *Client_IsRunning_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_IsRunning_Call) RunAndReturn(run func() bool) *Client_IsRunning_Call { - _c.Call.Return(run) - return _c -} - // ListSnapshots provides a mock function with given fields: _a0, _a1 func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) @@ -601,35 +308,6 @@ func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnaps return r0, r1 } -// Client_ListSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSnapshots' -type Client_ListSnapshots_Call struct { - *mock.Call -} - -// ListSnapshots is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestListSnapshots -func (_e *Client_Expecter) ListSnapshots(_a0 interface{}, _a1 interface{}) *Client_ListSnapshots_Call { - return &Client_ListSnapshots_Call{Call: _e.mock.On("ListSnapshots", _a0, _a1)} -} - -func (_c *Client_ListSnapshots_Call) Run(run func(_a0 context.Context, _a1 *types.RequestListSnapshots)) *Client_ListSnapshots_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestListSnapshots)) - }) - return _c -} - -func (_c *Client_ListSnapshots_Call) Return(_a0 *types.ResponseListSnapshots, _a1 error) *Client_ListSnapshots_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ListSnapshots_Call) RunAndReturn(run func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)) *Client_ListSnapshots_Call { - _c.Call.Return(run) - return _c -} - // LoadSnapshotChunk provides a mock function with given fields: _a0, _a1 func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) @@ -660,35 +338,6 @@ func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadS return r0, r1 } -// Client_LoadSnapshotChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSnapshotChunk' -type Client_LoadSnapshotChunk_Call struct { - *mock.Call -} - -// LoadSnapshotChunk is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestLoadSnapshotChunk -func (_e *Client_Expecter) LoadSnapshotChunk(_a0 interface{}, _a1 interface{}) *Client_LoadSnapshotChunk_Call { - return &Client_LoadSnapshotChunk_Call{Call: _e.mock.On("LoadSnapshotChunk", _a0, _a1)} -} - -func (_c *Client_LoadSnapshotChunk_Call) Run(run func(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk)) *Client_LoadSnapshotChunk_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestLoadSnapshotChunk)) - }) - return _c -} - -func (_c *Client_LoadSnapshotChunk_Call) Return(_a0 *types.ResponseLoadSnapshotChunk, _a1 error) *Client_LoadSnapshotChunk_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_LoadSnapshotChunk_Call) RunAndReturn(run func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)) *Client_LoadSnapshotChunk_Call { - _c.Call.Return(run) - return _c -} - // OfferSnapshot provides a mock function with given fields: _a0, _a1 func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) @@ -719,35 +368,6 @@ func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnap return r0, r1 } -// Client_OfferSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OfferSnapshot' -type Client_OfferSnapshot_Call struct { - *mock.Call -} - -// OfferSnapshot is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestOfferSnapshot -func (_e *Client_Expecter) OfferSnapshot(_a0 interface{}, _a1 interface{}) *Client_OfferSnapshot_Call { - return &Client_OfferSnapshot_Call{Call: _e.mock.On("OfferSnapshot", _a0, _a1)} -} - -func (_c *Client_OfferSnapshot_Call) Run(run func(_a0 context.Context, _a1 *types.RequestOfferSnapshot)) *Client_OfferSnapshot_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestOfferSnapshot)) - }) - return _c -} - -func (_c *Client_OfferSnapshot_Call) Return(_a0 *types.ResponseOfferSnapshot, _a1 error) *Client_OfferSnapshot_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_OfferSnapshot_Call) RunAndReturn(run func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)) *Client_OfferSnapshot_Call { - _c.Call.Return(run) - return _c -} - // PrepareProposal provides a mock function with given fields: _a0, _a1 func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) @@ -778,35 +398,6 @@ func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepare return r0, r1 } -// Client_PrepareProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrepareProposal' -type Client_PrepareProposal_Call struct { - *mock.Call -} - -// PrepareProposal is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestPrepareProposal -func (_e *Client_Expecter) PrepareProposal(_a0 interface{}, _a1 interface{}) *Client_PrepareProposal_Call { - return &Client_PrepareProposal_Call{Call: _e.mock.On("PrepareProposal", _a0, _a1)} -} - -func (_c *Client_PrepareProposal_Call) Run(run func(_a0 context.Context, _a1 *types.RequestPrepareProposal)) *Client_PrepareProposal_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestPrepareProposal)) - }) - return _c -} - -func (_c *Client_PrepareProposal_Call) Return(_a0 *types.ResponsePrepareProposal, _a1 error) *Client_PrepareProposal_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_PrepareProposal_Call) RunAndReturn(run func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)) *Client_PrepareProposal_Call { - _c.Call.Return(run) - return _c -} - // ProcessProposal provides a mock function with given fields: _a0, _a1 func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) @@ -837,35 +428,6 @@ func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcess return r0, r1 } -// Client_ProcessProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessProposal' -type Client_ProcessProposal_Call struct { - *mock.Call -} - -// ProcessProposal is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestProcessProposal -func (_e *Client_Expecter) ProcessProposal(_a0 interface{}, _a1 interface{}) *Client_ProcessProposal_Call { - return &Client_ProcessProposal_Call{Call: _e.mock.On("ProcessProposal", _a0, _a1)} -} - -func (_c *Client_ProcessProposal_Call) Run(run func(_a0 context.Context, _a1 *types.RequestProcessProposal)) *Client_ProcessProposal_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestProcessProposal)) - }) - return _c -} - -func (_c *Client_ProcessProposal_Call) Return(_a0 *types.ResponseProcessProposal, _a1 error) *Client_ProcessProposal_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ProcessProposal_Call) RunAndReturn(run func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)) *Client_ProcessProposal_Call { - _c.Call.Return(run) - return _c -} - // Query provides a mock function with given fields: _a0, _a1 func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) @@ -896,35 +458,6 @@ func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.Re return r0, r1 } -// Client_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' -type Client_Query_Call struct { - *mock.Call -} - -// Query is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestQuery -func (_e *Client_Expecter) Query(_a0 interface{}, _a1 interface{}) *Client_Query_Call { - return &Client_Query_Call{Call: _e.mock.On("Query", _a0, _a1)} -} - -func (_c *Client_Query_Call) Run(run func(_a0 context.Context, _a1 *types.RequestQuery)) *Client_Query_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestQuery)) - }) - return _c -} - -func (_c *Client_Query_Call) Return(_a0 *types.ResponseQuery, _a1 error) *Client_Query_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Query_Call) RunAndReturn(run func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)) *Client_Query_Call { - _c.Call.Return(run) - return _c -} - // Start provides a mock function with given fields: _a0 func (_m *Client) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -943,34 +476,6 @@ func (_m *Client) Start(_a0 context.Context) error { return r0 } -// Client_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type Client_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) Start(_a0 interface{}) *Client_Start_Call { - return &Client_Start_Call{Call: _e.mock.On("Start", _a0)} -} - -func (_c *Client_Start_Call) Run(run func(_a0 context.Context)) *Client_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_Start_Call) Return(_a0 error) *Client_Start_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Start_Call) RunAndReturn(run func(context.Context) error) *Client_Start_Call { - _c.Call.Return(run) - return _c -} - // VerifyVoteExtension provides a mock function with given fields: _a0, _a1 func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) @@ -1001,67 +506,11 @@ func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVer return r0, r1 } -// Client_VerifyVoteExtension_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyVoteExtension' -type Client_VerifyVoteExtension_Call struct { - *mock.Call -} - -// VerifyVoteExtension is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestVerifyVoteExtension -func (_e *Client_Expecter) VerifyVoteExtension(_a0 interface{}, _a1 interface{}) *Client_VerifyVoteExtension_Call { - return &Client_VerifyVoteExtension_Call{Call: _e.mock.On("VerifyVoteExtension", _a0, _a1)} -} - -func (_c *Client_VerifyVoteExtension_Call) Run(run func(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension)) *Client_VerifyVoteExtension_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestVerifyVoteExtension)) - }) - return _c -} - -func (_c *Client_VerifyVoteExtension_Call) Return(_a0 *types.ResponseVerifyVoteExtension, _a1 error) *Client_VerifyVoteExtension_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_VerifyVoteExtension_Call) RunAndReturn(run func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)) *Client_VerifyVoteExtension_Call { - _c.Call.Return(run) - return _c -} - // Wait provides a mock function with given fields: func (_m *Client) Wait() { _m.Called() } -// Client_Wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Wait' -type Client_Wait_Call struct { - *mock.Call -} - -// Wait is a helper method to define mock.On call -func (_e *Client_Expecter) Wait() *Client_Wait_Call { - return &Client_Wait_Call{Call: _e.mock.On("Wait")} -} - -func (_c *Client_Wait_Call) Run(run func()) *Client_Wait_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Wait_Call) Return() *Client_Wait_Call { - _c.Call.Return() - return _c -} - -func (_c *Client_Wait_Call) RunAndReturn(run func()) *Client_Wait_Call { - _c.Call.Return(run) - return _c -} - // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClient(t interface { diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index 1a706370d6..04ca3c5777 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -14,14 +14,6 @@ type Application struct { mock.Mock } -type Application_Expecter struct { - mock *mock.Mock -} - -func (_m *Application) EXPECT() *Application_Expecter { - return &Application_Expecter{mock: &_m.Mock} -} - // ApplySnapshotChunk provides a mock function with given fields: _a0, _a1 func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) @@ -52,35 +44,6 @@ func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.Reques return r0, r1 } -// Application_ApplySnapshotChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplySnapshotChunk' -type Application_ApplySnapshotChunk_Call struct { - *mock.Call -} - -// ApplySnapshotChunk is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestApplySnapshotChunk -func (_e *Application_Expecter) ApplySnapshotChunk(_a0 interface{}, _a1 interface{}) *Application_ApplySnapshotChunk_Call { - return &Application_ApplySnapshotChunk_Call{Call: _e.mock.On("ApplySnapshotChunk", _a0, _a1)} -} - -func (_c *Application_ApplySnapshotChunk_Call) Run(run func(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk)) *Application_ApplySnapshotChunk_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestApplySnapshotChunk)) - }) - return _c -} - -func (_c *Application_ApplySnapshotChunk_Call) Return(_a0 *types.ResponseApplySnapshotChunk, _a1 error) *Application_ApplySnapshotChunk_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_ApplySnapshotChunk_Call) RunAndReturn(run func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)) *Application_ApplySnapshotChunk_Call { - _c.Call.Return(run) - return _c -} - // CheckTx provides a mock function with given fields: _a0, _a1 func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) @@ -111,35 +74,6 @@ func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) ( return r0, r1 } -// Application_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' -type Application_CheckTx_Call struct { - *mock.Call -} - -// CheckTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestCheckTx -func (_e *Application_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *Application_CheckTx_Call { - return &Application_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} -} - -func (_c *Application_CheckTx_Call) Run(run func(_a0 context.Context, _a1 *types.RequestCheckTx)) *Application_CheckTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestCheckTx)) - }) - return _c -} - -func (_c *Application_CheckTx_Call) Return(_a0 *types.ResponseCheckTx, _a1 error) *Application_CheckTx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_CheckTx_Call) RunAndReturn(run func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)) *Application_CheckTx_Call { - _c.Call.Return(run) - return _c -} - // ExtendVote provides a mock function with given fields: _a0, _a1 func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) @@ -170,35 +104,6 @@ func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendV return r0, r1 } -// Application_ExtendVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendVote' -type Application_ExtendVote_Call struct { - *mock.Call -} - -// ExtendVote is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestExtendVote -func (_e *Application_Expecter) ExtendVote(_a0 interface{}, _a1 interface{}) *Application_ExtendVote_Call { - return &Application_ExtendVote_Call{Call: _e.mock.On("ExtendVote", _a0, _a1)} -} - -func (_c *Application_ExtendVote_Call) Run(run func(_a0 context.Context, _a1 *types.RequestExtendVote)) *Application_ExtendVote_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestExtendVote)) - }) - return _c -} - -func (_c *Application_ExtendVote_Call) Return(_a0 *types.ResponseExtendVote, _a1 error) *Application_ExtendVote_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_ExtendVote_Call) RunAndReturn(run func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)) *Application_ExtendVote_Call { - _c.Call.Return(run) - return _c -} - // FinalizeBlock provides a mock function with given fields: _a0, _a1 func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) @@ -229,35 +134,6 @@ func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFina return r0, r1 } -// Application_FinalizeBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalizeBlock' -type Application_FinalizeBlock_Call struct { - *mock.Call -} - -// FinalizeBlock is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestFinalizeBlock -func (_e *Application_Expecter) FinalizeBlock(_a0 interface{}, _a1 interface{}) *Application_FinalizeBlock_Call { - return &Application_FinalizeBlock_Call{Call: _e.mock.On("FinalizeBlock", _a0, _a1)} -} - -func (_c *Application_FinalizeBlock_Call) Run(run func(_a0 context.Context, _a1 *types.RequestFinalizeBlock)) *Application_FinalizeBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestFinalizeBlock)) - }) - return _c -} - -func (_c *Application_FinalizeBlock_Call) Return(_a0 *types.ResponseFinalizeBlock, _a1 error) *Application_FinalizeBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_FinalizeBlock_Call) RunAndReturn(run func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)) *Application_FinalizeBlock_Call { - _c.Call.Return(run) - return _c -} - // Info provides a mock function with given fields: _a0, _a1 func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) @@ -288,35 +164,6 @@ func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types return r0, r1 } -// Application_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info' -type Application_Info_Call struct { - *mock.Call -} - -// Info is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestInfo -func (_e *Application_Expecter) Info(_a0 interface{}, _a1 interface{}) *Application_Info_Call { - return &Application_Info_Call{Call: _e.mock.On("Info", _a0, _a1)} -} - -func (_c *Application_Info_Call) Run(run func(_a0 context.Context, _a1 *types.RequestInfo)) *Application_Info_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestInfo)) - }) - return _c -} - -func (_c *Application_Info_Call) Return(_a0 *types.ResponseInfo, _a1 error) *Application_Info_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_Info_Call) RunAndReturn(run func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)) *Application_Info_Call { - _c.Call.Return(run) - return _c -} - // InitChain provides a mock function with given fields: _a0, _a1 func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) @@ -347,35 +194,6 @@ func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChai return r0, r1 } -// Application_InitChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitChain' -type Application_InitChain_Call struct { - *mock.Call -} - -// InitChain is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestInitChain -func (_e *Application_Expecter) InitChain(_a0 interface{}, _a1 interface{}) *Application_InitChain_Call { - return &Application_InitChain_Call{Call: _e.mock.On("InitChain", _a0, _a1)} -} - -func (_c *Application_InitChain_Call) Run(run func(_a0 context.Context, _a1 *types.RequestInitChain)) *Application_InitChain_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestInitChain)) - }) - return _c -} - -func (_c *Application_InitChain_Call) Return(_a0 *types.ResponseInitChain, _a1 error) *Application_InitChain_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_InitChain_Call) RunAndReturn(run func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)) *Application_InitChain_Call { - _c.Call.Return(run) - return _c -} - // ListSnapshots provides a mock function with given fields: _a0, _a1 func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) @@ -406,35 +224,6 @@ func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestList return r0, r1 } -// Application_ListSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSnapshots' -type Application_ListSnapshots_Call struct { - *mock.Call -} - -// ListSnapshots is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestListSnapshots -func (_e *Application_Expecter) ListSnapshots(_a0 interface{}, _a1 interface{}) *Application_ListSnapshots_Call { - return &Application_ListSnapshots_Call{Call: _e.mock.On("ListSnapshots", _a0, _a1)} -} - -func (_c *Application_ListSnapshots_Call) Run(run func(_a0 context.Context, _a1 *types.RequestListSnapshots)) *Application_ListSnapshots_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestListSnapshots)) - }) - return _c -} - -func (_c *Application_ListSnapshots_Call) Return(_a0 *types.ResponseListSnapshots, _a1 error) *Application_ListSnapshots_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_ListSnapshots_Call) RunAndReturn(run func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)) *Application_ListSnapshots_Call { - _c.Call.Return(run) - return _c -} - // LoadSnapshotChunk provides a mock function with given fields: _a0, _a1 func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) @@ -465,35 +254,6 @@ func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.Request return r0, r1 } -// Application_LoadSnapshotChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSnapshotChunk' -type Application_LoadSnapshotChunk_Call struct { - *mock.Call -} - -// LoadSnapshotChunk is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestLoadSnapshotChunk -func (_e *Application_Expecter) LoadSnapshotChunk(_a0 interface{}, _a1 interface{}) *Application_LoadSnapshotChunk_Call { - return &Application_LoadSnapshotChunk_Call{Call: _e.mock.On("LoadSnapshotChunk", _a0, _a1)} -} - -func (_c *Application_LoadSnapshotChunk_Call) Run(run func(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk)) *Application_LoadSnapshotChunk_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestLoadSnapshotChunk)) - }) - return _c -} - -func (_c *Application_LoadSnapshotChunk_Call) Return(_a0 *types.ResponseLoadSnapshotChunk, _a1 error) *Application_LoadSnapshotChunk_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_LoadSnapshotChunk_Call) RunAndReturn(run func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)) *Application_LoadSnapshotChunk_Call { - _c.Call.Return(run) - return _c -} - // OfferSnapshot provides a mock function with given fields: _a0, _a1 func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) @@ -524,35 +284,6 @@ func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOffe return r0, r1 } -// Application_OfferSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OfferSnapshot' -type Application_OfferSnapshot_Call struct { - *mock.Call -} - -// OfferSnapshot is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestOfferSnapshot -func (_e *Application_Expecter) OfferSnapshot(_a0 interface{}, _a1 interface{}) *Application_OfferSnapshot_Call { - return &Application_OfferSnapshot_Call{Call: _e.mock.On("OfferSnapshot", _a0, _a1)} -} - -func (_c *Application_OfferSnapshot_Call) Run(run func(_a0 context.Context, _a1 *types.RequestOfferSnapshot)) *Application_OfferSnapshot_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestOfferSnapshot)) - }) - return _c -} - -func (_c *Application_OfferSnapshot_Call) Return(_a0 *types.ResponseOfferSnapshot, _a1 error) *Application_OfferSnapshot_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_OfferSnapshot_Call) RunAndReturn(run func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)) *Application_OfferSnapshot_Call { - _c.Call.Return(run) - return _c -} - // PrepareProposal provides a mock function with given fields: _a0, _a1 func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) @@ -583,35 +314,6 @@ func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPr return r0, r1 } -// Application_PrepareProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrepareProposal' -type Application_PrepareProposal_Call struct { - *mock.Call -} - -// PrepareProposal is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestPrepareProposal -func (_e *Application_Expecter) PrepareProposal(_a0 interface{}, _a1 interface{}) *Application_PrepareProposal_Call { - return &Application_PrepareProposal_Call{Call: _e.mock.On("PrepareProposal", _a0, _a1)} -} - -func (_c *Application_PrepareProposal_Call) Run(run func(_a0 context.Context, _a1 *types.RequestPrepareProposal)) *Application_PrepareProposal_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestPrepareProposal)) - }) - return _c -} - -func (_c *Application_PrepareProposal_Call) Return(_a0 *types.ResponsePrepareProposal, _a1 error) *Application_PrepareProposal_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_PrepareProposal_Call) RunAndReturn(run func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)) *Application_PrepareProposal_Call { - _c.Call.Return(run) - return _c -} - // ProcessProposal provides a mock function with given fields: _a0, _a1 func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) @@ -642,35 +344,6 @@ func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestPr return r0, r1 } -// Application_ProcessProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessProposal' -type Application_ProcessProposal_Call struct { - *mock.Call -} - -// ProcessProposal is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestProcessProposal -func (_e *Application_Expecter) ProcessProposal(_a0 interface{}, _a1 interface{}) *Application_ProcessProposal_Call { - return &Application_ProcessProposal_Call{Call: _e.mock.On("ProcessProposal", _a0, _a1)} -} - -func (_c *Application_ProcessProposal_Call) Run(run func(_a0 context.Context, _a1 *types.RequestProcessProposal)) *Application_ProcessProposal_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestProcessProposal)) - }) - return _c -} - -func (_c *Application_ProcessProposal_Call) Return(_a0 *types.ResponseProcessProposal, _a1 error) *Application_ProcessProposal_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_ProcessProposal_Call) RunAndReturn(run func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)) *Application_ProcessProposal_Call { - _c.Call.Return(run) - return _c -} - // Query provides a mock function with given fields: _a0, _a1 func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) @@ -701,35 +374,6 @@ func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*typ return r0, r1 } -// Application_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' -type Application_Query_Call struct { - *mock.Call -} - -// Query is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestQuery -func (_e *Application_Expecter) Query(_a0 interface{}, _a1 interface{}) *Application_Query_Call { - return &Application_Query_Call{Call: _e.mock.On("Query", _a0, _a1)} -} - -func (_c *Application_Query_Call) Run(run func(_a0 context.Context, _a1 *types.RequestQuery)) *Application_Query_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestQuery)) - }) - return _c -} - -func (_c *Application_Query_Call) Return(_a0 *types.ResponseQuery, _a1 error) *Application_Query_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_Query_Call) RunAndReturn(run func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)) *Application_Query_Call { - _c.Call.Return(run) - return _c -} - // VerifyVoteExtension provides a mock function with given fields: _a0, _a1 func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) @@ -760,35 +404,6 @@ func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.Reque return r0, r1 } -// Application_VerifyVoteExtension_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyVoteExtension' -type Application_VerifyVoteExtension_Call struct { - *mock.Call -} - -// VerifyVoteExtension is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *types.RequestVerifyVoteExtension -func (_e *Application_Expecter) VerifyVoteExtension(_a0 interface{}, _a1 interface{}) *Application_VerifyVoteExtension_Call { - return &Application_VerifyVoteExtension_Call{Call: _e.mock.On("VerifyVoteExtension", _a0, _a1)} -} - -func (_c *Application_VerifyVoteExtension_Call) Run(run func(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension)) *Application_VerifyVoteExtension_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.RequestVerifyVoteExtension)) - }) - return _c -} - -func (_c *Application_VerifyVoteExtension_Call) Return(_a0 *types.ResponseVerifyVoteExtension, _a1 error) *Application_VerifyVoteExtension_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Application_VerifyVoteExtension_Call) RunAndReturn(run func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)) *Application_VerifyVoteExtension_Call { - _c.Call.Return(run) - return _c -} - // NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewApplication(t interface { diff --git a/dash/core/mocks/client.go b/dash/core/mocks/client.go index db17639514..19511f16ac 100644 --- a/dash/core/mocks/client.go +++ b/dash/core/mocks/client.go @@ -14,14 +14,6 @@ type Client struct { mock.Mock } -type Client_Expecter struct { - mock *mock.Mock -} - -func (_m *Client) EXPECT() *Client_Expecter { - return &Client_Expecter{mock: &_m.Mock} -} - // Close provides a mock function with given fields: func (_m *Client) Close() error { ret := _m.Called() @@ -40,33 +32,6 @@ func (_m *Client) Close() error { return r0 } -// Client_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' -type Client_Close_Call struct { - *mock.Call -} - -// Close is a helper method to define mock.On call -func (_e *Client_Expecter) Close() *Client_Close_Call { - return &Client_Close_Call{Call: _e.mock.On("Close")} -} - -func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Close_Call) Return(_a0 error) *Client_Close_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call { - _c.Call.Return(run) - return _c -} - // GetNetworkInfo provides a mock function with given fields: func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { ret := _m.Called() @@ -97,33 +62,6 @@ func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { return r0, r1 } -// Client_GetNetworkInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkInfo' -type Client_GetNetworkInfo_Call struct { - *mock.Call -} - -// GetNetworkInfo is a helper method to define mock.On call -func (_e *Client_Expecter) GetNetworkInfo() *Client_GetNetworkInfo_Call { - return &Client_GetNetworkInfo_Call{Call: _e.mock.On("GetNetworkInfo")} -} - -func (_c *Client_GetNetworkInfo_Call) Run(run func()) *Client_GetNetworkInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_GetNetworkInfo_Call) Return(_a0 *btcjson.GetNetworkInfoResult, _a1 error) *Client_GetNetworkInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_GetNetworkInfo_Call) RunAndReturn(run func() (*btcjson.GetNetworkInfoResult, error)) *Client_GetNetworkInfo_Call { - _c.Call.Return(run) - return _c -} - // MasternodeListJSON provides a mock function with given fields: filter func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.MasternodelistResultJSON, error) { ret := _m.Called(filter) @@ -154,34 +92,6 @@ func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.Masterno return r0, r1 } -// Client_MasternodeListJSON_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MasternodeListJSON' -type Client_MasternodeListJSON_Call struct { - *mock.Call -} - -// MasternodeListJSON is a helper method to define mock.On call -// - filter string -func (_e *Client_Expecter) MasternodeListJSON(filter interface{}) *Client_MasternodeListJSON_Call { - return &Client_MasternodeListJSON_Call{Call: _e.mock.On("MasternodeListJSON", filter)} -} - -func (_c *Client_MasternodeListJSON_Call) Run(run func(filter string)) *Client_MasternodeListJSON_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *Client_MasternodeListJSON_Call) Return(_a0 map[string]btcjson.MasternodelistResultJSON, _a1 error) *Client_MasternodeListJSON_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_MasternodeListJSON_Call) RunAndReturn(run func(string) (map[string]btcjson.MasternodelistResultJSON, error)) *Client_MasternodeListJSON_Call { - _c.Call.Return(run) - return _c -} - // MasternodeStatus provides a mock function with given fields: func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { ret := _m.Called() @@ -212,33 +122,6 @@ func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { return r0, r1 } -// Client_MasternodeStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MasternodeStatus' -type Client_MasternodeStatus_Call struct { - *mock.Call -} - -// MasternodeStatus is a helper method to define mock.On call -func (_e *Client_Expecter) MasternodeStatus() *Client_MasternodeStatus_Call { - return &Client_MasternodeStatus_Call{Call: _e.mock.On("MasternodeStatus")} -} - -func (_c *Client_MasternodeStatus_Call) Run(run func()) *Client_MasternodeStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_MasternodeStatus_Call) Return(_a0 *btcjson.MasternodeStatusResult, _a1 error) *Client_MasternodeStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_MasternodeStatus_Call) RunAndReturn(run func() (*btcjson.MasternodeStatusResult, error)) *Client_MasternodeStatus_Call { - _c.Call.Return(run) - return _c -} - // Ping provides a mock function with given fields: func (_m *Client) Ping() error { ret := _m.Called() @@ -257,33 +140,6 @@ func (_m *Client) Ping() error { return r0 } -// Client_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping' -type Client_Ping_Call struct { - *mock.Call -} - -// Ping is a helper method to define mock.On call -func (_e *Client_Expecter) Ping() *Client_Ping_Call { - return &Client_Ping_Call{Call: _e.mock.On("Ping")} -} - -func (_c *Client_Ping_Call) Run(run func()) *Client_Ping_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Client_Ping_Call) Return(_a0 error) *Client_Ping_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Ping_Call) RunAndReturn(run func() error) *Client_Ping_Call { - _c.Call.Return(run) - return _c -} - // QuorumInfo provides a mock function with given fields: quorumType, quorumHash func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBytes) (*btcjson.QuorumInfoResult, error) { ret := _m.Called(quorumType, quorumHash) @@ -314,35 +170,6 @@ func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBy return r0, r1 } -// Client_QuorumInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuorumInfo' -type Client_QuorumInfo_Call struct { - *mock.Call -} - -// QuorumInfo is a helper method to define mock.On call -// - quorumType btcjson.LLMQType -// - quorumHash bytes.HexBytes -func (_e *Client_Expecter) QuorumInfo(quorumType interface{}, quorumHash interface{}) *Client_QuorumInfo_Call { - return &Client_QuorumInfo_Call{Call: _e.mock.On("QuorumInfo", quorumType, quorumHash)} -} - -func (_c *Client_QuorumInfo_Call) Run(run func(quorumType btcjson.LLMQType, quorumHash bytes.HexBytes)) *Client_QuorumInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(btcjson.LLMQType), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *Client_QuorumInfo_Call) Return(_a0 *btcjson.QuorumInfoResult, _a1 error) *Client_QuorumInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_QuorumInfo_Call) RunAndReturn(run func(btcjson.LLMQType, bytes.HexBytes) (*btcjson.QuorumInfoResult, error)) *Client_QuorumInfo_Call { - _c.Call.Return(run) - return _c -} - // QuorumSign provides a mock function with given fields: quorumType, requestID, messageHash, quorumHash func (_m *Client) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, quorumHash bytes.HexBytes) (*btcjson.QuorumSignResult, error) { ret := _m.Called(quorumType, requestID, messageHash, quorumHash) @@ -373,37 +200,6 @@ func (_m *Client) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexByt return r0, r1 } -// Client_QuorumSign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuorumSign' -type Client_QuorumSign_Call struct { - *mock.Call -} - -// QuorumSign is a helper method to define mock.On call -// - quorumType btcjson.LLMQType -// - requestID bytes.HexBytes -// - messageHash bytes.HexBytes -// - quorumHash bytes.HexBytes -func (_e *Client_Expecter) QuorumSign(quorumType interface{}, requestID interface{}, messageHash interface{}, quorumHash interface{}) *Client_QuorumSign_Call { - return &Client_QuorumSign_Call{Call: _e.mock.On("QuorumSign", quorumType, requestID, messageHash, quorumHash)} -} - -func (_c *Client_QuorumSign_Call) Run(run func(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, quorumHash bytes.HexBytes)) *Client_QuorumSign_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(btcjson.LLMQType), args[1].(bytes.HexBytes), args[2].(bytes.HexBytes), args[3].(bytes.HexBytes)) - }) - return _c -} - -func (_c *Client_QuorumSign_Call) Return(_a0 *btcjson.QuorumSignResult, _a1 error) *Client_QuorumSign_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_QuorumSign_Call) RunAndReturn(run func(btcjson.LLMQType, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes) (*btcjson.QuorumSignResult, error)) *Client_QuorumSign_Call { - _c.Call.Return(run) - return _c -} - // QuorumVerify provides a mock function with given fields: quorumType, requestID, messageHash, signature, quorumHash func (_m *Client) QuorumVerify(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, signature bytes.HexBytes, quorumHash bytes.HexBytes) (bool, error) { ret := _m.Called(quorumType, requestID, messageHash, signature, quorumHash) @@ -432,38 +228,6 @@ func (_m *Client) QuorumVerify(quorumType btcjson.LLMQType, requestID bytes.HexB return r0, r1 } -// Client_QuorumVerify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuorumVerify' -type Client_QuorumVerify_Call struct { - *mock.Call -} - -// QuorumVerify is a helper method to define mock.On call -// - quorumType btcjson.LLMQType -// - requestID bytes.HexBytes -// - messageHash bytes.HexBytes -// - signature bytes.HexBytes -// - quorumHash bytes.HexBytes -func (_e *Client_Expecter) QuorumVerify(quorumType interface{}, requestID interface{}, messageHash interface{}, signature interface{}, quorumHash interface{}) *Client_QuorumVerify_Call { - return &Client_QuorumVerify_Call{Call: _e.mock.On("QuorumVerify", quorumType, requestID, messageHash, signature, quorumHash)} -} - -func (_c *Client_QuorumVerify_Call) Run(run func(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, signature bytes.HexBytes, quorumHash bytes.HexBytes)) *Client_QuorumVerify_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(btcjson.LLMQType), args[1].(bytes.HexBytes), args[2].(bytes.HexBytes), args[3].(bytes.HexBytes), args[4].(bytes.HexBytes)) - }) - return _c -} - -func (_c *Client_QuorumVerify_Call) Return(_a0 bool, _a1 error) *Client_QuorumVerify_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_QuorumVerify_Call) RunAndReturn(run func(btcjson.LLMQType, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes) (bool, error)) *Client_QuorumVerify_Call { - _c.Call.Return(run) - return _c -} - // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClient(t interface { diff --git a/internal/consensus/mocks/gossiper.go b/internal/consensus/mocks/gossiper.go index 22a3d374aa..b2f91225a9 100644 --- a/internal/consensus/mocks/gossiper.go +++ b/internal/consensus/mocks/gossiper.go @@ -14,224 +14,36 @@ type Gossiper struct { mock.Mock } -type Gossiper_Expecter struct { - mock *mock.Mock -} - -func (_m *Gossiper) EXPECT() *Gossiper_Expecter { - return &Gossiper_Expecter{mock: &_m.Mock} -} - // GossipBlockPartsForCatchup provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipBlockPartsForCatchup(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } -// Gossiper_GossipBlockPartsForCatchup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipBlockPartsForCatchup' -type Gossiper_GossipBlockPartsForCatchup_Call struct { - *mock.Call -} - -// GossipBlockPartsForCatchup is a helper method to define mock.On call -// - ctx context.Context -// - rs types.RoundState -// - prs *types.PeerRoundState -func (_e *Gossiper_Expecter) GossipBlockPartsForCatchup(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipBlockPartsForCatchup_Call { - return &Gossiper_GossipBlockPartsForCatchup_Call{Call: _e.mock.On("GossipBlockPartsForCatchup", ctx, rs, prs)} -} - -func (_c *Gossiper_GossipBlockPartsForCatchup_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipBlockPartsForCatchup_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) - }) - return _c -} - -func (_c *Gossiper_GossipBlockPartsForCatchup_Call) Return() *Gossiper_GossipBlockPartsForCatchup_Call { - _c.Call.Return() - return _c -} - -func (_c *Gossiper_GossipBlockPartsForCatchup_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipBlockPartsForCatchup_Call { - _c.Call.Return(run) - return _c -} - // GossipCommit provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipCommit(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } -// Gossiper_GossipCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipCommit' -type Gossiper_GossipCommit_Call struct { - *mock.Call -} - -// GossipCommit is a helper method to define mock.On call -// - ctx context.Context -// - rs types.RoundState -// - prs *types.PeerRoundState -func (_e *Gossiper_Expecter) GossipCommit(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipCommit_Call { - return &Gossiper_GossipCommit_Call{Call: _e.mock.On("GossipCommit", ctx, rs, prs)} -} - -func (_c *Gossiper_GossipCommit_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipCommit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) - }) - return _c -} - -func (_c *Gossiper_GossipCommit_Call) Return() *Gossiper_GossipCommit_Call { - _c.Call.Return() - return _c -} - -func (_c *Gossiper_GossipCommit_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipCommit_Call { - _c.Call.Return(run) - return _c -} - // GossipProposal provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipProposal(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } -// Gossiper_GossipProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipProposal' -type Gossiper_GossipProposal_Call struct { - *mock.Call -} - -// GossipProposal is a helper method to define mock.On call -// - ctx context.Context -// - rs types.RoundState -// - prs *types.PeerRoundState -func (_e *Gossiper_Expecter) GossipProposal(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipProposal_Call { - return &Gossiper_GossipProposal_Call{Call: _e.mock.On("GossipProposal", ctx, rs, prs)} -} - -func (_c *Gossiper_GossipProposal_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipProposal_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) - }) - return _c -} - -func (_c *Gossiper_GossipProposal_Call) Return() *Gossiper_GossipProposal_Call { - _c.Call.Return() - return _c -} - -func (_c *Gossiper_GossipProposal_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipProposal_Call { - _c.Call.Return(run) - return _c -} - // GossipProposalBlockParts provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipProposalBlockParts(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } -// Gossiper_GossipProposalBlockParts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipProposalBlockParts' -type Gossiper_GossipProposalBlockParts_Call struct { - *mock.Call -} - -// GossipProposalBlockParts is a helper method to define mock.On call -// - ctx context.Context -// - rs types.RoundState -// - prs *types.PeerRoundState -func (_e *Gossiper_Expecter) GossipProposalBlockParts(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipProposalBlockParts_Call { - return &Gossiper_GossipProposalBlockParts_Call{Call: _e.mock.On("GossipProposalBlockParts", ctx, rs, prs)} -} - -func (_c *Gossiper_GossipProposalBlockParts_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipProposalBlockParts_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) - }) - return _c -} - -func (_c *Gossiper_GossipProposalBlockParts_Call) Return() *Gossiper_GossipProposalBlockParts_Call { - _c.Call.Return() - return _c -} - -func (_c *Gossiper_GossipProposalBlockParts_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipProposalBlockParts_Call { - _c.Call.Return(run) - return _c -} - // GossipVote provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipVote(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } -// Gossiper_GossipVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipVote' -type Gossiper_GossipVote_Call struct { - *mock.Call -} - -// GossipVote is a helper method to define mock.On call -// - ctx context.Context -// - rs types.RoundState -// - prs *types.PeerRoundState -func (_e *Gossiper_Expecter) GossipVote(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipVote_Call { - return &Gossiper_GossipVote_Call{Call: _e.mock.On("GossipVote", ctx, rs, prs)} -} - -func (_c *Gossiper_GossipVote_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipVote_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) - }) - return _c -} - -func (_c *Gossiper_GossipVote_Call) Return() *Gossiper_GossipVote_Call { - _c.Call.Return() - return _c -} - -func (_c *Gossiper_GossipVote_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipVote_Call { - _c.Call.Return(run) - return _c -} - // GossipVoteSetMaj23 provides a mock function with given fields: ctx, rs, prs func (_m *Gossiper) GossipVoteSetMaj23(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState) { _m.Called(ctx, rs, prs) } -// Gossiper_GossipVoteSetMaj23_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GossipVoteSetMaj23' -type Gossiper_GossipVoteSetMaj23_Call struct { - *mock.Call -} - -// GossipVoteSetMaj23 is a helper method to define mock.On call -// - ctx context.Context -// - rs types.RoundState -// - prs *types.PeerRoundState -func (_e *Gossiper_Expecter) GossipVoteSetMaj23(ctx interface{}, rs interface{}, prs interface{}) *Gossiper_GossipVoteSetMaj23_Call { - return &Gossiper_GossipVoteSetMaj23_Call{Call: _e.mock.On("GossipVoteSetMaj23", ctx, rs, prs)} -} - -func (_c *Gossiper_GossipVoteSetMaj23_Call) Run(run func(ctx context.Context, rs types.RoundState, prs *types.PeerRoundState)) *Gossiper_GossipVoteSetMaj23_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.RoundState), args[2].(*types.PeerRoundState)) - }) - return _c -} - -func (_c *Gossiper_GossipVoteSetMaj23_Call) Return() *Gossiper_GossipVoteSetMaj23_Call { - _c.Call.Return() - return _c -} - -func (_c *Gossiper_GossipVoteSetMaj23_Call) RunAndReturn(run func(context.Context, types.RoundState, *types.PeerRoundState)) *Gossiper_GossipVoteSetMaj23_Call { - _c.Call.Return(run) - return _c -} - // NewGossiper creates a new instance of Gossiper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewGossiper(t interface { diff --git a/internal/consensus/versioned/selectproposer/mocks/proposerselector.go b/internal/consensus/versioned/selectproposer/mocks/proposerselector.go index 6daf7600ac..e2071d2769 100644 --- a/internal/consensus/versioned/selectproposer/mocks/proposerselector.go +++ b/internal/consensus/versioned/selectproposer/mocks/proposerselector.go @@ -13,14 +13,6 @@ type ProposerSelector struct { mock.Mock } -type ProposerSelector_Expecter struct { - mock *mock.Mock -} - -func (_m *ProposerSelector) EXPECT() *ProposerSelector_Expecter { - return &ProposerSelector_Expecter{mock: &_m.Mock} -} - // Copy provides a mock function with given fields: func (_m *ProposerSelector) Copy() selectproposer.ProposerSelector { ret := _m.Called() @@ -41,33 +33,6 @@ func (_m *ProposerSelector) Copy() selectproposer.ProposerSelector { return r0 } -// ProposerSelector_Copy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Copy' -type ProposerSelector_Copy_Call struct { - *mock.Call -} - -// Copy is a helper method to define mock.On call -func (_e *ProposerSelector_Expecter) Copy() *ProposerSelector_Copy_Call { - return &ProposerSelector_Copy_Call{Call: _e.mock.On("Copy")} -} - -func (_c *ProposerSelector_Copy_Call) Run(run func()) *ProposerSelector_Copy_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ProposerSelector_Copy_Call) Return(_a0 selectproposer.ProposerSelector) *ProposerSelector_Copy_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *ProposerSelector_Copy_Call) RunAndReturn(run func() selectproposer.ProposerSelector) *ProposerSelector_Copy_Call { - _c.Call.Return(run) - return _c -} - // GetProposer provides a mock function with given fields: height, round func (_m *ProposerSelector) GetProposer(height int64, round int32) (*types.Validator, error) { ret := _m.Called(height, round) @@ -98,35 +63,6 @@ func (_m *ProposerSelector) GetProposer(height int64, round int32) (*types.Valid return r0, r1 } -// ProposerSelector_GetProposer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProposer' -type ProposerSelector_GetProposer_Call struct { - *mock.Call -} - -// GetProposer is a helper method to define mock.On call -// - height int64 -// - round int32 -func (_e *ProposerSelector_Expecter) GetProposer(height interface{}, round interface{}) *ProposerSelector_GetProposer_Call { - return &ProposerSelector_GetProposer_Call{Call: _e.mock.On("GetProposer", height, round)} -} - -func (_c *ProposerSelector_GetProposer_Call) Run(run func(height int64, round int32)) *ProposerSelector_GetProposer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64), args[1].(int32)) - }) - return _c -} - -func (_c *ProposerSelector_GetProposer_Call) Return(_a0 *types.Validator, _a1 error) *ProposerSelector_GetProposer_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ProposerSelector_GetProposer_Call) RunAndReturn(run func(int64, int32) (*types.Validator, error)) *ProposerSelector_GetProposer_Call { - _c.Call.Return(run) - return _c -} - // MustGetProposer provides a mock function with given fields: height, round func (_m *ProposerSelector) MustGetProposer(height int64, round int32) *types.Validator { ret := _m.Called(height, round) @@ -147,35 +83,6 @@ func (_m *ProposerSelector) MustGetProposer(height int64, round int32) *types.Va return r0 } -// ProposerSelector_MustGetProposer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MustGetProposer' -type ProposerSelector_MustGetProposer_Call struct { - *mock.Call -} - -// MustGetProposer is a helper method to define mock.On call -// - height int64 -// - round int32 -func (_e *ProposerSelector_Expecter) MustGetProposer(height interface{}, round interface{}) *ProposerSelector_MustGetProposer_Call { - return &ProposerSelector_MustGetProposer_Call{Call: _e.mock.On("MustGetProposer", height, round)} -} - -func (_c *ProposerSelector_MustGetProposer_Call) Run(run func(height int64, round int32)) *ProposerSelector_MustGetProposer_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64), args[1].(int32)) - }) - return _c -} - -func (_c *ProposerSelector_MustGetProposer_Call) Return(_a0 *types.Validator) *ProposerSelector_MustGetProposer_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *ProposerSelector_MustGetProposer_Call) RunAndReturn(run func(int64, int32) *types.Validator) *ProposerSelector_MustGetProposer_Call { - _c.Call.Return(run) - return _c -} - // UpdateHeightRound provides a mock function with given fields: height, round func (_m *ProposerSelector) UpdateHeightRound(height int64, round int32) error { ret := _m.Called(height, round) @@ -194,35 +101,6 @@ func (_m *ProposerSelector) UpdateHeightRound(height int64, round int32) error { return r0 } -// ProposerSelector_UpdateHeightRound_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateHeightRound' -type ProposerSelector_UpdateHeightRound_Call struct { - *mock.Call -} - -// UpdateHeightRound is a helper method to define mock.On call -// - height int64 -// - round int32 -func (_e *ProposerSelector_Expecter) UpdateHeightRound(height interface{}, round interface{}) *ProposerSelector_UpdateHeightRound_Call { - return &ProposerSelector_UpdateHeightRound_Call{Call: _e.mock.On("UpdateHeightRound", height, round)} -} - -func (_c *ProposerSelector_UpdateHeightRound_Call) Run(run func(height int64, round int32)) *ProposerSelector_UpdateHeightRound_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64), args[1].(int32)) - }) - return _c -} - -func (_c *ProposerSelector_UpdateHeightRound_Call) Return(_a0 error) *ProposerSelector_UpdateHeightRound_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *ProposerSelector_UpdateHeightRound_Call) RunAndReturn(run func(int64, int32) error) *ProposerSelector_UpdateHeightRound_Call { - _c.Call.Return(run) - return _c -} - // ValidatorSet provides a mock function with given fields: func (_m *ProposerSelector) ValidatorSet() *types.ValidatorSet { ret := _m.Called() @@ -243,33 +121,6 @@ func (_m *ProposerSelector) ValidatorSet() *types.ValidatorSet { return r0 } -// ProposerSelector_ValidatorSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorSet' -type ProposerSelector_ValidatorSet_Call struct { - *mock.Call -} - -// ValidatorSet is a helper method to define mock.On call -func (_e *ProposerSelector_Expecter) ValidatorSet() *ProposerSelector_ValidatorSet_Call { - return &ProposerSelector_ValidatorSet_Call{Call: _e.mock.On("ValidatorSet")} -} - -func (_c *ProposerSelector_ValidatorSet_Call) Run(run func()) *ProposerSelector_ValidatorSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ProposerSelector_ValidatorSet_Call) Return(_a0 *types.ValidatorSet) *ProposerSelector_ValidatorSet_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *ProposerSelector_ValidatorSet_Call) RunAndReturn(run func() *types.ValidatorSet) *ProposerSelector_ValidatorSet_Call { - _c.Call.Return(run) - return _c -} - // NewProposerSelector creates a new instance of ProposerSelector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewProposerSelector(t interface { diff --git a/internal/evidence/mocks/blockstore.go b/internal/evidence/mocks/blockstore.go index 0d34b27b21..0062c4c656 100644 --- a/internal/evidence/mocks/blockstore.go +++ b/internal/evidence/mocks/blockstore.go @@ -12,14 +12,6 @@ type BlockStore struct { mock.Mock } -type BlockStore_Expecter struct { - mock *mock.Mock -} - -func (_m *BlockStore) EXPECT() *BlockStore_Expecter { - return &BlockStore_Expecter{mock: &_m.Mock} -} - // Base provides a mock function with given fields: func (_m *BlockStore) Base() int64 { ret := _m.Called() @@ -38,33 +30,6 @@ func (_m *BlockStore) Base() int64 { return r0 } -// BlockStore_Base_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Base' -type BlockStore_Base_Call struct { - *mock.Call -} - -// Base is a helper method to define mock.On call -func (_e *BlockStore_Expecter) Base() *BlockStore_Base_Call { - return &BlockStore_Base_Call{Call: _e.mock.On("Base")} -} - -func (_c *BlockStore_Base_Call) Run(run func()) *BlockStore_Base_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BlockStore_Base_Call) Return(_a0 int64) *BlockStore_Base_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_Base_Call) RunAndReturn(run func() int64) *BlockStore_Base_Call { - _c.Call.Return(run) - return _c -} - // Height provides a mock function with given fields: func (_m *BlockStore) Height() int64 { ret := _m.Called() @@ -83,33 +48,6 @@ func (_m *BlockStore) Height() int64 { return r0 } -// BlockStore_Height_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Height' -type BlockStore_Height_Call struct { - *mock.Call -} - -// Height is a helper method to define mock.On call -func (_e *BlockStore_Expecter) Height() *BlockStore_Height_Call { - return &BlockStore_Height_Call{Call: _e.mock.On("Height")} -} - -func (_c *BlockStore_Height_Call) Run(run func()) *BlockStore_Height_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BlockStore_Height_Call) Return(_a0 int64) *BlockStore_Height_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_Height_Call) RunAndReturn(run func() int64) *BlockStore_Height_Call { - _c.Call.Return(run) - return _c -} - // LoadBlockCommit provides a mock function with given fields: height func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { ret := _m.Called(height) @@ -130,34 +68,6 @@ func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { return r0 } -// BlockStore_LoadBlockCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockCommit' -type BlockStore_LoadBlockCommit_Call struct { - *mock.Call -} - -// LoadBlockCommit is a helper method to define mock.On call -// - height int64 -func (_e *BlockStore_Expecter) LoadBlockCommit(height interface{}) *BlockStore_LoadBlockCommit_Call { - return &BlockStore_LoadBlockCommit_Call{Call: _e.mock.On("LoadBlockCommit", height)} -} - -func (_c *BlockStore_LoadBlockCommit_Call) Run(run func(height int64)) *BlockStore_LoadBlockCommit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *BlockStore_LoadBlockCommit_Call) Return(_a0 *types.Commit) *BlockStore_LoadBlockCommit_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBlockCommit_Call) RunAndReturn(run func(int64) *types.Commit) *BlockStore_LoadBlockCommit_Call { - _c.Call.Return(run) - return _c -} - // LoadBlockMeta provides a mock function with given fields: height func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { ret := _m.Called(height) @@ -178,34 +88,6 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { return r0 } -// BlockStore_LoadBlockMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockMeta' -type BlockStore_LoadBlockMeta_Call struct { - *mock.Call -} - -// LoadBlockMeta is a helper method to define mock.On call -// - height int64 -func (_e *BlockStore_Expecter) LoadBlockMeta(height interface{}) *BlockStore_LoadBlockMeta_Call { - return &BlockStore_LoadBlockMeta_Call{Call: _e.mock.On("LoadBlockMeta", height)} -} - -func (_c *BlockStore_LoadBlockMeta_Call) Run(run func(height int64)) *BlockStore_LoadBlockMeta_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *BlockStore_LoadBlockMeta_Call) Return(_a0 *types.BlockMeta) *BlockStore_LoadBlockMeta_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBlockMeta_Call) RunAndReturn(run func(int64) *types.BlockMeta) *BlockStore_LoadBlockMeta_Call { - _c.Call.Return(run) - return _c -} - // NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewBlockStore(t interface { diff --git a/internal/mempool/mocks/mempool.go b/internal/mempool/mocks/mempool.go index 671bbea635..6f4996f400 100644 --- a/internal/mempool/mocks/mempool.go +++ b/internal/mempool/mocks/mempool.go @@ -19,14 +19,6 @@ type Mempool struct { mock.Mock } -type Mempool_Expecter struct { - mock *mock.Mock -} - -func (_m *Mempool) EXPECT() *Mempool_Expecter { - return &Mempool_Expecter{mock: &_m.Mock} -} - // CheckTx provides a mock function with given fields: ctx, tx, cb, txInfo func (_m *Mempool) CheckTx(ctx context.Context, tx types.Tx, cb func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) error { ret := _m.Called(ctx, tx, cb, txInfo) @@ -45,101 +37,16 @@ func (_m *Mempool) CheckTx(ctx context.Context, tx types.Tx, cb func(*abcitypes. return r0 } -// Mempool_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' -type Mempool_CheckTx_Call struct { - *mock.Call -} - -// CheckTx is a helper method to define mock.On call -// - ctx context.Context -// - tx types.Tx -// - cb func(*abcitypes.ResponseCheckTx) -// - txInfo mempool.TxInfo -func (_e *Mempool_Expecter) CheckTx(ctx interface{}, tx interface{}, cb interface{}, txInfo interface{}) *Mempool_CheckTx_Call { - return &Mempool_CheckTx_Call{Call: _e.mock.On("CheckTx", ctx, tx, cb, txInfo)} -} - -func (_c *Mempool_CheckTx_Call) Run(run func(ctx context.Context, tx types.Tx, cb func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo)) *Mempool_CheckTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx), args[2].(func(*abcitypes.ResponseCheckTx)), args[3].(mempool.TxInfo)) - }) - return _c -} - -func (_c *Mempool_CheckTx_Call) Return(_a0 error) *Mempool_CheckTx_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_CheckTx_Call) RunAndReturn(run func(context.Context, types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error) *Mempool_CheckTx_Call { - _c.Call.Return(run) - return _c -} - // EnableTxsAvailable provides a mock function with given fields: func (_m *Mempool) EnableTxsAvailable() { _m.Called() } -// Mempool_EnableTxsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableTxsAvailable' -type Mempool_EnableTxsAvailable_Call struct { - *mock.Call -} - -// EnableTxsAvailable is a helper method to define mock.On call -func (_e *Mempool_Expecter) EnableTxsAvailable() *Mempool_EnableTxsAvailable_Call { - return &Mempool_EnableTxsAvailable_Call{Call: _e.mock.On("EnableTxsAvailable")} -} - -func (_c *Mempool_EnableTxsAvailable_Call) Run(run func()) *Mempool_EnableTxsAvailable_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Mempool_EnableTxsAvailable_Call) Return() *Mempool_EnableTxsAvailable_Call { - _c.Call.Return() - return _c -} - -func (_c *Mempool_EnableTxsAvailable_Call) RunAndReturn(run func()) *Mempool_EnableTxsAvailable_Call { - _c.Call.Return(run) - return _c -} - // Flush provides a mock function with given fields: func (_m *Mempool) Flush() { _m.Called() } -// Mempool_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush' -type Mempool_Flush_Call struct { - *mock.Call -} - -// Flush is a helper method to define mock.On call -func (_e *Mempool_Expecter) Flush() *Mempool_Flush_Call { - return &Mempool_Flush_Call{Call: _e.mock.On("Flush")} -} - -func (_c *Mempool_Flush_Call) Run(run func()) *Mempool_Flush_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Mempool_Flush_Call) Return() *Mempool_Flush_Call { - _c.Call.Return() - return _c -} - -func (_c *Mempool_Flush_Call) RunAndReturn(run func()) *Mempool_Flush_Call { - _c.Call.Return(run) - return _c -} - // FlushAppConn provides a mock function with given fields: _a0 func (_m *Mempool) FlushAppConn(_a0 context.Context) error { ret := _m.Called(_a0) @@ -158,66 +65,11 @@ func (_m *Mempool) FlushAppConn(_a0 context.Context) error { return r0 } -// Mempool_FlushAppConn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlushAppConn' -type Mempool_FlushAppConn_Call struct { - *mock.Call -} - -// FlushAppConn is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Mempool_Expecter) FlushAppConn(_a0 interface{}) *Mempool_FlushAppConn_Call { - return &Mempool_FlushAppConn_Call{Call: _e.mock.On("FlushAppConn", _a0)} -} - -func (_c *Mempool_FlushAppConn_Call) Run(run func(_a0 context.Context)) *Mempool_FlushAppConn_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Mempool_FlushAppConn_Call) Return(_a0 error) *Mempool_FlushAppConn_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_FlushAppConn_Call) RunAndReturn(run func(context.Context) error) *Mempool_FlushAppConn_Call { - _c.Call.Return(run) - return _c -} - // Lock provides a mock function with given fields: func (_m *Mempool) Lock() { _m.Called() } -// Mempool_Lock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lock' -type Mempool_Lock_Call struct { - *mock.Call -} - -// Lock is a helper method to define mock.On call -func (_e *Mempool_Expecter) Lock() *Mempool_Lock_Call { - return &Mempool_Lock_Call{Call: _e.mock.On("Lock")} -} - -func (_c *Mempool_Lock_Call) Run(run func()) *Mempool_Lock_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Mempool_Lock_Call) Return() *Mempool_Lock_Call { - _c.Call.Return() - return _c -} - -func (_c *Mempool_Lock_Call) RunAndReturn(run func()) *Mempool_Lock_Call { - _c.Call.Return(run) - return _c -} - // ReapMaxBytesMaxGas provides a mock function with given fields: maxBytes, maxGas func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { ret := _m.Called(maxBytes, maxGas) @@ -238,35 +90,6 @@ func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { return r0 } -// Mempool_ReapMaxBytesMaxGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReapMaxBytesMaxGas' -type Mempool_ReapMaxBytesMaxGas_Call struct { - *mock.Call -} - -// ReapMaxBytesMaxGas is a helper method to define mock.On call -// - maxBytes int64 -// - maxGas int64 -func (_e *Mempool_Expecter) ReapMaxBytesMaxGas(maxBytes interface{}, maxGas interface{}) *Mempool_ReapMaxBytesMaxGas_Call { - return &Mempool_ReapMaxBytesMaxGas_Call{Call: _e.mock.On("ReapMaxBytesMaxGas", maxBytes, maxGas)} -} - -func (_c *Mempool_ReapMaxBytesMaxGas_Call) Run(run func(maxBytes int64, maxGas int64)) *Mempool_ReapMaxBytesMaxGas_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64), args[1].(int64)) - }) - return _c -} - -func (_c *Mempool_ReapMaxBytesMaxGas_Call) Return(_a0 types.Txs) *Mempool_ReapMaxBytesMaxGas_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_ReapMaxBytesMaxGas_Call) RunAndReturn(run func(int64, int64) types.Txs) *Mempool_ReapMaxBytesMaxGas_Call { - _c.Call.Return(run) - return _c -} - // ReapMaxTxs provides a mock function with given fields: max func (_m *Mempool) ReapMaxTxs(max int) types.Txs { ret := _m.Called(max) @@ -287,34 +110,6 @@ func (_m *Mempool) ReapMaxTxs(max int) types.Txs { return r0 } -// Mempool_ReapMaxTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReapMaxTxs' -type Mempool_ReapMaxTxs_Call struct { - *mock.Call -} - -// ReapMaxTxs is a helper method to define mock.On call -// - max int -func (_e *Mempool_Expecter) ReapMaxTxs(max interface{}) *Mempool_ReapMaxTxs_Call { - return &Mempool_ReapMaxTxs_Call{Call: _e.mock.On("ReapMaxTxs", max)} -} - -func (_c *Mempool_ReapMaxTxs_Call) Run(run func(max int)) *Mempool_ReapMaxTxs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int)) - }) - return _c -} - -func (_c *Mempool_ReapMaxTxs_Call) Return(_a0 types.Txs) *Mempool_ReapMaxTxs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_ReapMaxTxs_Call) RunAndReturn(run func(int) types.Txs) *Mempool_ReapMaxTxs_Call { - _c.Call.Return(run) - return _c -} - // RemoveTxByKey provides a mock function with given fields: txKey func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { ret := _m.Called(txKey) @@ -333,34 +128,6 @@ func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { return r0 } -// Mempool_RemoveTxByKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveTxByKey' -type Mempool_RemoveTxByKey_Call struct { - *mock.Call -} - -// RemoveTxByKey is a helper method to define mock.On call -// - txKey types.TxKey -func (_e *Mempool_Expecter) RemoveTxByKey(txKey interface{}) *Mempool_RemoveTxByKey_Call { - return &Mempool_RemoveTxByKey_Call{Call: _e.mock.On("RemoveTxByKey", txKey)} -} - -func (_c *Mempool_RemoveTxByKey_Call) Run(run func(txKey types.TxKey)) *Mempool_RemoveTxByKey_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.TxKey)) - }) - return _c -} - -func (_c *Mempool_RemoveTxByKey_Call) Return(_a0 error) *Mempool_RemoveTxByKey_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_RemoveTxByKey_Call) RunAndReturn(run func(types.TxKey) error) *Mempool_RemoveTxByKey_Call { - _c.Call.Return(run) - return _c -} - // Size provides a mock function with given fields: func (_m *Mempool) Size() int { ret := _m.Called() @@ -379,33 +146,6 @@ func (_m *Mempool) Size() int { return r0 } -// Mempool_Size_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Size' -type Mempool_Size_Call struct { - *mock.Call -} - -// Size is a helper method to define mock.On call -func (_e *Mempool_Expecter) Size() *Mempool_Size_Call { - return &Mempool_Size_Call{Call: _e.mock.On("Size")} -} - -func (_c *Mempool_Size_Call) Run(run func()) *Mempool_Size_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Mempool_Size_Call) Return(_a0 int) *Mempool_Size_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_Size_Call) RunAndReturn(run func() int) *Mempool_Size_Call { - _c.Call.Return(run) - return _c -} - // SizeBytes provides a mock function with given fields: func (_m *Mempool) SizeBytes() int64 { ret := _m.Called() @@ -424,33 +164,6 @@ func (_m *Mempool) SizeBytes() int64 { return r0 } -// Mempool_SizeBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SizeBytes' -type Mempool_SizeBytes_Call struct { - *mock.Call -} - -// SizeBytes is a helper method to define mock.On call -func (_e *Mempool_Expecter) SizeBytes() *Mempool_SizeBytes_Call { - return &Mempool_SizeBytes_Call{Call: _e.mock.On("SizeBytes")} -} - -func (_c *Mempool_SizeBytes_Call) Run(run func()) *Mempool_SizeBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Mempool_SizeBytes_Call) Return(_a0 int64) *Mempool_SizeBytes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_SizeBytes_Call) RunAndReturn(run func() int64) *Mempool_SizeBytes_Call { - _c.Call.Return(run) - return _c -} - // TxsAvailable provides a mock function with given fields: func (_m *Mempool) TxsAvailable() <-chan struct{} { ret := _m.Called() @@ -471,65 +184,11 @@ func (_m *Mempool) TxsAvailable() <-chan struct{} { return r0 } -// Mempool_TxsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxsAvailable' -type Mempool_TxsAvailable_Call struct { - *mock.Call -} - -// TxsAvailable is a helper method to define mock.On call -func (_e *Mempool_Expecter) TxsAvailable() *Mempool_TxsAvailable_Call { - return &Mempool_TxsAvailable_Call{Call: _e.mock.On("TxsAvailable")} -} - -func (_c *Mempool_TxsAvailable_Call) Run(run func()) *Mempool_TxsAvailable_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Mempool_TxsAvailable_Call) Return(_a0 <-chan struct{}) *Mempool_TxsAvailable_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_TxsAvailable_Call) RunAndReturn(run func() <-chan struct{}) *Mempool_TxsAvailable_Call { - _c.Call.Return(run) - return _c -} - // Unlock provides a mock function with given fields: func (_m *Mempool) Unlock() { _m.Called() } -// Mempool_Unlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unlock' -type Mempool_Unlock_Call struct { - *mock.Call -} - -// Unlock is a helper method to define mock.On call -func (_e *Mempool_Expecter) Unlock() *Mempool_Unlock_Call { - return &Mempool_Unlock_Call{Call: _e.mock.On("Unlock")} -} - -func (_c *Mempool_Unlock_Call) Run(run func()) *Mempool_Unlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Mempool_Unlock_Call) Return() *Mempool_Unlock_Call { - _c.Call.Return() - return _c -} - -func (_c *Mempool_Unlock_Call) RunAndReturn(run func()) *Mempool_Unlock_Call { - _c.Call.Return(run) - return _c -} - // Update provides a mock function with given fields: ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc, recheck bool) error { ret := _m.Called(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck) @@ -548,40 +207,6 @@ func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types return r0 } -// Mempool_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type Mempool_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - blockHeight int64 -// - blockTxs types.Txs -// - txResults []*abcitypes.ExecTxResult -// - newPreFn mempool.PreCheckFunc -// - newPostFn mempool.PostCheckFunc -// - recheck bool -func (_e *Mempool_Expecter) Update(ctx interface{}, blockHeight interface{}, blockTxs interface{}, txResults interface{}, newPreFn interface{}, newPostFn interface{}, recheck interface{}) *Mempool_Update_Call { - return &Mempool_Update_Call{Call: _e.mock.On("Update", ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck)} -} - -func (_c *Mempool_Update_Call) Run(run func(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc, recheck bool)) *Mempool_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(types.Txs), args[3].([]*abcitypes.ExecTxResult), args[4].(mempool.PreCheckFunc), args[5].(mempool.PostCheckFunc), args[6].(bool)) - }) - return _c -} - -func (_c *Mempool_Update_Call) Return(_a0 error) *Mempool_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Mempool_Update_Call) RunAndReturn(run func(context.Context, int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc, bool) error) *Mempool_Update_Call { - _c.Call.Return(run) - return _c -} - // NewMempool creates a new instance of Mempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMempool(t interface { diff --git a/internal/p2p/client/mocks/blockclient.go b/internal/p2p/client/mocks/blockclient.go index d4b8d0e3bd..5afae1d30a 100644 --- a/internal/p2p/client/mocks/blockclient.go +++ b/internal/p2p/client/mocks/blockclient.go @@ -19,14 +19,6 @@ type BlockClient struct { mock.Mock } -type BlockClient_Expecter struct { - mock *mock.Mock -} - -func (_m *BlockClient) EXPECT() *BlockClient_Expecter { - return &BlockClient_Expecter{mock: &_m.Mock} -} - // GetBlock provides a mock function with given fields: ctx, height, peerID func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error) { ret := _m.Called(ctx, height, peerID) @@ -57,36 +49,6 @@ func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types. return r0, r1 } -// BlockClient_GetBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlock' -type BlockClient_GetBlock_Call struct { - *mock.Call -} - -// GetBlock is a helper method to define mock.On call -// - ctx context.Context -// - height int64 -// - peerID types.NodeID -func (_e *BlockClient_Expecter) GetBlock(ctx interface{}, height interface{}, peerID interface{}) *BlockClient_GetBlock_Call { - return &BlockClient_GetBlock_Call{Call: _e.mock.On("GetBlock", ctx, height, peerID)} -} - -func (_c *BlockClient_GetBlock_Call) Run(run func(ctx context.Context, height int64, peerID types.NodeID)) *BlockClient_GetBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(types.NodeID)) - }) - return _c -} - -func (_c *BlockClient_GetBlock_Call) Return(_a0 *promise.Promise[*blocksync.BlockResponse], _a1 error) *BlockClient_GetBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BlockClient_GetBlock_Call) RunAndReturn(run func(context.Context, int64, types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)) *BlockClient_GetBlock_Call { - _c.Call.Return(run) - return _c -} - // GetSyncStatus provides a mock function with given fields: ctx func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { ret := _m.Called(ctx) @@ -105,34 +67,6 @@ func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { return r0 } -// BlockClient_GetSyncStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSyncStatus' -type BlockClient_GetSyncStatus_Call struct { - *mock.Call -} - -// GetSyncStatus is a helper method to define mock.On call -// - ctx context.Context -func (_e *BlockClient_Expecter) GetSyncStatus(ctx interface{}) *BlockClient_GetSyncStatus_Call { - return &BlockClient_GetSyncStatus_Call{Call: _e.mock.On("GetSyncStatus", ctx)} -} - -func (_c *BlockClient_GetSyncStatus_Call) Run(run func(ctx context.Context)) *BlockClient_GetSyncStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *BlockClient_GetSyncStatus_Call) Return(_a0 error) *BlockClient_GetSyncStatus_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockClient_GetSyncStatus_Call) RunAndReturn(run func(context.Context) error) *BlockClient_GetSyncStatus_Call { - _c.Call.Return(run) - return _c -} - // Send provides a mock function with given fields: ctx, msg func (_m *BlockClient) Send(ctx context.Context, msg any) error { ret := _m.Called(ctx, msg) @@ -151,35 +85,6 @@ func (_m *BlockClient) Send(ctx context.Context, msg any) error { return r0 } -// BlockClient_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' -type BlockClient_Send_Call struct { - *mock.Call -} - -// Send is a helper method to define mock.On call -// - ctx context.Context -// - msg any -func (_e *BlockClient_Expecter) Send(ctx interface{}, msg interface{}) *BlockClient_Send_Call { - return &BlockClient_Send_Call{Call: _e.mock.On("Send", ctx, msg)} -} - -func (_c *BlockClient_Send_Call) Run(run func(ctx context.Context, msg any)) *BlockClient_Send_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(any)) - }) - return _c -} - -func (_c *BlockClient_Send_Call) Return(_a0 error) *BlockClient_Send_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockClient_Send_Call) RunAndReturn(run func(context.Context, any) error) *BlockClient_Send_Call { - _c.Call.Return(run) - return _c -} - // NewBlockClient creates a new instance of BlockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewBlockClient(t interface { diff --git a/internal/p2p/client/mocks/snapshotclient.go b/internal/p2p/client/mocks/snapshotclient.go index 543143be7b..a88f2e269b 100644 --- a/internal/p2p/client/mocks/snapshotclient.go +++ b/internal/p2p/client/mocks/snapshotclient.go @@ -18,14 +18,6 @@ type SnapshotClient struct { mock.Mock } -type SnapshotClient_Expecter struct { - mock *mock.Mock -} - -func (_m *SnapshotClient) EXPECT() *SnapshotClient_Expecter { - return &SnapshotClient_Expecter{mock: &_m.Mock} -} - // GetChunk provides a mock function with given fields: ctx, peerID, height, format, index func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32) (*promise.Promise[*statesync.ChunkResponse], error) { ret := _m.Called(ctx, peerID, height, format, index) @@ -56,38 +48,6 @@ func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, hei return r0, r1 } -// SnapshotClient_GetChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChunk' -type SnapshotClient_GetChunk_Call struct { - *mock.Call -} - -// GetChunk is a helper method to define mock.On call -// - ctx context.Context -// - peerID types.NodeID -// - height uint64 -// - format uint32 -// - index uint32 -func (_e *SnapshotClient_Expecter) GetChunk(ctx interface{}, peerID interface{}, height interface{}, format interface{}, index interface{}) *SnapshotClient_GetChunk_Call { - return &SnapshotClient_GetChunk_Call{Call: _e.mock.On("GetChunk", ctx, peerID, height, format, index)} -} - -func (_c *SnapshotClient_GetChunk_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32)) *SnapshotClient_GetChunk_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.NodeID), args[2].(uint64), args[3].(uint32), args[4].(uint32)) - }) - return _c -} - -func (_c *SnapshotClient_GetChunk_Call) Return(_a0 *promise.Promise[*statesync.ChunkResponse], _a1 error) *SnapshotClient_GetChunk_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *SnapshotClient_GetChunk_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64, uint32, uint32) (*promise.Promise[*statesync.ChunkResponse], error)) *SnapshotClient_GetChunk_Call { - _c.Call.Return(run) - return _c -} - // GetLightBlock provides a mock function with given fields: ctx, peerID, height func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.LightBlockResponse], error) { ret := _m.Called(ctx, peerID, height) @@ -118,36 +78,6 @@ func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID return r0, r1 } -// SnapshotClient_GetLightBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLightBlock' -type SnapshotClient_GetLightBlock_Call struct { - *mock.Call -} - -// GetLightBlock is a helper method to define mock.On call -// - ctx context.Context -// - peerID types.NodeID -// - height uint64 -func (_e *SnapshotClient_Expecter) GetLightBlock(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetLightBlock_Call { - return &SnapshotClient_GetLightBlock_Call{Call: _e.mock.On("GetLightBlock", ctx, peerID, height)} -} - -func (_c *SnapshotClient_GetLightBlock_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64)) *SnapshotClient_GetLightBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.NodeID), args[2].(uint64)) - }) - return _c -} - -func (_c *SnapshotClient_GetLightBlock_Call) Return(_a0 *promise.Promise[*statesync.LightBlockResponse], _a1 error) *SnapshotClient_GetLightBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *SnapshotClient_GetLightBlock_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.LightBlockResponse], error)) *SnapshotClient_GetLightBlock_Call { - _c.Call.Return(run) - return _c -} - // GetParams provides a mock function with given fields: ctx, peerID, height func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.ParamsResponse], error) { ret := _m.Called(ctx, peerID, height) @@ -178,36 +108,6 @@ func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, he return r0, r1 } -// SnapshotClient_GetParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParams' -type SnapshotClient_GetParams_Call struct { - *mock.Call -} - -// GetParams is a helper method to define mock.On call -// - ctx context.Context -// - peerID types.NodeID -// - height uint64 -func (_e *SnapshotClient_Expecter) GetParams(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetParams_Call { - return &SnapshotClient_GetParams_Call{Call: _e.mock.On("GetParams", ctx, peerID, height)} -} - -func (_c *SnapshotClient_GetParams_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64)) *SnapshotClient_GetParams_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.NodeID), args[2].(uint64)) - }) - return _c -} - -func (_c *SnapshotClient_GetParams_Call) Return(_a0 *promise.Promise[*statesync.ParamsResponse], _a1 error) *SnapshotClient_GetParams_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *SnapshotClient_GetParams_Call) RunAndReturn(run func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.ParamsResponse], error)) *SnapshotClient_GetParams_Call { - _c.Call.Return(run) - return _c -} - // GetSnapshots provides a mock function with given fields: ctx, peerID func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) error { ret := _m.Called(ctx, peerID) @@ -226,35 +126,6 @@ func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) return r0 } -// SnapshotClient_GetSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSnapshots' -type SnapshotClient_GetSnapshots_Call struct { - *mock.Call -} - -// GetSnapshots is a helper method to define mock.On call -// - ctx context.Context -// - peerID types.NodeID -func (_e *SnapshotClient_Expecter) GetSnapshots(ctx interface{}, peerID interface{}) *SnapshotClient_GetSnapshots_Call { - return &SnapshotClient_GetSnapshots_Call{Call: _e.mock.On("GetSnapshots", ctx, peerID)} -} - -func (_c *SnapshotClient_GetSnapshots_Call) Run(run func(ctx context.Context, peerID types.NodeID)) *SnapshotClient_GetSnapshots_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.NodeID)) - }) - return _c -} - -func (_c *SnapshotClient_GetSnapshots_Call) Return(_a0 error) *SnapshotClient_GetSnapshots_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *SnapshotClient_GetSnapshots_Call) RunAndReturn(run func(context.Context, types.NodeID) error) *SnapshotClient_GetSnapshots_Call { - _c.Call.Return(run) - return _c -} - // NewSnapshotClient creates a new instance of SnapshotClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewSnapshotClient(t interface { diff --git a/internal/p2p/mocks/channel.go b/internal/p2p/mocks/channel.go index 9ff79d4f5f..ae54580e6f 100644 --- a/internal/p2p/mocks/channel.go +++ b/internal/p2p/mocks/channel.go @@ -14,14 +14,6 @@ type Channel struct { mock.Mock } -type Channel_Expecter struct { - mock *mock.Mock -} - -func (_m *Channel) EXPECT() *Channel_Expecter { - return &Channel_Expecter{mock: &_m.Mock} -} - // Err provides a mock function with given fields: func (_m *Channel) Err() error { ret := _m.Called() @@ -40,33 +32,6 @@ func (_m *Channel) Err() error { return r0 } -// Channel_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err' -type Channel_Err_Call struct { - *mock.Call -} - -// Err is a helper method to define mock.On call -func (_e *Channel_Expecter) Err() *Channel_Err_Call { - return &Channel_Err_Call{Call: _e.mock.On("Err")} -} - -func (_c *Channel_Err_Call) Run(run func()) *Channel_Err_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Channel_Err_Call) Return(_a0 error) *Channel_Err_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Channel_Err_Call) RunAndReturn(run func() error) *Channel_Err_Call { - _c.Call.Return(run) - return _c -} - // Receive provides a mock function with given fields: _a0 func (_m *Channel) Receive(_a0 context.Context) p2p.ChannelIterator { ret := _m.Called(_a0) @@ -87,34 +52,6 @@ func (_m *Channel) Receive(_a0 context.Context) p2p.ChannelIterator { return r0 } -// Channel_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' -type Channel_Receive_Call struct { - *mock.Call -} - -// Receive is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Channel_Expecter) Receive(_a0 interface{}) *Channel_Receive_Call { - return &Channel_Receive_Call{Call: _e.mock.On("Receive", _a0)} -} - -func (_c *Channel_Receive_Call) Run(run func(_a0 context.Context)) *Channel_Receive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Channel_Receive_Call) Return(_a0 p2p.ChannelIterator) *Channel_Receive_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Channel_Receive_Call) RunAndReturn(run func(context.Context) p2p.ChannelIterator) *Channel_Receive_Call { - _c.Call.Return(run) - return _c -} - // Send provides a mock function with given fields: _a0, _a1 func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error { ret := _m.Called(_a0, _a1) @@ -133,35 +70,6 @@ func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error { return r0 } -// Channel_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' -type Channel_Send_Call struct { - *mock.Call -} - -// Send is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 p2p.Envelope -func (_e *Channel_Expecter) Send(_a0 interface{}, _a1 interface{}) *Channel_Send_Call { - return &Channel_Send_Call{Call: _e.mock.On("Send", _a0, _a1)} -} - -func (_c *Channel_Send_Call) Run(run func(_a0 context.Context, _a1 p2p.Envelope)) *Channel_Send_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(p2p.Envelope)) - }) - return _c -} - -func (_c *Channel_Send_Call) Return(_a0 error) *Channel_Send_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Channel_Send_Call) RunAndReturn(run func(context.Context, p2p.Envelope) error) *Channel_Send_Call { - _c.Call.Return(run) - return _c -} - // SendError provides a mock function with given fields: _a0, _a1 func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { ret := _m.Called(_a0, _a1) @@ -180,35 +88,6 @@ func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { return r0 } -// Channel_SendError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendError' -type Channel_SendError_Call struct { - *mock.Call -} - -// SendError is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 p2p.PeerError -func (_e *Channel_Expecter) SendError(_a0 interface{}, _a1 interface{}) *Channel_SendError_Call { - return &Channel_SendError_Call{Call: _e.mock.On("SendError", _a0, _a1)} -} - -func (_c *Channel_SendError_Call) Run(run func(_a0 context.Context, _a1 p2p.PeerError)) *Channel_SendError_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(p2p.PeerError)) - }) - return _c -} - -func (_c *Channel_SendError_Call) Return(_a0 error) *Channel_SendError_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Channel_SendError_Call) RunAndReturn(run func(context.Context, p2p.PeerError) error) *Channel_SendError_Call { - _c.Call.Return(run) - return _c -} - // String provides a mock function with given fields: func (_m *Channel) String() string { ret := _m.Called() @@ -227,33 +106,6 @@ func (_m *Channel) String() string { return r0 } -// Channel_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type Channel_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *Channel_Expecter) String() *Channel_String_Call { - return &Channel_String_Call{Call: _e.mock.On("String")} -} - -func (_c *Channel_String_Call) Run(run func()) *Channel_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Channel_String_Call) Return(_a0 string) *Channel_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Channel_String_Call) RunAndReturn(run func() string) *Channel_String_Call { - _c.Call.Return(run) - return _c -} - // NewChannel creates a new instance of Channel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewChannel(t interface { diff --git a/internal/p2p/mocks/connection.go b/internal/p2p/mocks/connection.go index 1b0611d4b6..8555ef9e34 100644 --- a/internal/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -20,14 +20,6 @@ type Connection struct { mock.Mock } -type Connection_Expecter struct { - mock *mock.Mock -} - -func (_m *Connection) EXPECT() *Connection_Expecter { - return &Connection_Expecter{mock: &_m.Mock} -} - // Close provides a mock function with given fields: func (_m *Connection) Close() error { ret := _m.Called() @@ -46,33 +38,6 @@ func (_m *Connection) Close() error { return r0 } -// Connection_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' -type Connection_Close_Call struct { - *mock.Call -} - -// Close is a helper method to define mock.On call -func (_e *Connection_Expecter) Close() *Connection_Close_Call { - return &Connection_Close_Call{Call: _e.mock.On("Close")} -} - -func (_c *Connection_Close_Call) Run(run func()) *Connection_Close_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Connection_Close_Call) Return(_a0 error) *Connection_Close_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Connection_Close_Call) RunAndReturn(run func() error) *Connection_Close_Call { - _c.Call.Return(run) - return _c -} - // Handshake provides a mock function with given fields: _a0, _a1, _a2, _a3 func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 types.NodeInfo, _a3 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error) { ret := _m.Called(_a0, _a1, _a2, _a3) @@ -110,37 +75,6 @@ func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 type return r0, r1, r2 } -// Connection_Handshake_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Handshake' -type Connection_Handshake_Call struct { - *mock.Call -} - -// Handshake is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 time.Duration -// - _a2 types.NodeInfo -// - _a3 crypto.PrivKey -func (_e *Connection_Expecter) Handshake(_a0 interface{}, _a1 interface{}, _a2 interface{}, _a3 interface{}) *Connection_Handshake_Call { - return &Connection_Handshake_Call{Call: _e.mock.On("Handshake", _a0, _a1, _a2, _a3)} -} - -func (_c *Connection_Handshake_Call) Run(run func(_a0 context.Context, _a1 time.Duration, _a2 types.NodeInfo, _a3 crypto.PrivKey)) *Connection_Handshake_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(time.Duration), args[2].(types.NodeInfo), args[3].(crypto.PrivKey)) - }) - return _c -} - -func (_c *Connection_Handshake_Call) Return(_a0 types.NodeInfo, _a1 crypto.PubKey, _a2 error) *Connection_Handshake_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *Connection_Handshake_Call) RunAndReturn(run func(context.Context, time.Duration, types.NodeInfo, crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error)) *Connection_Handshake_Call { - _c.Call.Return(run) - return _c -} - // LocalEndpoint provides a mock function with given fields: func (_m *Connection) LocalEndpoint() p2p.Endpoint { ret := _m.Called() @@ -159,33 +93,6 @@ func (_m *Connection) LocalEndpoint() p2p.Endpoint { return r0 } -// Connection_LocalEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LocalEndpoint' -type Connection_LocalEndpoint_Call struct { - *mock.Call -} - -// LocalEndpoint is a helper method to define mock.On call -func (_e *Connection_Expecter) LocalEndpoint() *Connection_LocalEndpoint_Call { - return &Connection_LocalEndpoint_Call{Call: _e.mock.On("LocalEndpoint")} -} - -func (_c *Connection_LocalEndpoint_Call) Run(run func()) *Connection_LocalEndpoint_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Connection_LocalEndpoint_Call) Return(_a0 p2p.Endpoint) *Connection_LocalEndpoint_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Connection_LocalEndpoint_Call) RunAndReturn(run func() p2p.Endpoint) *Connection_LocalEndpoint_Call { - _c.Call.Return(run) - return _c -} - // ReceiveMessage provides a mock function with given fields: _a0 func (_m *Connection) ReceiveMessage(_a0 context.Context) (p2p.ChannelID, []byte, error) { ret := _m.Called(_a0) @@ -223,34 +130,6 @@ func (_m *Connection) ReceiveMessage(_a0 context.Context) (p2p.ChannelID, []byte return r0, r1, r2 } -// Connection_ReceiveMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReceiveMessage' -type Connection_ReceiveMessage_Call struct { - *mock.Call -} - -// ReceiveMessage is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Connection_Expecter) ReceiveMessage(_a0 interface{}) *Connection_ReceiveMessage_Call { - return &Connection_ReceiveMessage_Call{Call: _e.mock.On("ReceiveMessage", _a0)} -} - -func (_c *Connection_ReceiveMessage_Call) Run(run func(_a0 context.Context)) *Connection_ReceiveMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Connection_ReceiveMessage_Call) Return(_a0 p2p.ChannelID, _a1 []byte, _a2 error) *Connection_ReceiveMessage_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *Connection_ReceiveMessage_Call) RunAndReturn(run func(context.Context) (p2p.ChannelID, []byte, error)) *Connection_ReceiveMessage_Call { - _c.Call.Return(run) - return _c -} - // RemoteEndpoint provides a mock function with given fields: func (_m *Connection) RemoteEndpoint() p2p.Endpoint { ret := _m.Called() @@ -269,33 +148,6 @@ func (_m *Connection) RemoteEndpoint() p2p.Endpoint { return r0 } -// Connection_RemoteEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoteEndpoint' -type Connection_RemoteEndpoint_Call struct { - *mock.Call -} - -// RemoteEndpoint is a helper method to define mock.On call -func (_e *Connection_Expecter) RemoteEndpoint() *Connection_RemoteEndpoint_Call { - return &Connection_RemoteEndpoint_Call{Call: _e.mock.On("RemoteEndpoint")} -} - -func (_c *Connection_RemoteEndpoint_Call) Run(run func()) *Connection_RemoteEndpoint_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Connection_RemoteEndpoint_Call) Return(_a0 p2p.Endpoint) *Connection_RemoteEndpoint_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Connection_RemoteEndpoint_Call) RunAndReturn(run func() p2p.Endpoint) *Connection_RemoteEndpoint_Call { - _c.Call.Return(run) - return _c -} - // SendMessage provides a mock function with given fields: _a0, _a1, _a2 func (_m *Connection) SendMessage(_a0 context.Context, _a1 p2p.ChannelID, _a2 []byte) error { ret := _m.Called(_a0, _a1, _a2) @@ -314,36 +166,6 @@ func (_m *Connection) SendMessage(_a0 context.Context, _a1 p2p.ChannelID, _a2 [] return r0 } -// Connection_SendMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMessage' -type Connection_SendMessage_Call struct { - *mock.Call -} - -// SendMessage is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 p2p.ChannelID -// - _a2 []byte -func (_e *Connection_Expecter) SendMessage(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Connection_SendMessage_Call { - return &Connection_SendMessage_Call{Call: _e.mock.On("SendMessage", _a0, _a1, _a2)} -} - -func (_c *Connection_SendMessage_Call) Run(run func(_a0 context.Context, _a1 p2p.ChannelID, _a2 []byte)) *Connection_SendMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(p2p.ChannelID), args[2].([]byte)) - }) - return _c -} - -func (_c *Connection_SendMessage_Call) Return(_a0 error) *Connection_SendMessage_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Connection_SendMessage_Call) RunAndReturn(run func(context.Context, p2p.ChannelID, []byte) error) *Connection_SendMessage_Call { - _c.Call.Return(run) - return _c -} - // String provides a mock function with given fields: func (_m *Connection) String() string { ret := _m.Called() @@ -362,33 +184,6 @@ func (_m *Connection) String() string { return r0 } -// Connection_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type Connection_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *Connection_Expecter) String() *Connection_String_Call { - return &Connection_String_Call{Call: _e.mock.On("String")} -} - -func (_c *Connection_String_Call) Run(run func()) *Connection_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Connection_String_Call) Return(_a0 string) *Connection_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Connection_String_Call) RunAndReturn(run func() string) *Connection_String_Call { - _c.Call.Return(run) - return _c -} - // NewConnection creates a new instance of Connection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewConnection(t interface { diff --git a/internal/p2p/mocks/transport.go b/internal/p2p/mocks/transport.go index 90cc99b416..5ffc747d2a 100644 --- a/internal/p2p/mocks/transport.go +++ b/internal/p2p/mocks/transport.go @@ -14,14 +14,6 @@ type Transport struct { mock.Mock } -type Transport_Expecter struct { - mock *mock.Mock -} - -func (_m *Transport) EXPECT() *Transport_Expecter { - return &Transport_Expecter{mock: &_m.Mock} -} - // Accept provides a mock function with given fields: _a0 func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error) { ret := _m.Called(_a0) @@ -52,67 +44,11 @@ func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error) { return r0, r1 } -// Transport_Accept_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Accept' -type Transport_Accept_Call struct { - *mock.Call -} - -// Accept is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Transport_Expecter) Accept(_a0 interface{}) *Transport_Accept_Call { - return &Transport_Accept_Call{Call: _e.mock.On("Accept", _a0)} -} - -func (_c *Transport_Accept_Call) Run(run func(_a0 context.Context)) *Transport_Accept_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Transport_Accept_Call) Return(_a0 p2p.Connection, _a1 error) *Transport_Accept_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Transport_Accept_Call) RunAndReturn(run func(context.Context) (p2p.Connection, error)) *Transport_Accept_Call { - _c.Call.Return(run) - return _c -} - // AddChannelDescriptors provides a mock function with given fields: _a0 func (_m *Transport) AddChannelDescriptors(_a0 []*p2p.ChannelDescriptor) { _m.Called(_a0) } -// Transport_AddChannelDescriptors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddChannelDescriptors' -type Transport_AddChannelDescriptors_Call struct { - *mock.Call -} - -// AddChannelDescriptors is a helper method to define mock.On call -// - _a0 []*p2p.ChannelDescriptor -func (_e *Transport_Expecter) AddChannelDescriptors(_a0 interface{}) *Transport_AddChannelDescriptors_Call { - return &Transport_AddChannelDescriptors_Call{Call: _e.mock.On("AddChannelDescriptors", _a0)} -} - -func (_c *Transport_AddChannelDescriptors_Call) Run(run func(_a0 []*p2p.ChannelDescriptor)) *Transport_AddChannelDescriptors_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]*p2p.ChannelDescriptor)) - }) - return _c -} - -func (_c *Transport_AddChannelDescriptors_Call) Return() *Transport_AddChannelDescriptors_Call { - _c.Call.Return() - return _c -} - -func (_c *Transport_AddChannelDescriptors_Call) RunAndReturn(run func([]*p2p.ChannelDescriptor)) *Transport_AddChannelDescriptors_Call { - _c.Call.Return(run) - return _c -} - // Close provides a mock function with given fields: func (_m *Transport) Close() error { ret := _m.Called() @@ -131,33 +67,6 @@ func (_m *Transport) Close() error { return r0 } -// Transport_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' -type Transport_Close_Call struct { - *mock.Call -} - -// Close is a helper method to define mock.On call -func (_e *Transport_Expecter) Close() *Transport_Close_Call { - return &Transport_Close_Call{Call: _e.mock.On("Close")} -} - -func (_c *Transport_Close_Call) Run(run func()) *Transport_Close_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Transport_Close_Call) Return(_a0 error) *Transport_Close_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Transport_Close_Call) RunAndReturn(run func() error) *Transport_Close_Call { - _c.Call.Return(run) - return _c -} - // Dial provides a mock function with given fields: _a0, _a1 func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connection, error) { ret := _m.Called(_a0, _a1) @@ -188,35 +97,6 @@ func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connectio return r0, r1 } -// Transport_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial' -type Transport_Dial_Call struct { - *mock.Call -} - -// Dial is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *p2p.Endpoint -func (_e *Transport_Expecter) Dial(_a0 interface{}, _a1 interface{}) *Transport_Dial_Call { - return &Transport_Dial_Call{Call: _e.mock.On("Dial", _a0, _a1)} -} - -func (_c *Transport_Dial_Call) Run(run func(_a0 context.Context, _a1 *p2p.Endpoint)) *Transport_Dial_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*p2p.Endpoint)) - }) - return _c -} - -func (_c *Transport_Dial_Call) Return(_a0 p2p.Connection, _a1 error) *Transport_Dial_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Transport_Dial_Call) RunAndReturn(run func(context.Context, *p2p.Endpoint) (p2p.Connection, error)) *Transport_Dial_Call { - _c.Call.Return(run) - return _c -} - // Endpoint provides a mock function with given fields: func (_m *Transport) Endpoint() (*p2p.Endpoint, error) { ret := _m.Called() @@ -247,33 +127,6 @@ func (_m *Transport) Endpoint() (*p2p.Endpoint, error) { return r0, r1 } -// Transport_Endpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Endpoint' -type Transport_Endpoint_Call struct { - *mock.Call -} - -// Endpoint is a helper method to define mock.On call -func (_e *Transport_Expecter) Endpoint() *Transport_Endpoint_Call { - return &Transport_Endpoint_Call{Call: _e.mock.On("Endpoint")} -} - -func (_c *Transport_Endpoint_Call) Run(run func()) *Transport_Endpoint_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Transport_Endpoint_Call) Return(_a0 *p2p.Endpoint, _a1 error) *Transport_Endpoint_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Transport_Endpoint_Call) RunAndReturn(run func() (*p2p.Endpoint, error)) *Transport_Endpoint_Call { - _c.Call.Return(run) - return _c -} - // Listen provides a mock function with given fields: _a0 func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { ret := _m.Called(_a0) @@ -292,34 +145,6 @@ func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { return r0 } -// Transport_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen' -type Transport_Listen_Call struct { - *mock.Call -} - -// Listen is a helper method to define mock.On call -// - _a0 *p2p.Endpoint -func (_e *Transport_Expecter) Listen(_a0 interface{}) *Transport_Listen_Call { - return &Transport_Listen_Call{Call: _e.mock.On("Listen", _a0)} -} - -func (_c *Transport_Listen_Call) Run(run func(_a0 *p2p.Endpoint)) *Transport_Listen_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*p2p.Endpoint)) - }) - return _c -} - -func (_c *Transport_Listen_Call) Return(_a0 error) *Transport_Listen_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Transport_Listen_Call) RunAndReturn(run func(*p2p.Endpoint) error) *Transport_Listen_Call { - _c.Call.Return(run) - return _c -} - // Protocols provides a mock function with given fields: func (_m *Transport) Protocols() []p2p.Protocol { ret := _m.Called() @@ -340,33 +165,6 @@ func (_m *Transport) Protocols() []p2p.Protocol { return r0 } -// Transport_Protocols_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Protocols' -type Transport_Protocols_Call struct { - *mock.Call -} - -// Protocols is a helper method to define mock.On call -func (_e *Transport_Expecter) Protocols() *Transport_Protocols_Call { - return &Transport_Protocols_Call{Call: _e.mock.On("Protocols")} -} - -func (_c *Transport_Protocols_Call) Run(run func()) *Transport_Protocols_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Transport_Protocols_Call) Return(_a0 []p2p.Protocol) *Transport_Protocols_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Transport_Protocols_Call) RunAndReturn(run func() []p2p.Protocol) *Transport_Protocols_Call { - _c.Call.Return(run) - return _c -} - // String provides a mock function with given fields: func (_m *Transport) String() string { ret := _m.Called() @@ -385,33 +183,6 @@ func (_m *Transport) String() string { return r0 } -// Transport_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' -type Transport_String_Call struct { - *mock.Call -} - -// String is a helper method to define mock.On call -func (_e *Transport_Expecter) String() *Transport_String_Call { - return &Transport_String_Call{Call: _e.mock.On("String")} -} - -func (_c *Transport_String_Call) Run(run func()) *Transport_String_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Transport_String_Call) Return(_a0 string) *Transport_String_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Transport_String_Call) RunAndReturn(run func() string) *Transport_String_Call { - _c.Call.Return(run) - return _c -} - // NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewTransport(t interface { diff --git a/internal/state/indexer/mocks/eventsink.go b/internal/state/indexer/mocks/eventsink.go index a40a3729d3..8288781bc0 100644 --- a/internal/state/indexer/mocks/eventsink.go +++ b/internal/state/indexer/mocks/eventsink.go @@ -20,14 +20,6 @@ type EventSink struct { mock.Mock } -type EventSink_Expecter struct { - mock *mock.Mock -} - -func (_m *EventSink) EXPECT() *EventSink_Expecter { - return &EventSink_Expecter{mock: &_m.Mock} -} - // GetTxByHash provides a mock function with given fields: _a0 func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { ret := _m.Called(_a0) @@ -58,34 +50,6 @@ func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { return r0, r1 } -// EventSink_GetTxByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTxByHash' -type EventSink_GetTxByHash_Call struct { - *mock.Call -} - -// GetTxByHash is a helper method to define mock.On call -// - _a0 []byte -func (_e *EventSink_Expecter) GetTxByHash(_a0 interface{}) *EventSink_GetTxByHash_Call { - return &EventSink_GetTxByHash_Call{Call: _e.mock.On("GetTxByHash", _a0)} -} - -func (_c *EventSink_GetTxByHash_Call) Run(run func(_a0 []byte)) *EventSink_GetTxByHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *EventSink_GetTxByHash_Call) Return(_a0 *types.TxResult, _a1 error) *EventSink_GetTxByHash_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *EventSink_GetTxByHash_Call) RunAndReturn(run func([]byte) (*types.TxResult, error)) *EventSink_GetTxByHash_Call { - _c.Call.Return(run) - return _c -} - // HasBlock provides a mock function with given fields: _a0 func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { ret := _m.Called(_a0) @@ -114,34 +78,6 @@ func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { return r0, r1 } -// EventSink_HasBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasBlock' -type EventSink_HasBlock_Call struct { - *mock.Call -} - -// HasBlock is a helper method to define mock.On call -// - _a0 int64 -func (_e *EventSink_Expecter) HasBlock(_a0 interface{}) *EventSink_HasBlock_Call { - return &EventSink_HasBlock_Call{Call: _e.mock.On("HasBlock", _a0)} -} - -func (_c *EventSink_HasBlock_Call) Run(run func(_a0 int64)) *EventSink_HasBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *EventSink_HasBlock_Call) Return(_a0 bool, _a1 error) *EventSink_HasBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *EventSink_HasBlock_Call) RunAndReturn(run func(int64) (bool, error)) *EventSink_HasBlock_Call { - _c.Call.Return(run) - return _c -} - // IndexBlockEvents provides a mock function with given fields: _a0 func (_m *EventSink) IndexBlockEvents(_a0 tenderdashtypes.EventDataNewBlockHeader) error { ret := _m.Called(_a0) @@ -160,34 +96,6 @@ func (_m *EventSink) IndexBlockEvents(_a0 tenderdashtypes.EventDataNewBlockHeade return r0 } -// EventSink_IndexBlockEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexBlockEvents' -type EventSink_IndexBlockEvents_Call struct { - *mock.Call -} - -// IndexBlockEvents is a helper method to define mock.On call -// - _a0 tenderdashtypes.EventDataNewBlockHeader -func (_e *EventSink_Expecter) IndexBlockEvents(_a0 interface{}) *EventSink_IndexBlockEvents_Call { - return &EventSink_IndexBlockEvents_Call{Call: _e.mock.On("IndexBlockEvents", _a0)} -} - -func (_c *EventSink_IndexBlockEvents_Call) Run(run func(_a0 tenderdashtypes.EventDataNewBlockHeader)) *EventSink_IndexBlockEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(tenderdashtypes.EventDataNewBlockHeader)) - }) - return _c -} - -func (_c *EventSink_IndexBlockEvents_Call) Return(_a0 error) *EventSink_IndexBlockEvents_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *EventSink_IndexBlockEvents_Call) RunAndReturn(run func(tenderdashtypes.EventDataNewBlockHeader) error) *EventSink_IndexBlockEvents_Call { - _c.Call.Return(run) - return _c -} - // IndexTxEvents provides a mock function with given fields: _a0 func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { ret := _m.Called(_a0) @@ -206,34 +114,6 @@ func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { return r0 } -// EventSink_IndexTxEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexTxEvents' -type EventSink_IndexTxEvents_Call struct { - *mock.Call -} - -// IndexTxEvents is a helper method to define mock.On call -// - _a0 []*types.TxResult -func (_e *EventSink_Expecter) IndexTxEvents(_a0 interface{}) *EventSink_IndexTxEvents_Call { - return &EventSink_IndexTxEvents_Call{Call: _e.mock.On("IndexTxEvents", _a0)} -} - -func (_c *EventSink_IndexTxEvents_Call) Run(run func(_a0 []*types.TxResult)) *EventSink_IndexTxEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]*types.TxResult)) - }) - return _c -} - -func (_c *EventSink_IndexTxEvents_Call) Return(_a0 error) *EventSink_IndexTxEvents_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *EventSink_IndexTxEvents_Call) RunAndReturn(run func([]*types.TxResult) error) *EventSink_IndexTxEvents_Call { - _c.Call.Return(run) - return _c -} - // SearchBlockEvents provides a mock function with given fields: _a0, _a1 func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([]int64, error) { ret := _m.Called(_a0, _a1) @@ -264,35 +144,6 @@ func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([ return r0, r1 } -// EventSink_SearchBlockEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchBlockEvents' -type EventSink_SearchBlockEvents_Call struct { - *mock.Call -} - -// SearchBlockEvents is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *query.Query -func (_e *EventSink_Expecter) SearchBlockEvents(_a0 interface{}, _a1 interface{}) *EventSink_SearchBlockEvents_Call { - return &EventSink_SearchBlockEvents_Call{Call: _e.mock.On("SearchBlockEvents", _a0, _a1)} -} - -func (_c *EventSink_SearchBlockEvents_Call) Run(run func(_a0 context.Context, _a1 *query.Query)) *EventSink_SearchBlockEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*query.Query)) - }) - return _c -} - -func (_c *EventSink_SearchBlockEvents_Call) Return(_a0 []int64, _a1 error) *EventSink_SearchBlockEvents_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *EventSink_SearchBlockEvents_Call) RunAndReturn(run func(context.Context, *query.Query) ([]int64, error)) *EventSink_SearchBlockEvents_Call { - _c.Call.Return(run) - return _c -} - // SearchTxEvents provides a mock function with given fields: _a0, _a1 func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*types.TxResult, error) { ret := _m.Called(_a0, _a1) @@ -323,35 +174,6 @@ func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*t return r0, r1 } -// EventSink_SearchTxEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchTxEvents' -type EventSink_SearchTxEvents_Call struct { - *mock.Call -} - -// SearchTxEvents is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 *query.Query -func (_e *EventSink_Expecter) SearchTxEvents(_a0 interface{}, _a1 interface{}) *EventSink_SearchTxEvents_Call { - return &EventSink_SearchTxEvents_Call{Call: _e.mock.On("SearchTxEvents", _a0, _a1)} -} - -func (_c *EventSink_SearchTxEvents_Call) Run(run func(_a0 context.Context, _a1 *query.Query)) *EventSink_SearchTxEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*query.Query)) - }) - return _c -} - -func (_c *EventSink_SearchTxEvents_Call) Return(_a0 []*types.TxResult, _a1 error) *EventSink_SearchTxEvents_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *EventSink_SearchTxEvents_Call) RunAndReturn(run func(context.Context, *query.Query) ([]*types.TxResult, error)) *EventSink_SearchTxEvents_Call { - _c.Call.Return(run) - return _c -} - // Stop provides a mock function with given fields: func (_m *EventSink) Stop() error { ret := _m.Called() @@ -370,33 +192,6 @@ func (_m *EventSink) Stop() error { return r0 } -// EventSink_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' -type EventSink_Stop_Call struct { - *mock.Call -} - -// Stop is a helper method to define mock.On call -func (_e *EventSink_Expecter) Stop() *EventSink_Stop_Call { - return &EventSink_Stop_Call{Call: _e.mock.On("Stop")} -} - -func (_c *EventSink_Stop_Call) Run(run func()) *EventSink_Stop_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *EventSink_Stop_Call) Return(_a0 error) *EventSink_Stop_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *EventSink_Stop_Call) RunAndReturn(run func() error) *EventSink_Stop_Call { - _c.Call.Return(run) - return _c -} - // Type provides a mock function with given fields: func (_m *EventSink) Type() indexer.EventSinkType { ret := _m.Called() @@ -415,33 +210,6 @@ func (_m *EventSink) Type() indexer.EventSinkType { return r0 } -// EventSink_Type_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Type' -type EventSink_Type_Call struct { - *mock.Call -} - -// Type is a helper method to define mock.On call -func (_e *EventSink_Expecter) Type() *EventSink_Type_Call { - return &EventSink_Type_Call{Call: _e.mock.On("Type")} -} - -func (_c *EventSink_Type_Call) Run(run func()) *EventSink_Type_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *EventSink_Type_Call) Return(_a0 indexer.EventSinkType) *EventSink_Type_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *EventSink_Type_Call) RunAndReturn(run func() indexer.EventSinkType) *EventSink_Type_Call { - _c.Call.Return(run) - return _c -} - // NewEventSink creates a new instance of EventSink. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewEventSink(t interface { diff --git a/internal/state/mocks/blockstore.go b/internal/state/mocks/blockstore.go index dc3b8e9e0e..63873d194a 100644 --- a/internal/state/mocks/blockstore.go +++ b/internal/state/mocks/blockstore.go @@ -13,14 +13,6 @@ type BlockStore struct { mock.Mock } -type BlockStore_Expecter struct { - mock *mock.Mock -} - -func (_m *BlockStore) EXPECT() *BlockStore_Expecter { - return &BlockStore_Expecter{mock: &_m.Mock} -} - // Base provides a mock function with given fields: func (_m *BlockStore) Base() int64 { ret := _m.Called() @@ -39,33 +31,6 @@ func (_m *BlockStore) Base() int64 { return r0 } -// BlockStore_Base_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Base' -type BlockStore_Base_Call struct { - *mock.Call -} - -// Base is a helper method to define mock.On call -func (_e *BlockStore_Expecter) Base() *BlockStore_Base_Call { - return &BlockStore_Base_Call{Call: _e.mock.On("Base")} -} - -func (_c *BlockStore_Base_Call) Run(run func()) *BlockStore_Base_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BlockStore_Base_Call) Return(_a0 int64) *BlockStore_Base_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_Base_Call) RunAndReturn(run func() int64) *BlockStore_Base_Call { - _c.Call.Return(run) - return _c -} - // CoreChainLockedHeight provides a mock function with given fields: func (_m *BlockStore) CoreChainLockedHeight() uint32 { ret := _m.Called() @@ -84,33 +49,6 @@ func (_m *BlockStore) CoreChainLockedHeight() uint32 { return r0 } -// BlockStore_CoreChainLockedHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CoreChainLockedHeight' -type BlockStore_CoreChainLockedHeight_Call struct { - *mock.Call -} - -// CoreChainLockedHeight is a helper method to define mock.On call -func (_e *BlockStore_Expecter) CoreChainLockedHeight() *BlockStore_CoreChainLockedHeight_Call { - return &BlockStore_CoreChainLockedHeight_Call{Call: _e.mock.On("CoreChainLockedHeight")} -} - -func (_c *BlockStore_CoreChainLockedHeight_Call) Run(run func()) *BlockStore_CoreChainLockedHeight_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BlockStore_CoreChainLockedHeight_Call) Return(_a0 uint32) *BlockStore_CoreChainLockedHeight_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_CoreChainLockedHeight_Call) RunAndReturn(run func() uint32) *BlockStore_CoreChainLockedHeight_Call { - _c.Call.Return(run) - return _c -} - // Height provides a mock function with given fields: func (_m *BlockStore) Height() int64 { ret := _m.Called() @@ -129,33 +67,6 @@ func (_m *BlockStore) Height() int64 { return r0 } -// BlockStore_Height_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Height' -type BlockStore_Height_Call struct { - *mock.Call -} - -// Height is a helper method to define mock.On call -func (_e *BlockStore_Expecter) Height() *BlockStore_Height_Call { - return &BlockStore_Height_Call{Call: _e.mock.On("Height")} -} - -func (_c *BlockStore_Height_Call) Run(run func()) *BlockStore_Height_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BlockStore_Height_Call) Return(_a0 int64) *BlockStore_Height_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_Height_Call) RunAndReturn(run func() int64) *BlockStore_Height_Call { - _c.Call.Return(run) - return _c -} - // LoadBaseMeta provides a mock function with given fields: func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { ret := _m.Called() @@ -176,33 +87,6 @@ func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { return r0 } -// BlockStore_LoadBaseMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBaseMeta' -type BlockStore_LoadBaseMeta_Call struct { - *mock.Call -} - -// LoadBaseMeta is a helper method to define mock.On call -func (_e *BlockStore_Expecter) LoadBaseMeta() *BlockStore_LoadBaseMeta_Call { - return &BlockStore_LoadBaseMeta_Call{Call: _e.mock.On("LoadBaseMeta")} -} - -func (_c *BlockStore_LoadBaseMeta_Call) Run(run func()) *BlockStore_LoadBaseMeta_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BlockStore_LoadBaseMeta_Call) Return(_a0 *types.BlockMeta) *BlockStore_LoadBaseMeta_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBaseMeta_Call) RunAndReturn(run func() *types.BlockMeta) *BlockStore_LoadBaseMeta_Call { - _c.Call.Return(run) - return _c -} - // LoadBlock provides a mock function with given fields: height func (_m *BlockStore) LoadBlock(height int64) *types.Block { ret := _m.Called(height) @@ -223,34 +107,6 @@ func (_m *BlockStore) LoadBlock(height int64) *types.Block { return r0 } -// BlockStore_LoadBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlock' -type BlockStore_LoadBlock_Call struct { - *mock.Call -} - -// LoadBlock is a helper method to define mock.On call -// - height int64 -func (_e *BlockStore_Expecter) LoadBlock(height interface{}) *BlockStore_LoadBlock_Call { - return &BlockStore_LoadBlock_Call{Call: _e.mock.On("LoadBlock", height)} -} - -func (_c *BlockStore_LoadBlock_Call) Run(run func(height int64)) *BlockStore_LoadBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *BlockStore_LoadBlock_Call) Return(_a0 *types.Block) *BlockStore_LoadBlock_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBlock_Call) RunAndReturn(run func(int64) *types.Block) *BlockStore_LoadBlock_Call { - _c.Call.Return(run) - return _c -} - // LoadBlockByHash provides a mock function with given fields: hash func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { ret := _m.Called(hash) @@ -271,34 +127,6 @@ func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { return r0 } -// BlockStore_LoadBlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockByHash' -type BlockStore_LoadBlockByHash_Call struct { - *mock.Call -} - -// LoadBlockByHash is a helper method to define mock.On call -// - hash []byte -func (_e *BlockStore_Expecter) LoadBlockByHash(hash interface{}) *BlockStore_LoadBlockByHash_Call { - return &BlockStore_LoadBlockByHash_Call{Call: _e.mock.On("LoadBlockByHash", hash)} -} - -func (_c *BlockStore_LoadBlockByHash_Call) Run(run func(hash []byte)) *BlockStore_LoadBlockByHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *BlockStore_LoadBlockByHash_Call) Return(_a0 *types.Block) *BlockStore_LoadBlockByHash_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBlockByHash_Call) RunAndReturn(run func([]byte) *types.Block) *BlockStore_LoadBlockByHash_Call { - _c.Call.Return(run) - return _c -} - // LoadBlockCommit provides a mock function with given fields: height func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { ret := _m.Called(height) @@ -319,34 +147,6 @@ func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { return r0 } -// BlockStore_LoadBlockCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockCommit' -type BlockStore_LoadBlockCommit_Call struct { - *mock.Call -} - -// LoadBlockCommit is a helper method to define mock.On call -// - height int64 -func (_e *BlockStore_Expecter) LoadBlockCommit(height interface{}) *BlockStore_LoadBlockCommit_Call { - return &BlockStore_LoadBlockCommit_Call{Call: _e.mock.On("LoadBlockCommit", height)} -} - -func (_c *BlockStore_LoadBlockCommit_Call) Run(run func(height int64)) *BlockStore_LoadBlockCommit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *BlockStore_LoadBlockCommit_Call) Return(_a0 *types.Commit) *BlockStore_LoadBlockCommit_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBlockCommit_Call) RunAndReturn(run func(int64) *types.Commit) *BlockStore_LoadBlockCommit_Call { - _c.Call.Return(run) - return _c -} - // LoadBlockMeta provides a mock function with given fields: height func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { ret := _m.Called(height) @@ -367,34 +167,6 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { return r0 } -// BlockStore_LoadBlockMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockMeta' -type BlockStore_LoadBlockMeta_Call struct { - *mock.Call -} - -// LoadBlockMeta is a helper method to define mock.On call -// - height int64 -func (_e *BlockStore_Expecter) LoadBlockMeta(height interface{}) *BlockStore_LoadBlockMeta_Call { - return &BlockStore_LoadBlockMeta_Call{Call: _e.mock.On("LoadBlockMeta", height)} -} - -func (_c *BlockStore_LoadBlockMeta_Call) Run(run func(height int64)) *BlockStore_LoadBlockMeta_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *BlockStore_LoadBlockMeta_Call) Return(_a0 *types.BlockMeta) *BlockStore_LoadBlockMeta_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBlockMeta_Call) RunAndReturn(run func(int64) *types.BlockMeta) *BlockStore_LoadBlockMeta_Call { - _c.Call.Return(run) - return _c -} - // LoadBlockMetaByHash provides a mock function with given fields: hash func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { ret := _m.Called(hash) @@ -415,34 +187,6 @@ func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { return r0 } -// BlockStore_LoadBlockMetaByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockMetaByHash' -type BlockStore_LoadBlockMetaByHash_Call struct { - *mock.Call -} - -// LoadBlockMetaByHash is a helper method to define mock.On call -// - hash []byte -func (_e *BlockStore_Expecter) LoadBlockMetaByHash(hash interface{}) *BlockStore_LoadBlockMetaByHash_Call { - return &BlockStore_LoadBlockMetaByHash_Call{Call: _e.mock.On("LoadBlockMetaByHash", hash)} -} - -func (_c *BlockStore_LoadBlockMetaByHash_Call) Run(run func(hash []byte)) *BlockStore_LoadBlockMetaByHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *BlockStore_LoadBlockMetaByHash_Call) Return(_a0 *types.BlockMeta) *BlockStore_LoadBlockMetaByHash_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBlockMetaByHash_Call) RunAndReturn(run func([]byte) *types.BlockMeta) *BlockStore_LoadBlockMetaByHash_Call { - _c.Call.Return(run) - return _c -} - // LoadBlockPart provides a mock function with given fields: height, index func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { ret := _m.Called(height, index) @@ -463,35 +207,6 @@ func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { return r0 } -// BlockStore_LoadBlockPart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadBlockPart' -type BlockStore_LoadBlockPart_Call struct { - *mock.Call -} - -// LoadBlockPart is a helper method to define mock.On call -// - height int64 -// - index int -func (_e *BlockStore_Expecter) LoadBlockPart(height interface{}, index interface{}) *BlockStore_LoadBlockPart_Call { - return &BlockStore_LoadBlockPart_Call{Call: _e.mock.On("LoadBlockPart", height, index)} -} - -func (_c *BlockStore_LoadBlockPart_Call) Run(run func(height int64, index int)) *BlockStore_LoadBlockPart_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64), args[1].(int)) - }) - return _c -} - -func (_c *BlockStore_LoadBlockPart_Call) Return(_a0 *types.Part) *BlockStore_LoadBlockPart_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadBlockPart_Call) RunAndReturn(run func(int64, int) *types.Part) *BlockStore_LoadBlockPart_Call { - _c.Call.Return(run) - return _c -} - // LoadSeenCommit provides a mock function with given fields: func (_m *BlockStore) LoadSeenCommit() *types.Commit { ret := _m.Called() @@ -512,33 +227,6 @@ func (_m *BlockStore) LoadSeenCommit() *types.Commit { return r0 } -// BlockStore_LoadSeenCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSeenCommit' -type BlockStore_LoadSeenCommit_Call struct { - *mock.Call -} - -// LoadSeenCommit is a helper method to define mock.On call -func (_e *BlockStore_Expecter) LoadSeenCommit() *BlockStore_LoadSeenCommit_Call { - return &BlockStore_LoadSeenCommit_Call{Call: _e.mock.On("LoadSeenCommit")} -} - -func (_c *BlockStore_LoadSeenCommit_Call) Run(run func()) *BlockStore_LoadSeenCommit_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BlockStore_LoadSeenCommit_Call) Return(_a0 *types.Commit) *BlockStore_LoadSeenCommit_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadSeenCommit_Call) RunAndReturn(run func() *types.Commit) *BlockStore_LoadSeenCommit_Call { - _c.Call.Return(run) - return _c -} - // LoadSeenCommitAt provides a mock function with given fields: height func (_m *BlockStore) LoadSeenCommitAt(height int64) *types.Commit { ret := _m.Called(height) @@ -559,34 +247,6 @@ func (_m *BlockStore) LoadSeenCommitAt(height int64) *types.Commit { return r0 } -// BlockStore_LoadSeenCommitAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSeenCommitAt' -type BlockStore_LoadSeenCommitAt_Call struct { - *mock.Call -} - -// LoadSeenCommitAt is a helper method to define mock.On call -// - height int64 -func (_e *BlockStore_Expecter) LoadSeenCommitAt(height interface{}) *BlockStore_LoadSeenCommitAt_Call { - return &BlockStore_LoadSeenCommitAt_Call{Call: _e.mock.On("LoadSeenCommitAt", height)} -} - -func (_c *BlockStore_LoadSeenCommitAt_Call) Run(run func(height int64)) *BlockStore_LoadSeenCommitAt_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *BlockStore_LoadSeenCommitAt_Call) Return(_a0 *types.Commit) *BlockStore_LoadSeenCommitAt_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_LoadSeenCommitAt_Call) RunAndReturn(run func(int64) *types.Commit) *BlockStore_LoadSeenCommitAt_Call { - _c.Call.Return(run) - return _c -} - // PruneBlocks provides a mock function with given fields: height func (_m *BlockStore) PruneBlocks(height int64) (uint64, error) { ret := _m.Called(height) @@ -615,69 +275,11 @@ func (_m *BlockStore) PruneBlocks(height int64) (uint64, error) { return r0, r1 } -// BlockStore_PruneBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneBlocks' -type BlockStore_PruneBlocks_Call struct { - *mock.Call -} - -// PruneBlocks is a helper method to define mock.On call -// - height int64 -func (_e *BlockStore_Expecter) PruneBlocks(height interface{}) *BlockStore_PruneBlocks_Call { - return &BlockStore_PruneBlocks_Call{Call: _e.mock.On("PruneBlocks", height)} -} - -func (_c *BlockStore_PruneBlocks_Call) Run(run func(height int64)) *BlockStore_PruneBlocks_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *BlockStore_PruneBlocks_Call) Return(_a0 uint64, _a1 error) *BlockStore_PruneBlocks_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BlockStore_PruneBlocks_Call) RunAndReturn(run func(int64) (uint64, error)) *BlockStore_PruneBlocks_Call { - _c.Call.Return(run) - return _c -} - // SaveBlock provides a mock function with given fields: block, blockParts, seenCommit func (_m *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) { _m.Called(block, blockParts, seenCommit) } -// BlockStore_SaveBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveBlock' -type BlockStore_SaveBlock_Call struct { - *mock.Call -} - -// SaveBlock is a helper method to define mock.On call -// - block *types.Block -// - blockParts *types.PartSet -// - seenCommit *types.Commit -func (_e *BlockStore_Expecter) SaveBlock(block interface{}, blockParts interface{}, seenCommit interface{}) *BlockStore_SaveBlock_Call { - return &BlockStore_SaveBlock_Call{Call: _e.mock.On("SaveBlock", block, blockParts, seenCommit)} -} - -func (_c *BlockStore_SaveBlock_Call) Run(run func(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit)) *BlockStore_SaveBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*types.Block), args[1].(*types.PartSet), args[2].(*types.Commit)) - }) - return _c -} - -func (_c *BlockStore_SaveBlock_Call) Return() *BlockStore_SaveBlock_Call { - _c.Call.Return() - return _c -} - -func (_c *BlockStore_SaveBlock_Call) RunAndReturn(run func(*types.Block, *types.PartSet, *types.Commit)) *BlockStore_SaveBlock_Call { - _c.Call.Return(run) - return _c -} - // Size provides a mock function with given fields: func (_m *BlockStore) Size() int64 { ret := _m.Called() @@ -696,33 +298,6 @@ func (_m *BlockStore) Size() int64 { return r0 } -// BlockStore_Size_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Size' -type BlockStore_Size_Call struct { - *mock.Call -} - -// Size is a helper method to define mock.On call -func (_e *BlockStore_Expecter) Size() *BlockStore_Size_Call { - return &BlockStore_Size_Call{Call: _e.mock.On("Size")} -} - -func (_c *BlockStore_Size_Call) Run(run func()) *BlockStore_Size_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BlockStore_Size_Call) Return(_a0 int64) *BlockStore_Size_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockStore_Size_Call) RunAndReturn(run func() int64) *BlockStore_Size_Call { - _c.Call.Return(run) - return _c -} - // NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewBlockStore(t interface { diff --git a/internal/state/mocks/evidencepool.go b/internal/state/mocks/evidencepool.go index 3b2f161f34..ff16885fbd 100644 --- a/internal/state/mocks/evidencepool.go +++ b/internal/state/mocks/evidencepool.go @@ -16,14 +16,6 @@ type EvidencePool struct { mock.Mock } -type EvidencePool_Expecter struct { - mock *mock.Mock -} - -func (_m *EvidencePool) EXPECT() *EvidencePool_Expecter { - return &EvidencePool_Expecter{mock: &_m.Mock} -} - // AddEvidence provides a mock function with given fields: _a0, _a1 func (_m *EvidencePool) AddEvidence(_a0 context.Context, _a1 types.Evidence) error { ret := _m.Called(_a0, _a1) @@ -42,35 +34,6 @@ func (_m *EvidencePool) AddEvidence(_a0 context.Context, _a1 types.Evidence) err return r0 } -// EvidencePool_AddEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddEvidence' -type EvidencePool_AddEvidence_Call struct { - *mock.Call -} - -// AddEvidence is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Evidence -func (_e *EvidencePool_Expecter) AddEvidence(_a0 interface{}, _a1 interface{}) *EvidencePool_AddEvidence_Call { - return &EvidencePool_AddEvidence_Call{Call: _e.mock.On("AddEvidence", _a0, _a1)} -} - -func (_c *EvidencePool_AddEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *EvidencePool_AddEvidence_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Evidence)) - }) - return _c -} - -func (_c *EvidencePool_AddEvidence_Call) Return(_a0 error) *EvidencePool_AddEvidence_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *EvidencePool_AddEvidence_Call) RunAndReturn(run func(context.Context, types.Evidence) error) *EvidencePool_AddEvidence_Call { - _c.Call.Return(run) - return _c -} - // CheckEvidence provides a mock function with given fields: _a0, _a1 func (_m *EvidencePool) CheckEvidence(_a0 context.Context, _a1 types.EvidenceList) error { ret := _m.Called(_a0, _a1) @@ -89,35 +52,6 @@ func (_m *EvidencePool) CheckEvidence(_a0 context.Context, _a1 types.EvidenceLis return r0 } -// EvidencePool_CheckEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckEvidence' -type EvidencePool_CheckEvidence_Call struct { - *mock.Call -} - -// CheckEvidence is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.EvidenceList -func (_e *EvidencePool_Expecter) CheckEvidence(_a0 interface{}, _a1 interface{}) *EvidencePool_CheckEvidence_Call { - return &EvidencePool_CheckEvidence_Call{Call: _e.mock.On("CheckEvidence", _a0, _a1)} -} - -func (_c *EvidencePool_CheckEvidence_Call) Run(run func(_a0 context.Context, _a1 types.EvidenceList)) *EvidencePool_CheckEvidence_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.EvidenceList)) - }) - return _c -} - -func (_c *EvidencePool_CheckEvidence_Call) Return(_a0 error) *EvidencePool_CheckEvidence_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *EvidencePool_CheckEvidence_Call) RunAndReturn(run func(context.Context, types.EvidenceList) error) *EvidencePool_CheckEvidence_Call { - _c.Call.Return(run) - return _c -} - // PendingEvidence provides a mock function with given fields: maxBytes func (_m *EvidencePool) PendingEvidence(maxBytes int64) ([]types.Evidence, int64) { ret := _m.Called(maxBytes) @@ -148,69 +82,11 @@ func (_m *EvidencePool) PendingEvidence(maxBytes int64) ([]types.Evidence, int64 return r0, r1 } -// EvidencePool_PendingEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingEvidence' -type EvidencePool_PendingEvidence_Call struct { - *mock.Call -} - -// PendingEvidence is a helper method to define mock.On call -// - maxBytes int64 -func (_e *EvidencePool_Expecter) PendingEvidence(maxBytes interface{}) *EvidencePool_PendingEvidence_Call { - return &EvidencePool_PendingEvidence_Call{Call: _e.mock.On("PendingEvidence", maxBytes)} -} - -func (_c *EvidencePool_PendingEvidence_Call) Run(run func(maxBytes int64)) *EvidencePool_PendingEvidence_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *EvidencePool_PendingEvidence_Call) Return(ev []types.Evidence, size int64) *EvidencePool_PendingEvidence_Call { - _c.Call.Return(ev, size) - return _c -} - -func (_c *EvidencePool_PendingEvidence_Call) RunAndReturn(run func(int64) ([]types.Evidence, int64)) *EvidencePool_PendingEvidence_Call { - _c.Call.Return(run) - return _c -} - // Update provides a mock function with given fields: _a0, _a1, _a2 func (_m *EvidencePool) Update(_a0 context.Context, _a1 state.State, _a2 types.EvidenceList) { _m.Called(_a0, _a1, _a2) } -// EvidencePool_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type EvidencePool_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 state.State -// - _a2 types.EvidenceList -func (_e *EvidencePool_Expecter) Update(_a0 interface{}, _a1 interface{}, _a2 interface{}) *EvidencePool_Update_Call { - return &EvidencePool_Update_Call{Call: _e.mock.On("Update", _a0, _a1, _a2)} -} - -func (_c *EvidencePool_Update_Call) Run(run func(_a0 context.Context, _a1 state.State, _a2 types.EvidenceList)) *EvidencePool_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(state.State), args[2].(types.EvidenceList)) - }) - return _c -} - -func (_c *EvidencePool_Update_Call) Return() *EvidencePool_Update_Call { - _c.Call.Return() - return _c -} - -func (_c *EvidencePool_Update_Call) RunAndReturn(run func(context.Context, state.State, types.EvidenceList)) *EvidencePool_Update_Call { - _c.Call.Return(run) - return _c -} - // NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewEvidencePool(t interface { diff --git a/internal/state/mocks/executor.go b/internal/state/mocks/executor.go index 23a56e2b5a..e287c60cc0 100644 --- a/internal/state/mocks/executor.go +++ b/internal/state/mocks/executor.go @@ -16,14 +16,6 @@ type Executor struct { mock.Mock } -type Executor_Expecter struct { - mock *mock.Mock -} - -func (_m *Executor) EXPECT() *Executor_Expecter { - return &Executor_Expecter{mock: &_m.Mock} -} - // ApplyBlock provides a mock function with given fields: ctx, _a1, blockID, block, commit func (_m *Executor) ApplyBlock(ctx context.Context, _a1 state.State, blockID types.BlockID, block *types.Block, commit *types.Commit) (state.State, error) { ret := _m.Called(ctx, _a1, blockID, block, commit) @@ -52,38 +44,6 @@ func (_m *Executor) ApplyBlock(ctx context.Context, _a1 state.State, blockID typ return r0, r1 } -// Executor_ApplyBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyBlock' -type Executor_ApplyBlock_Call struct { - *mock.Call -} - -// ApplyBlock is a helper method to define mock.On call -// - ctx context.Context -// - _a1 state.State -// - blockID types.BlockID -// - block *types.Block -// - commit *types.Commit -func (_e *Executor_Expecter) ApplyBlock(ctx interface{}, _a1 interface{}, blockID interface{}, block interface{}, commit interface{}) *Executor_ApplyBlock_Call { - return &Executor_ApplyBlock_Call{Call: _e.mock.On("ApplyBlock", ctx, _a1, blockID, block, commit)} -} - -func (_c *Executor_ApplyBlock_Call) Run(run func(ctx context.Context, _a1 state.State, blockID types.BlockID, block *types.Block, commit *types.Commit)) *Executor_ApplyBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(state.State), args[2].(types.BlockID), args[3].(*types.Block), args[4].(*types.Commit)) - }) - return _c -} - -func (_c *Executor_ApplyBlock_Call) Return(_a0 state.State, _a1 error) *Executor_ApplyBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Executor_ApplyBlock_Call) RunAndReturn(run func(context.Context, state.State, types.BlockID, *types.Block, *types.Commit) (state.State, error)) *Executor_ApplyBlock_Call { - _c.Call.Return(run) - return _c -} - // CreateProposalBlock provides a mock function with given fields: ctx, height, round, _a3, commit, proposerProTxHash, proposedAppVersion func (_m *Executor) CreateProposalBlock(ctx context.Context, height int64, round int32, _a3 state.State, commit *types.Commit, proposerProTxHash []byte, proposedAppVersion uint64) (*types.Block, state.CurrentRoundState, error) { ret := _m.Called(ctx, height, round, _a3, commit, proposerProTxHash, proposedAppVersion) @@ -121,74 +81,11 @@ func (_m *Executor) CreateProposalBlock(ctx context.Context, height int64, round return r0, r1, r2 } -// Executor_CreateProposalBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateProposalBlock' -type Executor_CreateProposalBlock_Call struct { - *mock.Call -} - -// CreateProposalBlock is a helper method to define mock.On call -// - ctx context.Context -// - height int64 -// - round int32 -// - _a3 state.State -// - commit *types.Commit -// - proposerProTxHash []byte -// - proposedAppVersion uint64 -func (_e *Executor_Expecter) CreateProposalBlock(ctx interface{}, height interface{}, round interface{}, _a3 interface{}, commit interface{}, proposerProTxHash interface{}, proposedAppVersion interface{}) *Executor_CreateProposalBlock_Call { - return &Executor_CreateProposalBlock_Call{Call: _e.mock.On("CreateProposalBlock", ctx, height, round, _a3, commit, proposerProTxHash, proposedAppVersion)} -} - -func (_c *Executor_CreateProposalBlock_Call) Run(run func(ctx context.Context, height int64, round int32, _a3 state.State, commit *types.Commit, proposerProTxHash []byte, proposedAppVersion uint64)) *Executor_CreateProposalBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(int32), args[3].(state.State), args[4].(*types.Commit), args[5].([]byte), args[6].(uint64)) - }) - return _c -} - -func (_c *Executor_CreateProposalBlock_Call) Return(_a0 *types.Block, _a1 state.CurrentRoundState, _a2 error) *Executor_CreateProposalBlock_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *Executor_CreateProposalBlock_Call) RunAndReturn(run func(context.Context, int64, int32, state.State, *types.Commit, []byte, uint64) (*types.Block, state.CurrentRoundState, error)) *Executor_CreateProposalBlock_Call { - _c.Call.Return(run) - return _c -} - // ExtendVote provides a mock function with given fields: ctx, vote func (_m *Executor) ExtendVote(ctx context.Context, vote *types.Vote) { _m.Called(ctx, vote) } -// Executor_ExtendVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendVote' -type Executor_ExtendVote_Call struct { - *mock.Call -} - -// ExtendVote is a helper method to define mock.On call -// - ctx context.Context -// - vote *types.Vote -func (_e *Executor_Expecter) ExtendVote(ctx interface{}, vote interface{}) *Executor_ExtendVote_Call { - return &Executor_ExtendVote_Call{Call: _e.mock.On("ExtendVote", ctx, vote)} -} - -func (_c *Executor_ExtendVote_Call) Run(run func(ctx context.Context, vote *types.Vote)) *Executor_ExtendVote_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.Vote)) - }) - return _c -} - -func (_c *Executor_ExtendVote_Call) Return() *Executor_ExtendVote_Call { - _c.Call.Return() - return _c -} - -func (_c *Executor_ExtendVote_Call) RunAndReturn(run func(context.Context, *types.Vote)) *Executor_ExtendVote_Call { - _c.Call.Return(run) - return _c -} - // FinalizeBlock provides a mock function with given fields: ctx, _a1, uncommittedState, blockID, block, commit func (_m *Executor) FinalizeBlock(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, blockID types.BlockID, block *types.Block, commit *types.Commit) (state.State, error) { ret := _m.Called(ctx, _a1, uncommittedState, blockID, block, commit) @@ -217,39 +114,6 @@ func (_m *Executor) FinalizeBlock(ctx context.Context, _a1 state.State, uncommit return r0, r1 } -// Executor_FinalizeBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalizeBlock' -type Executor_FinalizeBlock_Call struct { - *mock.Call -} - -// FinalizeBlock is a helper method to define mock.On call -// - ctx context.Context -// - _a1 state.State -// - uncommittedState state.CurrentRoundState -// - blockID types.BlockID -// - block *types.Block -// - commit *types.Commit -func (_e *Executor_Expecter) FinalizeBlock(ctx interface{}, _a1 interface{}, uncommittedState interface{}, blockID interface{}, block interface{}, commit interface{}) *Executor_FinalizeBlock_Call { - return &Executor_FinalizeBlock_Call{Call: _e.mock.On("FinalizeBlock", ctx, _a1, uncommittedState, blockID, block, commit)} -} - -func (_c *Executor_FinalizeBlock_Call) Run(run func(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, blockID types.BlockID, block *types.Block, commit *types.Commit)) *Executor_FinalizeBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(state.State), args[2].(state.CurrentRoundState), args[3].(types.BlockID), args[4].(*types.Block), args[5].(*types.Commit)) - }) - return _c -} - -func (_c *Executor_FinalizeBlock_Call) Return(_a0 state.State, _a1 error) *Executor_FinalizeBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Executor_FinalizeBlock_Call) RunAndReturn(run func(context.Context, state.State, state.CurrentRoundState, types.BlockID, *types.Block, *types.Commit) (state.State, error)) *Executor_FinalizeBlock_Call { - _c.Call.Return(run) - return _c -} - // ProcessProposal provides a mock function with given fields: ctx, block, round, _a3, verify func (_m *Executor) ProcessProposal(ctx context.Context, block *types.Block, round int32, _a3 state.State, verify bool) (state.CurrentRoundState, error) { ret := _m.Called(ctx, block, round, _a3, verify) @@ -278,38 +142,6 @@ func (_m *Executor) ProcessProposal(ctx context.Context, block *types.Block, rou return r0, r1 } -// Executor_ProcessProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessProposal' -type Executor_ProcessProposal_Call struct { - *mock.Call -} - -// ProcessProposal is a helper method to define mock.On call -// - ctx context.Context -// - block *types.Block -// - round int32 -// - _a3 state.State -// - verify bool -func (_e *Executor_Expecter) ProcessProposal(ctx interface{}, block interface{}, round interface{}, _a3 interface{}, verify interface{}) *Executor_ProcessProposal_Call { - return &Executor_ProcessProposal_Call{Call: _e.mock.On("ProcessProposal", ctx, block, round, _a3, verify)} -} - -func (_c *Executor_ProcessProposal_Call) Run(run func(ctx context.Context, block *types.Block, round int32, _a3 state.State, verify bool)) *Executor_ProcessProposal_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.Block), args[2].(int32), args[3].(state.State), args[4].(bool)) - }) - return _c -} - -func (_c *Executor_ProcessProposal_Call) Return(_a0 state.CurrentRoundState, _a1 error) *Executor_ProcessProposal_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Executor_ProcessProposal_Call) RunAndReturn(run func(context.Context, *types.Block, int32, state.State, bool) (state.CurrentRoundState, error)) *Executor_ProcessProposal_Call { - _c.Call.Return(run) - return _c -} - // ValidateBlock provides a mock function with given fields: ctx, _a1, block func (_m *Executor) ValidateBlock(ctx context.Context, _a1 state.State, block *types.Block) error { ret := _m.Called(ctx, _a1, block) @@ -328,36 +160,6 @@ func (_m *Executor) ValidateBlock(ctx context.Context, _a1 state.State, block *t return r0 } -// Executor_ValidateBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateBlock' -type Executor_ValidateBlock_Call struct { - *mock.Call -} - -// ValidateBlock is a helper method to define mock.On call -// - ctx context.Context -// - _a1 state.State -// - block *types.Block -func (_e *Executor_Expecter) ValidateBlock(ctx interface{}, _a1 interface{}, block interface{}) *Executor_ValidateBlock_Call { - return &Executor_ValidateBlock_Call{Call: _e.mock.On("ValidateBlock", ctx, _a1, block)} -} - -func (_c *Executor_ValidateBlock_Call) Run(run func(ctx context.Context, _a1 state.State, block *types.Block)) *Executor_ValidateBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(state.State), args[2].(*types.Block)) - }) - return _c -} - -func (_c *Executor_ValidateBlock_Call) Return(_a0 error) *Executor_ValidateBlock_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Executor_ValidateBlock_Call) RunAndReturn(run func(context.Context, state.State, *types.Block) error) *Executor_ValidateBlock_Call { - _c.Call.Return(run) - return _c -} - // ValidateBlockWithRoundState provides a mock function with given fields: ctx, _a1, uncommittedState, block func (_m *Executor) ValidateBlockWithRoundState(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, block *types.Block) error { ret := _m.Called(ctx, _a1, uncommittedState, block) @@ -376,37 +178,6 @@ func (_m *Executor) ValidateBlockWithRoundState(ctx context.Context, _a1 state.S return r0 } -// Executor_ValidateBlockWithRoundState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateBlockWithRoundState' -type Executor_ValidateBlockWithRoundState_Call struct { - *mock.Call -} - -// ValidateBlockWithRoundState is a helper method to define mock.On call -// - ctx context.Context -// - _a1 state.State -// - uncommittedState state.CurrentRoundState -// - block *types.Block -func (_e *Executor_Expecter) ValidateBlockWithRoundState(ctx interface{}, _a1 interface{}, uncommittedState interface{}, block interface{}) *Executor_ValidateBlockWithRoundState_Call { - return &Executor_ValidateBlockWithRoundState_Call{Call: _e.mock.On("ValidateBlockWithRoundState", ctx, _a1, uncommittedState, block)} -} - -func (_c *Executor_ValidateBlockWithRoundState_Call) Run(run func(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, block *types.Block)) *Executor_ValidateBlockWithRoundState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(state.State), args[2].(state.CurrentRoundState), args[3].(*types.Block)) - }) - return _c -} - -func (_c *Executor_ValidateBlockWithRoundState_Call) Return(_a0 error) *Executor_ValidateBlockWithRoundState_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Executor_ValidateBlockWithRoundState_Call) RunAndReturn(run func(context.Context, state.State, state.CurrentRoundState, *types.Block) error) *Executor_ValidateBlockWithRoundState_Call { - _c.Call.Return(run) - return _c -} - // VerifyVoteExtension provides a mock function with given fields: ctx, vote func (_m *Executor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) error { ret := _m.Called(ctx, vote) @@ -425,35 +196,6 @@ func (_m *Executor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) e return r0 } -// Executor_VerifyVoteExtension_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyVoteExtension' -type Executor_VerifyVoteExtension_Call struct { - *mock.Call -} - -// VerifyVoteExtension is a helper method to define mock.On call -// - ctx context.Context -// - vote *types.Vote -func (_e *Executor_Expecter) VerifyVoteExtension(ctx interface{}, vote interface{}) *Executor_VerifyVoteExtension_Call { - return &Executor_VerifyVoteExtension_Call{Call: _e.mock.On("VerifyVoteExtension", ctx, vote)} -} - -func (_c *Executor_VerifyVoteExtension_Call) Run(run func(ctx context.Context, vote *types.Vote)) *Executor_VerifyVoteExtension_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.Vote)) - }) - return _c -} - -func (_c *Executor_VerifyVoteExtension_Call) Return(_a0 error) *Executor_VerifyVoteExtension_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Executor_VerifyVoteExtension_Call) RunAndReturn(run func(context.Context, *types.Vote) error) *Executor_VerifyVoteExtension_Call { - _c.Call.Return(run) - return _c -} - // NewExecutor creates a new instance of Executor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewExecutor(t interface { diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go new file mode 100644 index 0000000000..006a8b4e03 --- /dev/null +++ b/internal/state/mocks/store.go @@ -0,0 +1,256 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + selectproposer "github.com/dashpay/tenderdash/internal/consensus/versioned/selectproposer" + state "github.com/dashpay/tenderdash/internal/state" + mock "github.com/stretchr/testify/mock" + + tendermintstate "github.com/dashpay/tenderdash/proto/tendermint/state" + + types "github.com/dashpay/tenderdash/types" +) + +// Store is an autogenerated mock type for the Store type +type Store struct { + mock.Mock +} + +// Bootstrap provides a mock function with given fields: _a0 +func (_m *Store) Bootstrap(_a0 state.State) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Bootstrap") + } + + var r0 error + if rf, ok := ret.Get(0).(func(state.State) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Close provides a mock function with given fields: +func (_m *Store) Close() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Close") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Load provides a mock function with given fields: +func (_m *Store) Load() (state.State, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Load") + } + + var r0 state.State + var r1 error + if rf, ok := ret.Get(0).(func() (state.State, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() state.State); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(state.State) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LoadABCIResponses provides a mock function with given fields: _a0 +func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for LoadABCIResponses") + } + + var r0 *tendermintstate.ABCIResponses + var r1 error + if rf, ok := ret.Get(0).(func(int64) (*tendermintstate.ABCIResponses, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(int64) *tendermintstate.ABCIResponses); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*tendermintstate.ABCIResponses) + } + } + + if rf, ok := ret.Get(1).(func(int64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LoadConsensusParams provides a mock function with given fields: _a0 +func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for LoadConsensusParams") + } + + var r0 types.ConsensusParams + var r1 error + if rf, ok := ret.Get(0).(func(int64) (types.ConsensusParams, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(int64) types.ConsensusParams); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(types.ConsensusParams) + } + + if rf, ok := ret.Get(1).(func(int64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LoadValidators provides a mock function with given fields: _a0, _a1 +func (_m *Store) LoadValidators(_a0 int64, _a1 selectproposer.BlockStore) (*types.ValidatorSet, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for LoadValidators") + } + + var r0 *types.ValidatorSet + var r1 error + if rf, ok := ret.Get(0).(func(int64, selectproposer.BlockStore) (*types.ValidatorSet, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(int64, selectproposer.BlockStore) *types.ValidatorSet); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ValidatorSet) + } + } + + if rf, ok := ret.Get(1).(func(int64, selectproposer.BlockStore) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PruneStates provides a mock function with given fields: _a0 +func (_m *Store) PruneStates(_a0 int64) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for PruneStates") + } + + var r0 error + if rf, ok := ret.Get(0).(func(int64) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Save provides a mock function with given fields: _a0 +func (_m *Store) Save(_a0 state.State) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Save") + } + + var r0 error + if rf, ok := ret.Get(0).(func(state.State) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SaveABCIResponses provides a mock function with given fields: _a0, _a1 +func (_m *Store) SaveABCIResponses(_a0 int64, _a1 tendermintstate.ABCIResponses) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for SaveABCIResponses") + } + + var r0 error + if rf, ok := ret.Get(0).(func(int64, tendermintstate.ABCIResponses) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// SaveValidatorSets provides a mock function with given fields: _a0, _a1, _a2 +func (_m *Store) SaveValidatorSets(_a0 int64, _a1 int64, _a2 *types.ValidatorSet) error { + ret := _m.Called(_a0, _a1, _a2) + + if len(ret) == 0 { + panic("no return value specified for SaveValidatorSets") + } + + var r0 error + if rf, ok := ret.Get(0).(func(int64, int64, *types.ValidatorSet) error); ok { + r0 = rf(_a0, _a1, _a2) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewStore(t interface { + mock.TestingT + Cleanup(func()) +}) *Store { + mock := &Store{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/statesync/mocks/stateprovider.go b/internal/statesync/mocks/stateprovider.go index 8ac2b1544c..73b6b7b372 100644 --- a/internal/statesync/mocks/stateprovider.go +++ b/internal/statesync/mocks/stateprovider.go @@ -19,14 +19,6 @@ type StateProvider struct { mock.Mock } -type StateProvider_Expecter struct { - mock *mock.Mock -} - -func (_m *StateProvider) EXPECT() *StateProvider_Expecter { - return &StateProvider_Expecter{mock: &_m.Mock} -} - // AppHash provides a mock function with given fields: ctx, height func (_m *StateProvider) AppHash(ctx context.Context, height uint64) (bytes.HexBytes, error) { ret := _m.Called(ctx, height) @@ -57,35 +49,6 @@ func (_m *StateProvider) AppHash(ctx context.Context, height uint64) (bytes.HexB return r0, r1 } -// StateProvider_AppHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppHash' -type StateProvider_AppHash_Call struct { - *mock.Call -} - -// AppHash is a helper method to define mock.On call -// - ctx context.Context -// - height uint64 -func (_e *StateProvider_Expecter) AppHash(ctx interface{}, height interface{}) *StateProvider_AppHash_Call { - return &StateProvider_AppHash_Call{Call: _e.mock.On("AppHash", ctx, height)} -} - -func (_c *StateProvider_AppHash_Call) Run(run func(ctx context.Context, height uint64)) *StateProvider_AppHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint64)) - }) - return _c -} - -func (_c *StateProvider_AppHash_Call) Return(_a0 bytes.HexBytes, _a1 error) *StateProvider_AppHash_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *StateProvider_AppHash_Call) RunAndReturn(run func(context.Context, uint64) (bytes.HexBytes, error)) *StateProvider_AppHash_Call { - _c.Call.Return(run) - return _c -} - // Commit provides a mock function with given fields: ctx, height func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Commit, error) { ret := _m.Called(ctx, height) @@ -116,35 +79,6 @@ func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Comm return r0, r1 } -// StateProvider_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit' -type StateProvider_Commit_Call struct { - *mock.Call -} - -// Commit is a helper method to define mock.On call -// - ctx context.Context -// - height uint64 -func (_e *StateProvider_Expecter) Commit(ctx interface{}, height interface{}) *StateProvider_Commit_Call { - return &StateProvider_Commit_Call{Call: _e.mock.On("Commit", ctx, height)} -} - -func (_c *StateProvider_Commit_Call) Run(run func(ctx context.Context, height uint64)) *StateProvider_Commit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint64)) - }) - return _c -} - -func (_c *StateProvider_Commit_Call) Return(_a0 *types.Commit, _a1 error) *StateProvider_Commit_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *StateProvider_Commit_Call) RunAndReturn(run func(context.Context, uint64) (*types.Commit, error)) *StateProvider_Commit_Call { - _c.Call.Return(run) - return _c -} - // State provides a mock function with given fields: ctx, height func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, error) { ret := _m.Called(ctx, height) @@ -173,35 +107,6 @@ func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, return r0, r1 } -// StateProvider_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State' -type StateProvider_State_Call struct { - *mock.Call -} - -// State is a helper method to define mock.On call -// - ctx context.Context -// - height uint64 -func (_e *StateProvider_Expecter) State(ctx interface{}, height interface{}) *StateProvider_State_Call { - return &StateProvider_State_Call{Call: _e.mock.On("State", ctx, height)} -} - -func (_c *StateProvider_State_Call) Run(run func(ctx context.Context, height uint64)) *StateProvider_State_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint64)) - }) - return _c -} - -func (_c *StateProvider_State_Call) Return(_a0 state.State, _a1 error) *StateProvider_State_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *StateProvider_State_Call) RunAndReturn(run func(context.Context, uint64) (state.State, error)) *StateProvider_State_Call { - _c.Call.Return(run) - return _c -} - // NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewStateProvider(t interface { diff --git a/libs/store/mocks/store.go b/libs/store/mocks/store.go index 1ad6e3bb49..4a2b232fb5 100644 --- a/libs/store/mocks/store.go +++ b/libs/store/mocks/store.go @@ -12,14 +12,6 @@ type Store[K comparable, V any] struct { mock.Mock } -type Store_Expecter[K comparable, V any] struct { - mock *mock.Mock -} - -func (_m *Store[K, V]) EXPECT() *Store_Expecter[K, V] { - return &Store_Expecter[K, V]{mock: &_m.Mock} -} - // All provides a mock function with given fields: func (_m *Store[K, V]) All() []V { ret := _m.Called() @@ -40,66 +32,11 @@ func (_m *Store[K, V]) All() []V { return r0 } -// Store_All_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'All' -type Store_All_Call[K comparable, V any] struct { - *mock.Call -} - -// All is a helper method to define mock.On call -func (_e *Store_Expecter[K, V]) All() *Store_All_Call[K, V] { - return &Store_All_Call[K, V]{Call: _e.mock.On("All")} -} - -func (_c *Store_All_Call[K, V]) Run(run func()) *Store_All_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Store_All_Call[K, V]) Return(_a0 []V) *Store_All_Call[K, V] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Store_All_Call[K, V]) RunAndReturn(run func() []V) *Store_All_Call[K, V] { - _c.Call.Return(run) - return _c -} - // Delete provides a mock function with given fields: key func (_m *Store[K, V]) Delete(key K) { _m.Called(key) } -// Store_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type Store_Delete_Call[K comparable, V any] struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - key K -func (_e *Store_Expecter[K, V]) Delete(key interface{}) *Store_Delete_Call[K, V] { - return &Store_Delete_Call[K, V]{Call: _e.mock.On("Delete", key)} -} - -func (_c *Store_Delete_Call[K, V]) Run(run func(key K)) *Store_Delete_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(K)) - }) - return _c -} - -func (_c *Store_Delete_Call[K, V]) Return() *Store_Delete_Call[K, V] { - _c.Call.Return() - return _c -} - -func (_c *Store_Delete_Call[K, V]) RunAndReturn(run func(K)) *Store_Delete_Call[K, V] { - _c.Call.Return(run) - return _c -} - // Get provides a mock function with given fields: key func (_m *Store[K, V]) Get(key K) (V, bool) { ret := _m.Called(key) @@ -128,34 +65,6 @@ func (_m *Store[K, V]) Get(key K) (V, bool) { return r0, r1 } -// Store_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type Store_Get_Call[K comparable, V any] struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - key K -func (_e *Store_Expecter[K, V]) Get(key interface{}) *Store_Get_Call[K, V] { - return &Store_Get_Call[K, V]{Call: _e.mock.On("Get", key)} -} - -func (_c *Store_Get_Call[K, V]) Run(run func(key K)) *Store_Get_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(K)) - }) - return _c -} - -func (_c *Store_Get_Call[K, V]) Return(_a0 V, _a1 bool) *Store_Get_Call[K, V] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Store_Get_Call[K, V]) RunAndReturn(run func(K) (V, bool)) *Store_Get_Call[K, V] { - _c.Call.Return(run) - return _c -} - // GetAndDelete provides a mock function with given fields: key func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { ret := _m.Called(key) @@ -184,34 +93,6 @@ func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { return r0, r1 } -// Store_GetAndDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAndDelete' -type Store_GetAndDelete_Call[K comparable, V any] struct { - *mock.Call -} - -// GetAndDelete is a helper method to define mock.On call -// - key K -func (_e *Store_Expecter[K, V]) GetAndDelete(key interface{}) *Store_GetAndDelete_Call[K, V] { - return &Store_GetAndDelete_Call[K, V]{Call: _e.mock.On("GetAndDelete", key)} -} - -func (_c *Store_GetAndDelete_Call[K, V]) Run(run func(key K)) *Store_GetAndDelete_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(K)) - }) - return _c -} - -func (_c *Store_GetAndDelete_Call[K, V]) Return(_a0 V, _a1 bool) *Store_GetAndDelete_Call[K, V] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Store_GetAndDelete_Call[K, V]) RunAndReturn(run func(K) (V, bool)) *Store_GetAndDelete_Call[K, V] { - _c.Call.Return(run) - return _c -} - // IsZero provides a mock function with given fields: func (_m *Store[K, V]) IsZero() bool { ret := _m.Called() @@ -230,33 +111,6 @@ func (_m *Store[K, V]) IsZero() bool { return r0 } -// Store_IsZero_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsZero' -type Store_IsZero_Call[K comparable, V any] struct { - *mock.Call -} - -// IsZero is a helper method to define mock.On call -func (_e *Store_Expecter[K, V]) IsZero() *Store_IsZero_Call[K, V] { - return &Store_IsZero_Call[K, V]{Call: _e.mock.On("IsZero")} -} - -func (_c *Store_IsZero_Call[K, V]) Run(run func()) *Store_IsZero_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Store_IsZero_Call[K, V]) Return(_a0 bool) *Store_IsZero_Call[K, V] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Store_IsZero_Call[K, V]) RunAndReturn(run func() bool) *Store_IsZero_Call[K, V] { - _c.Call.Return(run) - return _c -} - // Len provides a mock function with given fields: func (_m *Store[K, V]) Len() int { ret := _m.Called() @@ -275,67 +129,11 @@ func (_m *Store[K, V]) Len() int { return r0 } -// Store_Len_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Len' -type Store_Len_Call[K comparable, V any] struct { - *mock.Call -} - -// Len is a helper method to define mock.On call -func (_e *Store_Expecter[K, V]) Len() *Store_Len_Call[K, V] { - return &Store_Len_Call[K, V]{Call: _e.mock.On("Len")} -} - -func (_c *Store_Len_Call[K, V]) Run(run func()) *Store_Len_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Store_Len_Call[K, V]) Return(_a0 int) *Store_Len_Call[K, V] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Store_Len_Call[K, V]) RunAndReturn(run func() int) *Store_Len_Call[K, V] { - _c.Call.Return(run) - return _c -} - // Put provides a mock function with given fields: key, data func (_m *Store[K, V]) Put(key K, data V) { _m.Called(key, data) } -// Store_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type Store_Put_Call[K comparable, V any] struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - key K -// - data V -func (_e *Store_Expecter[K, V]) Put(key interface{}, data interface{}) *Store_Put_Call[K, V] { - return &Store_Put_Call[K, V]{Call: _e.mock.On("Put", key, data)} -} - -func (_c *Store_Put_Call[K, V]) Run(run func(key K, data V)) *Store_Put_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(K), args[1].(V)) - }) - return _c -} - -func (_c *Store_Put_Call[K, V]) Return() *Store_Put_Call[K, V] { - _c.Call.Return() - return _c -} - -func (_c *Store_Put_Call[K, V]) RunAndReturn(run func(K, V)) *Store_Put_Call[K, V] { - _c.Call.Return(run) - return _c -} - // Query provides a mock function with given fields: spec, limit func (_m *Store[K, V]) Query(spec store.QueryFunc[K, V], limit int) []V { ret := _m.Called(spec, limit) @@ -356,35 +154,6 @@ func (_m *Store[K, V]) Query(spec store.QueryFunc[K, V], limit int) []V { return r0 } -// Store_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' -type Store_Query_Call[K comparable, V any] struct { - *mock.Call -} - -// Query is a helper method to define mock.On call -// - spec store.QueryFunc[K,V] -// - limit int -func (_e *Store_Expecter[K, V]) Query(spec interface{}, limit interface{}) *Store_Query_Call[K, V] { - return &Store_Query_Call[K, V]{Call: _e.mock.On("Query", spec, limit)} -} - -func (_c *Store_Query_Call[K, V]) Run(run func(spec store.QueryFunc[K, V], limit int)) *Store_Query_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(store.QueryFunc[K, V]), args[1].(int)) - }) - return _c -} - -func (_c *Store_Query_Call[K, V]) Return(_a0 []V) *Store_Query_Call[K, V] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Store_Query_Call[K, V]) RunAndReturn(run func(store.QueryFunc[K, V], int) []V) *Store_Query_Call[K, V] { - _c.Call.Return(run) - return _c -} - // Update provides a mock function with given fields: key, updates func (_m *Store[K, V]) Update(key K, updates ...store.UpdateFunc[K, V]) { _va := make([]interface{}, len(updates)) @@ -397,42 +166,6 @@ func (_m *Store[K, V]) Update(key K, updates ...store.UpdateFunc[K, V]) { _m.Called(_ca...) } -// Store_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type Store_Update_Call[K comparable, V any] struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - key K -// - updates ...store.UpdateFunc[K,V] -func (_e *Store_Expecter[K, V]) Update(key interface{}, updates ...interface{}) *Store_Update_Call[K, V] { - return &Store_Update_Call[K, V]{Call: _e.mock.On("Update", - append([]interface{}{key}, updates...)...)} -} - -func (_c *Store_Update_Call[K, V]) Run(run func(key K, updates ...store.UpdateFunc[K, V])) *Store_Update_Call[K, V] { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]store.UpdateFunc[K, V], len(args)-1) - for i, a := range args[1:] { - if a != nil { - variadicArgs[i] = a.(store.UpdateFunc[K, V]) - } - } - run(args[0].(K), variadicArgs...) - }) - return _c -} - -func (_c *Store_Update_Call[K, V]) Return() *Store_Update_Call[K, V] { - _c.Call.Return() - return _c -} - -func (_c *Store_Update_Call[K, V]) RunAndReturn(run func(K, ...store.UpdateFunc[K, V])) *Store_Update_Call[K, V] { - _c.Call.Return(run) - return _c -} - // NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewStore[K comparable, V any](t interface { diff --git a/light/provider/mocks/provider.go b/light/provider/mocks/provider.go index 137e9958b0..24cd675bf9 100644 --- a/light/provider/mocks/provider.go +++ b/light/provider/mocks/provider.go @@ -15,14 +15,6 @@ type Provider struct { mock.Mock } -type Provider_Expecter struct { - mock *mock.Mock -} - -func (_m *Provider) EXPECT() *Provider_Expecter { - return &Provider_Expecter{mock: &_m.Mock} -} - // ID provides a mock function with given fields: func (_m *Provider) ID() string { ret := _m.Called() @@ -41,33 +33,6 @@ func (_m *Provider) ID() string { return r0 } -// Provider_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID' -type Provider_ID_Call struct { - *mock.Call -} - -// ID is a helper method to define mock.On call -func (_e *Provider_Expecter) ID() *Provider_ID_Call { - return &Provider_ID_Call{Call: _e.mock.On("ID")} -} - -func (_c *Provider_ID_Call) Run(run func()) *Provider_ID_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Provider_ID_Call) Return(_a0 string) *Provider_ID_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Provider_ID_Call) RunAndReturn(run func() string) *Provider_ID_Call { - _c.Call.Return(run) - return _c -} - // LightBlock provides a mock function with given fields: ctx, height func (_m *Provider) LightBlock(ctx context.Context, height int64) (*types.LightBlock, error) { ret := _m.Called(ctx, height) @@ -98,35 +63,6 @@ func (_m *Provider) LightBlock(ctx context.Context, height int64) (*types.LightB return r0, r1 } -// Provider_LightBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LightBlock' -type Provider_LightBlock_Call struct { - *mock.Call -} - -// LightBlock is a helper method to define mock.On call -// - ctx context.Context -// - height int64 -func (_e *Provider_Expecter) LightBlock(ctx interface{}, height interface{}) *Provider_LightBlock_Call { - return &Provider_LightBlock_Call{Call: _e.mock.On("LightBlock", ctx, height)} -} - -func (_c *Provider_LightBlock_Call) Run(run func(ctx context.Context, height int64)) *Provider_LightBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *Provider_LightBlock_Call) Return(_a0 *types.LightBlock, _a1 error) *Provider_LightBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Provider_LightBlock_Call) RunAndReturn(run func(context.Context, int64) (*types.LightBlock, error)) *Provider_LightBlock_Call { - _c.Call.Return(run) - return _c -} - // ReportEvidence provides a mock function with given fields: _a0, _a1 func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) error { ret := _m.Called(_a0, _a1) @@ -145,35 +81,6 @@ func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) erro return r0 } -// Provider_ReportEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReportEvidence' -type Provider_ReportEvidence_Call struct { - *mock.Call -} - -// ReportEvidence is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Evidence -func (_e *Provider_Expecter) ReportEvidence(_a0 interface{}, _a1 interface{}) *Provider_ReportEvidence_Call { - return &Provider_ReportEvidence_Call{Call: _e.mock.On("ReportEvidence", _a0, _a1)} -} - -func (_c *Provider_ReportEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *Provider_ReportEvidence_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Evidence)) - }) - return _c -} - -func (_c *Provider_ReportEvidence_Call) Return(_a0 error) *Provider_ReportEvidence_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Provider_ReportEvidence_Call) RunAndReturn(run func(context.Context, types.Evidence) error) *Provider_ReportEvidence_Call { - _c.Call.Return(run) - return _c -} - // NewProvider creates a new instance of Provider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewProvider(t interface { diff --git a/light/rpc/mocks/lightclient.go b/light/rpc/mocks/lightclient.go index 6edc4304d1..8d53cd4f91 100644 --- a/light/rpc/mocks/lightclient.go +++ b/light/rpc/mocks/lightclient.go @@ -17,14 +17,6 @@ type LightClient struct { mock.Mock } -type LightClient_Expecter struct { - mock *mock.Mock -} - -func (_m *LightClient) EXPECT() *LightClient_Expecter { - return &LightClient_Expecter{mock: &_m.Mock} -} - // ChainID provides a mock function with given fields: func (_m *LightClient) ChainID() string { ret := _m.Called() @@ -43,33 +35,6 @@ func (_m *LightClient) ChainID() string { return r0 } -// LightClient_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' -type LightClient_ChainID_Call struct { - *mock.Call -} - -// ChainID is a helper method to define mock.On call -func (_e *LightClient_Expecter) ChainID() *LightClient_ChainID_Call { - return &LightClient_ChainID_Call{Call: _e.mock.On("ChainID")} -} - -func (_c *LightClient_ChainID_Call) Run(run func()) *LightClient_ChainID_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *LightClient_ChainID_Call) Return(_a0 string) *LightClient_ChainID_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *LightClient_ChainID_Call) RunAndReturn(run func() string) *LightClient_ChainID_Call { - _c.Call.Return(run) - return _c -} - // Status provides a mock function with given fields: ctx func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { ret := _m.Called(ctx) @@ -90,34 +55,6 @@ func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { return r0 } -// LightClient_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' -type LightClient_Status_Call struct { - *mock.Call -} - -// Status is a helper method to define mock.On call -// - ctx context.Context -func (_e *LightClient_Expecter) Status(ctx interface{}) *LightClient_Status_Call { - return &LightClient_Status_Call{Call: _e.mock.On("Status", ctx)} -} - -func (_c *LightClient_Status_Call) Run(run func(ctx context.Context)) *LightClient_Status_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *LightClient_Status_Call) Return(_a0 *types.LightClientInfo) *LightClient_Status_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *LightClient_Status_Call) RunAndReturn(run func(context.Context) *types.LightClientInfo) *LightClient_Status_Call { - _c.Call.Return(run) - return _c -} - // TrustedLightBlock provides a mock function with given fields: height func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error) { ret := _m.Called(height) @@ -148,34 +85,6 @@ func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error return r0, r1 } -// LightClient_TrustedLightBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TrustedLightBlock' -type LightClient_TrustedLightBlock_Call struct { - *mock.Call -} - -// TrustedLightBlock is a helper method to define mock.On call -// - height int64 -func (_e *LightClient_Expecter) TrustedLightBlock(height interface{}) *LightClient_TrustedLightBlock_Call { - return &LightClient_TrustedLightBlock_Call{Call: _e.mock.On("TrustedLightBlock", height)} -} - -func (_c *LightClient_TrustedLightBlock_Call) Run(run func(height int64)) *LightClient_TrustedLightBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int64)) - }) - return _c -} - -func (_c *LightClient_TrustedLightBlock_Call) Return(_a0 *types.LightBlock, _a1 error) *LightClient_TrustedLightBlock_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *LightClient_TrustedLightBlock_Call) RunAndReturn(run func(int64) (*types.LightBlock, error)) *LightClient_TrustedLightBlock_Call { - _c.Call.Return(run) - return _c -} - // Update provides a mock function with given fields: ctx, now func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightBlock, error) { ret := _m.Called(ctx, now) @@ -206,35 +115,6 @@ func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightB return r0, r1 } -// LightClient_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type LightClient_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - now time.Time -func (_e *LightClient_Expecter) Update(ctx interface{}, now interface{}) *LightClient_Update_Call { - return &LightClient_Update_Call{Call: _e.mock.On("Update", ctx, now)} -} - -func (_c *LightClient_Update_Call) Run(run func(ctx context.Context, now time.Time)) *LightClient_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(time.Time)) - }) - return _c -} - -func (_c *LightClient_Update_Call) Return(_a0 *types.LightBlock, _a1 error) *LightClient_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *LightClient_Update_Call) RunAndReturn(run func(context.Context, time.Time) (*types.LightBlock, error)) *LightClient_Update_Call { - _c.Call.Return(run) - return _c -} - // VerifyLightBlockAtHeight provides a mock function with given fields: ctx, height, now func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) { ret := _m.Called(ctx, height, now) @@ -265,36 +145,6 @@ func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int6 return r0, r1 } -// LightClient_VerifyLightBlockAtHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyLightBlockAtHeight' -type LightClient_VerifyLightBlockAtHeight_Call struct { - *mock.Call -} - -// VerifyLightBlockAtHeight is a helper method to define mock.On call -// - ctx context.Context -// - height int64 -// - now time.Time -func (_e *LightClient_Expecter) VerifyLightBlockAtHeight(ctx interface{}, height interface{}, now interface{}) *LightClient_VerifyLightBlockAtHeight_Call { - return &LightClient_VerifyLightBlockAtHeight_Call{Call: _e.mock.On("VerifyLightBlockAtHeight", ctx, height, now)} -} - -func (_c *LightClient_VerifyLightBlockAtHeight_Call) Run(run func(ctx context.Context, height int64, now time.Time)) *LightClient_VerifyLightBlockAtHeight_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(time.Time)) - }) - return _c -} - -func (_c *LightClient_VerifyLightBlockAtHeight_Call) Return(_a0 *types.LightBlock, _a1 error) *LightClient_VerifyLightBlockAtHeight_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *LightClient_VerifyLightBlockAtHeight_Call) RunAndReturn(run func(context.Context, int64, time.Time) (*types.LightBlock, error)) *LightClient_VerifyLightBlockAtHeight_Call { - _c.Call.Return(run) - return _c -} - // NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewLightClient(t interface { diff --git a/rpc/client/mocks/client.go b/rpc/client/mocks/client.go index 0b4d6fbf46..c62a3347a0 100644 --- a/rpc/client/mocks/client.go +++ b/rpc/client/mocks/client.go @@ -20,14 +20,6 @@ type Client struct { mock.Mock } -type Client_Expecter struct { - mock *mock.Mock -} - -func (_m *Client) EXPECT() *Client_Expecter { - return &Client_Expecter{mock: &_m.Mock} -} - // ABCIInfo provides a mock function with given fields: _a0 func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) @@ -58,34 +50,6 @@ func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, erro return r0, r1 } -// Client_ABCIInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIInfo' -type Client_ABCIInfo_Call struct { - *mock.Call -} - -// ABCIInfo is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) ABCIInfo(_a0 interface{}) *Client_ABCIInfo_Call { - return &Client_ABCIInfo_Call{Call: _e.mock.On("ABCIInfo", _a0)} -} - -func (_c *Client_ABCIInfo_Call) Run(run func(_a0 context.Context)) *Client_ABCIInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_ABCIInfo_Call) Return(_a0 *coretypes.ResultABCIInfo, _a1 error) *Client_ABCIInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ABCIInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultABCIInfo, error)) *Client_ABCIInfo_Call { - _c.Call.Return(run) - return _c -} - // ABCIQuery provides a mock function with given fields: ctx, path, data func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) @@ -116,36 +80,6 @@ func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexByte return r0, r1 } -// Client_ABCIQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIQuery' -type Client_ABCIQuery_Call struct { - *mock.Call -} - -// ABCIQuery is a helper method to define mock.On call -// - ctx context.Context -// - path string -// - data bytes.HexBytes -func (_e *Client_Expecter) ABCIQuery(ctx interface{}, path interface{}, data interface{}) *Client_ABCIQuery_Call { - return &Client_ABCIQuery_Call{Call: _e.mock.On("ABCIQuery", ctx, path, data)} -} - -func (_c *Client_ABCIQuery_Call) Run(run func(ctx context.Context, path string, data bytes.HexBytes)) *Client_ABCIQuery_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(bytes.HexBytes)) - }) - return _c -} - -func (_c *Client_ABCIQuery_Call) Return(_a0 *coretypes.ResultABCIQuery, _a1 error) *Client_ABCIQuery_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ABCIQuery_Call) RunAndReturn(run func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)) *Client_ABCIQuery_Call { - _c.Call.Return(run) - return _c -} - // ABCIQueryWithOptions provides a mock function with given fields: ctx, path, data, opts func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) @@ -176,37 +110,6 @@ func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data by return r0, r1 } -// Client_ABCIQueryWithOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIQueryWithOptions' -type Client_ABCIQueryWithOptions_Call struct { - *mock.Call -} - -// ABCIQueryWithOptions is a helper method to define mock.On call -// - ctx context.Context -// - path string -// - data bytes.HexBytes -// - opts client.ABCIQueryOptions -func (_e *Client_Expecter) ABCIQueryWithOptions(ctx interface{}, path interface{}, data interface{}, opts interface{}) *Client_ABCIQueryWithOptions_Call { - return &Client_ABCIQueryWithOptions_Call{Call: _e.mock.On("ABCIQueryWithOptions", ctx, path, data, opts)} -} - -func (_c *Client_ABCIQueryWithOptions_Call) Run(run func(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions)) *Client_ABCIQueryWithOptions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(bytes.HexBytes), args[3].(client.ABCIQueryOptions)) - }) - return _c -} - -func (_c *Client_ABCIQueryWithOptions_Call) Return(_a0 *coretypes.ResultABCIQuery, _a1 error) *Client_ABCIQueryWithOptions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ABCIQueryWithOptions_Call) RunAndReturn(run func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)) *Client_ABCIQueryWithOptions_Call { - _c.Call.Return(run) - return _c -} - // Block provides a mock function with given fields: ctx, height func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) @@ -237,35 +140,6 @@ func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBl return r0, r1 } -// Client_Block_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Block' -type Client_Block_Call struct { - *mock.Call -} - -// Block is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *Client_Expecter) Block(ctx interface{}, height interface{}) *Client_Block_Call { - return &Client_Block_Call{Call: _e.mock.On("Block", ctx, height)} -} - -func (_c *Client_Block_Call) Run(run func(ctx context.Context, height *int64)) *Client_Block_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *Client_Block_Call) Return(_a0 *coretypes.ResultBlock, _a1 error) *Client_Block_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Block_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultBlock, error)) *Client_Block_Call { - _c.Call.Return(run) - return _c -} - // BlockByHash provides a mock function with given fields: ctx, hash func (_m *Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) @@ -296,35 +170,6 @@ func (_m *Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*corety return r0, r1 } -// Client_BlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHash' -type Client_BlockByHash_Call struct { - *mock.Call -} - -// BlockByHash is a helper method to define mock.On call -// - ctx context.Context -// - hash bytes.HexBytes -func (_e *Client_Expecter) BlockByHash(ctx interface{}, hash interface{}) *Client_BlockByHash_Call { - return &Client_BlockByHash_Call{Call: _e.mock.On("BlockByHash", ctx, hash)} -} - -func (_c *Client_BlockByHash_Call) Run(run func(ctx context.Context, hash bytes.HexBytes)) *Client_BlockByHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *Client_BlockByHash_Call) Return(_a0 *coretypes.ResultBlock, _a1 error) *Client_BlockByHash_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BlockByHash_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)) *Client_BlockByHash_Call { - _c.Call.Return(run) - return _c -} - // BlockResults provides a mock function with given fields: ctx, height func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) @@ -355,35 +200,6 @@ func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.R return r0, r1 } -// Client_BlockResults_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockResults' -type Client_BlockResults_Call struct { - *mock.Call -} - -// BlockResults is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *Client_Expecter) BlockResults(ctx interface{}, height interface{}) *Client_BlockResults_Call { - return &Client_BlockResults_Call{Call: _e.mock.On("BlockResults", ctx, height)} -} - -func (_c *Client_BlockResults_Call) Run(run func(ctx context.Context, height *int64)) *Client_BlockResults_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *Client_BlockResults_Call) Return(_a0 *coretypes.ResultBlockResults, _a1 error) *Client_BlockResults_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BlockResults_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultBlockResults, error)) *Client_BlockResults_Call { - _c.Call.Return(run) - return _c -} - // BlockSearch provides a mock function with given fields: ctx, query, page, perPage, orderBy func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) @@ -414,38 +230,6 @@ func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perP return r0, r1 } -// Client_BlockSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockSearch' -type Client_BlockSearch_Call struct { - *mock.Call -} - -// BlockSearch is a helper method to define mock.On call -// - ctx context.Context -// - query string -// - page *int -// - perPage *int -// - orderBy string -func (_e *Client_Expecter) BlockSearch(ctx interface{}, query interface{}, page interface{}, perPage interface{}, orderBy interface{}) *Client_BlockSearch_Call { - return &Client_BlockSearch_Call{Call: _e.mock.On("BlockSearch", ctx, query, page, perPage, orderBy)} -} - -func (_c *Client_BlockSearch_Call) Run(run func(ctx context.Context, query string, page *int, perPage *int, orderBy string)) *Client_BlockSearch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(*int), args[3].(*int), args[4].(string)) - }) - return _c -} - -func (_c *Client_BlockSearch_Call) Return(_a0 *coretypes.ResultBlockSearch, _a1 error) *Client_BlockSearch_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BlockSearch_Call) RunAndReturn(run func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)) *Client_BlockSearch_Call { - _c.Call.Return(run) - return _c -} - // BlockchainInfo provides a mock function with given fields: ctx, minHeight, maxHeight func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) @@ -476,36 +260,6 @@ func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight return r0, r1 } -// Client_BlockchainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockchainInfo' -type Client_BlockchainInfo_Call struct { - *mock.Call -} - -// BlockchainInfo is a helper method to define mock.On call -// - ctx context.Context -// - minHeight int64 -// - maxHeight int64 -func (_e *Client_Expecter) BlockchainInfo(ctx interface{}, minHeight interface{}, maxHeight interface{}) *Client_BlockchainInfo_Call { - return &Client_BlockchainInfo_Call{Call: _e.mock.On("BlockchainInfo", ctx, minHeight, maxHeight)} -} - -func (_c *Client_BlockchainInfo_Call) Run(run func(ctx context.Context, minHeight int64, maxHeight int64)) *Client_BlockchainInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(int64)) - }) - return _c -} - -func (_c *Client_BlockchainInfo_Call) Return(_a0 *coretypes.ResultBlockchainInfo, _a1 error) *Client_BlockchainInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BlockchainInfo_Call) RunAndReturn(run func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)) *Client_BlockchainInfo_Call { - _c.Call.Return(run) - return _c -} - // BroadcastEvidence provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) @@ -536,35 +290,6 @@ func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*c return r0, r1 } -// Client_BroadcastEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastEvidence' -type Client_BroadcastEvidence_Call struct { - *mock.Call -} - -// BroadcastEvidence is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Evidence -func (_e *Client_Expecter) BroadcastEvidence(_a0 interface{}, _a1 interface{}) *Client_BroadcastEvidence_Call { - return &Client_BroadcastEvidence_Call{Call: _e.mock.On("BroadcastEvidence", _a0, _a1)} -} - -func (_c *Client_BroadcastEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *Client_BroadcastEvidence_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Evidence)) - }) - return _c -} - -func (_c *Client_BroadcastEvidence_Call) Return(_a0 *coretypes.ResultBroadcastEvidence, _a1 error) *Client_BroadcastEvidence_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BroadcastEvidence_Call) RunAndReturn(run func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)) *Client_BroadcastEvidence_Call { - _c.Call.Return(run) - return _c -} - // BroadcastTx provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -595,35 +320,6 @@ func (_m *Client) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.Res return r0, r1 } -// Client_BroadcastTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTx' -type Client_BroadcastTx_Call struct { - *mock.Call -} - -// BroadcastTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *Client_Expecter) BroadcastTx(_a0 interface{}, _a1 interface{}) *Client_BroadcastTx_Call { - return &Client_BroadcastTx_Call{Call: _e.mock.On("BroadcastTx", _a0, _a1)} -} - -func (_c *Client_BroadcastTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_BroadcastTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *Client_BroadcastTx_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *Client_BroadcastTx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BroadcastTx_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *Client_BroadcastTx_Call { - _c.Call.Return(run) - return _c -} - // BroadcastTxAsync provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -654,35 +350,6 @@ func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretype return r0, r1 } -// Client_BroadcastTxAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxAsync' -type Client_BroadcastTxAsync_Call struct { - *mock.Call -} - -// BroadcastTxAsync is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *Client_Expecter) BroadcastTxAsync(_a0 interface{}, _a1 interface{}) *Client_BroadcastTxAsync_Call { - return &Client_BroadcastTxAsync_Call{Call: _e.mock.On("BroadcastTxAsync", _a0, _a1)} -} - -func (_c *Client_BroadcastTxAsync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_BroadcastTxAsync_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *Client_BroadcastTxAsync_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *Client_BroadcastTxAsync_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BroadcastTxAsync_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *Client_BroadcastTxAsync_Call { - _c.Call.Return(run) - return _c -} - // BroadcastTxCommit provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) @@ -713,35 +380,6 @@ func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretyp return r0, r1 } -// Client_BroadcastTxCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxCommit' -type Client_BroadcastTxCommit_Call struct { - *mock.Call -} - -// BroadcastTxCommit is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *Client_Expecter) BroadcastTxCommit(_a0 interface{}, _a1 interface{}) *Client_BroadcastTxCommit_Call { - return &Client_BroadcastTxCommit_Call{Call: _e.mock.On("BroadcastTxCommit", _a0, _a1)} -} - -func (_c *Client_BroadcastTxCommit_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_BroadcastTxCommit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *Client_BroadcastTxCommit_Call) Return(_a0 *coretypes.ResultBroadcastTxCommit, _a1 error) *Client_BroadcastTxCommit_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BroadcastTxCommit_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)) *Client_BroadcastTxCommit_Call { - _c.Call.Return(run) - return _c -} - // BroadcastTxSync provides a mock function with given fields: _a0, _a1 func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -772,35 +410,6 @@ func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes return r0, r1 } -// Client_BroadcastTxSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxSync' -type Client_BroadcastTxSync_Call struct { - *mock.Call -} - -// BroadcastTxSync is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *Client_Expecter) BroadcastTxSync(_a0 interface{}, _a1 interface{}) *Client_BroadcastTxSync_Call { - return &Client_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", _a0, _a1)} -} - -func (_c *Client_BroadcastTxSync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_BroadcastTxSync_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *Client_BroadcastTxSync_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *Client_BroadcastTxSync_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_BroadcastTxSync_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *Client_BroadcastTxSync_Call { - _c.Call.Return(run) - return _c -} - // CheckTx provides a mock function with given fields: _a0, _a1 func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) @@ -831,35 +440,6 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultC return r0, r1 } -// Client_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' -type Client_CheckTx_Call struct { - *mock.Call -} - -// CheckTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *Client_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *Client_CheckTx_Call { - return &Client_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} -} - -func (_c *Client_CheckTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *Client_CheckTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *Client_CheckTx_Call) Return(_a0 *coretypes.ResultCheckTx, _a1 error) *Client_CheckTx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_CheckTx_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)) *Client_CheckTx_Call { - _c.Call.Return(run) - return _c -} - // Commit provides a mock function with given fields: ctx, height func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) @@ -890,35 +470,6 @@ func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultC return r0, r1 } -// Client_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit' -type Client_Commit_Call struct { - *mock.Call -} - -// Commit is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *Client_Expecter) Commit(ctx interface{}, height interface{}) *Client_Commit_Call { - return &Client_Commit_Call{Call: _e.mock.On("Commit", ctx, height)} -} - -func (_c *Client_Commit_Call) Run(run func(ctx context.Context, height *int64)) *Client_Commit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *Client_Commit_Call) Return(_a0 *coretypes.ResultCommit, _a1 error) *Client_Commit_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Commit_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultCommit, error)) *Client_Commit_Call { - _c.Call.Return(run) - return _c -} - // ConsensusParams provides a mock function with given fields: ctx, height func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) @@ -949,35 +500,6 @@ func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretype return r0, r1 } -// Client_ConsensusParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConsensusParams' -type Client_ConsensusParams_Call struct { - *mock.Call -} - -// ConsensusParams is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *Client_Expecter) ConsensusParams(ctx interface{}, height interface{}) *Client_ConsensusParams_Call { - return &Client_ConsensusParams_Call{Call: _e.mock.On("ConsensusParams", ctx, height)} -} - -func (_c *Client_ConsensusParams_Call) Run(run func(ctx context.Context, height *int64)) *Client_ConsensusParams_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *Client_ConsensusParams_Call) Return(_a0 *coretypes.ResultConsensusParams, _a1 error) *Client_ConsensusParams_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ConsensusParams_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)) *Client_ConsensusParams_Call { - _c.Call.Return(run) - return _c -} - // ConsensusState provides a mock function with given fields: _a0 func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) @@ -1008,34 +530,6 @@ func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensu return r0, r1 } -// Client_ConsensusState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConsensusState' -type Client_ConsensusState_Call struct { - *mock.Call -} - -// ConsensusState is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) ConsensusState(_a0 interface{}) *Client_ConsensusState_Call { - return &Client_ConsensusState_Call{Call: _e.mock.On("ConsensusState", _a0)} -} - -func (_c *Client_ConsensusState_Call) Run(run func(_a0 context.Context)) *Client_ConsensusState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_ConsensusState_Call) Return(_a0 *coretypes.ResultConsensusState, _a1 error) *Client_ConsensusState_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_ConsensusState_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultConsensusState, error)) *Client_ConsensusState_Call { - _c.Call.Return(run) - return _c -} - // DumpConsensusState provides a mock function with given fields: _a0 func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) @@ -1066,34 +560,6 @@ func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDump return r0, r1 } -// Client_DumpConsensusState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DumpConsensusState' -type Client_DumpConsensusState_Call struct { - *mock.Call -} - -// DumpConsensusState is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) DumpConsensusState(_a0 interface{}) *Client_DumpConsensusState_Call { - return &Client_DumpConsensusState_Call{Call: _e.mock.On("DumpConsensusState", _a0)} -} - -func (_c *Client_DumpConsensusState_Call) Run(run func(_a0 context.Context)) *Client_DumpConsensusState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_DumpConsensusState_Call) Return(_a0 *coretypes.ResultDumpConsensusState, _a1 error) *Client_DumpConsensusState_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_DumpConsensusState_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultDumpConsensusState, error)) *Client_DumpConsensusState_Call { - _c.Call.Return(run) - return _c -} - // Events provides a mock function with given fields: ctx, req func (_m *Client) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) @@ -1124,35 +590,6 @@ func (_m *Client) Events(ctx context.Context, req *coretypes.RequestEvents) (*co return r0, r1 } -// Client_Events_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Events' -type Client_Events_Call struct { - *mock.Call -} - -// Events is a helper method to define mock.On call -// - ctx context.Context -// - req *coretypes.RequestEvents -func (_e *Client_Expecter) Events(ctx interface{}, req interface{}) *Client_Events_Call { - return &Client_Events_Call{Call: _e.mock.On("Events", ctx, req)} -} - -func (_c *Client_Events_Call) Run(run func(ctx context.Context, req *coretypes.RequestEvents)) *Client_Events_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*coretypes.RequestEvents)) - }) - return _c -} - -func (_c *Client_Events_Call) Return(_a0 *coretypes.ResultEvents, _a1 error) *Client_Events_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Events_Call) RunAndReturn(run func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)) *Client_Events_Call { - _c.Call.Return(run) - return _c -} - // Genesis provides a mock function with given fields: _a0 func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) @@ -1183,34 +620,6 @@ func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) return r0, r1 } -// Client_Genesis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Genesis' -type Client_Genesis_Call struct { - *mock.Call -} - -// Genesis is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) Genesis(_a0 interface{}) *Client_Genesis_Call { - return &Client_Genesis_Call{Call: _e.mock.On("Genesis", _a0)} -} - -func (_c *Client_Genesis_Call) Run(run func(_a0 context.Context)) *Client_Genesis_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_Genesis_Call) Return(_a0 *coretypes.ResultGenesis, _a1 error) *Client_Genesis_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Genesis_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultGenesis, error)) *Client_Genesis_Call { - _c.Call.Return(run) - return _c -} - // GenesisChunked provides a mock function with given fields: _a0, _a1 func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) @@ -1241,35 +650,6 @@ func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.Resu return r0, r1 } -// Client_GenesisChunked_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenesisChunked' -type Client_GenesisChunked_Call struct { - *mock.Call -} - -// GenesisChunked is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 uint -func (_e *Client_Expecter) GenesisChunked(_a0 interface{}, _a1 interface{}) *Client_GenesisChunked_Call { - return &Client_GenesisChunked_Call{Call: _e.mock.On("GenesisChunked", _a0, _a1)} -} - -func (_c *Client_GenesisChunked_Call) Run(run func(_a0 context.Context, _a1 uint)) *Client_GenesisChunked_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint)) - }) - return _c -} - -func (_c *Client_GenesisChunked_Call) Return(_a0 *coretypes.ResultGenesisChunk, _a1 error) *Client_GenesisChunked_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_GenesisChunked_Call) RunAndReturn(run func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)) *Client_GenesisChunked_Call { - _c.Call.Return(run) - return _c -} - // Header provides a mock function with given fields: ctx, height func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) @@ -1300,35 +680,6 @@ func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultH return r0, r1 } -// Client_Header_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Header' -type Client_Header_Call struct { - *mock.Call -} - -// Header is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *Client_Expecter) Header(ctx interface{}, height interface{}) *Client_Header_Call { - return &Client_Header_Call{Call: _e.mock.On("Header", ctx, height)} -} - -func (_c *Client_Header_Call) Run(run func(ctx context.Context, height *int64)) *Client_Header_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *Client_Header_Call) Return(_a0 *coretypes.ResultHeader, _a1 error) *Client_Header_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Header_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultHeader, error)) *Client_Header_Call { - _c.Call.Return(run) - return _c -} - // HeaderByHash provides a mock function with given fields: ctx, hash func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) @@ -1359,35 +710,6 @@ func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coret return r0, r1 } -// Client_HeaderByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByHash' -type Client_HeaderByHash_Call struct { - *mock.Call -} - -// HeaderByHash is a helper method to define mock.On call -// - ctx context.Context -// - hash bytes.HexBytes -func (_e *Client_Expecter) HeaderByHash(ctx interface{}, hash interface{}) *Client_HeaderByHash_Call { - return &Client_HeaderByHash_Call{Call: _e.mock.On("HeaderByHash", ctx, hash)} -} - -func (_c *Client_HeaderByHash_Call) Run(run func(ctx context.Context, hash bytes.HexBytes)) *Client_HeaderByHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *Client_HeaderByHash_Call) Return(_a0 *coretypes.ResultHeader, _a1 error) *Client_HeaderByHash_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_HeaderByHash_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)) *Client_HeaderByHash_Call { - _c.Call.Return(run) - return _c -} - // Health provides a mock function with given fields: _a0 func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) @@ -1418,34 +740,6 @@ func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { return r0, r1 } -// Client_Health_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Health' -type Client_Health_Call struct { - *mock.Call -} - -// Health is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) Health(_a0 interface{}) *Client_Health_Call { - return &Client_Health_Call{Call: _e.mock.On("Health", _a0)} -} - -func (_c *Client_Health_Call) Run(run func(_a0 context.Context)) *Client_Health_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_Health_Call) Return(_a0 *coretypes.ResultHealth, _a1 error) *Client_Health_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Health_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultHealth, error)) *Client_Health_Call { - _c.Call.Return(run) - return _c -} - // NetInfo provides a mock function with given fields: _a0 func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) @@ -1476,34 +770,6 @@ func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) return r0, r1 } -// Client_NetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NetInfo' -type Client_NetInfo_Call struct { - *mock.Call -} - -// NetInfo is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) NetInfo(_a0 interface{}) *Client_NetInfo_Call { - return &Client_NetInfo_Call{Call: _e.mock.On("NetInfo", _a0)} -} - -func (_c *Client_NetInfo_Call) Run(run func(_a0 context.Context)) *Client_NetInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_NetInfo_Call) Return(_a0 *coretypes.ResultNetInfo, _a1 error) *Client_NetInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_NetInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultNetInfo, error)) *Client_NetInfo_Call { - _c.Call.Return(run) - return _c -} - // NumUnconfirmedTxs provides a mock function with given fields: _a0 func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) @@ -1534,34 +800,6 @@ func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUncon return r0, r1 } -// Client_NumUnconfirmedTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NumUnconfirmedTxs' -type Client_NumUnconfirmedTxs_Call struct { - *mock.Call -} - -// NumUnconfirmedTxs is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) NumUnconfirmedTxs(_a0 interface{}) *Client_NumUnconfirmedTxs_Call { - return &Client_NumUnconfirmedTxs_Call{Call: _e.mock.On("NumUnconfirmedTxs", _a0)} -} - -func (_c *Client_NumUnconfirmedTxs_Call) Run(run func(_a0 context.Context)) *Client_NumUnconfirmedTxs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_NumUnconfirmedTxs_Call) Return(_a0 *coretypes.ResultUnconfirmedTxs, _a1 error) *Client_NumUnconfirmedTxs_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_NumUnconfirmedTxs_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)) *Client_NumUnconfirmedTxs_Call { - _c.Call.Return(run) - return _c -} - // RemoveTx provides a mock function with given fields: _a0, _a1 func (_m *Client) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) @@ -1580,35 +818,6 @@ func (_m *Client) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { return r0 } -// Client_RemoveTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveTx' -type Client_RemoveTx_Call struct { - *mock.Call -} - -// RemoveTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.TxKey -func (_e *Client_Expecter) RemoveTx(_a0 interface{}, _a1 interface{}) *Client_RemoveTx_Call { - return &Client_RemoveTx_Call{Call: _e.mock.On("RemoveTx", _a0, _a1)} -} - -func (_c *Client_RemoveTx_Call) Run(run func(_a0 context.Context, _a1 types.TxKey)) *Client_RemoveTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.TxKey)) - }) - return _c -} - -func (_c *Client_RemoveTx_Call) Return(_a0 error) *Client_RemoveTx_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_RemoveTx_Call) RunAndReturn(run func(context.Context, types.TxKey) error) *Client_RemoveTx_Call { - _c.Call.Return(run) - return _c -} - // Start provides a mock function with given fields: _a0 func (_m *Client) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -1627,34 +836,6 @@ func (_m *Client) Start(_a0 context.Context) error { return r0 } -// Client_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type Client_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) Start(_a0 interface{}) *Client_Start_Call { - return &Client_Start_Call{Call: _e.mock.On("Start", _a0)} -} - -func (_c *Client_Start_Call) Run(run func(_a0 context.Context)) *Client_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_Start_Call) Return(_a0 error) *Client_Start_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Start_Call) RunAndReturn(run func(context.Context) error) *Client_Start_Call { - _c.Call.Return(run) - return _c -} - // Status provides a mock function with given fields: _a0 func (_m *Client) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) @@ -1685,34 +866,6 @@ func (_m *Client) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { return r0, r1 } -// Client_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' -type Client_Status_Call struct { - *mock.Call -} - -// Status is a helper method to define mock.On call -// - _a0 context.Context -func (_e *Client_Expecter) Status(_a0 interface{}) *Client_Status_Call { - return &Client_Status_Call{Call: _e.mock.On("Status", _a0)} -} - -func (_c *Client_Status_Call) Run(run func(_a0 context.Context)) *Client_Status_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Client_Status_Call) Return(_a0 *coretypes.ResultStatus, _a1 error) *Client_Status_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Status_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultStatus, error)) *Client_Status_Call { - _c.Call.Return(run) - return _c -} - // Subscribe provides a mock function with given fields: ctx, subscriber, query, outCapacity func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) { _va := make([]interface{}, len(outCapacity)) @@ -1750,44 +903,6 @@ func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string return r0, r1 } -// Client_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe' -type Client_Subscribe_Call struct { - *mock.Call -} - -// Subscribe is a helper method to define mock.On call -// - ctx context.Context -// - subscriber string -// - query string -// - outCapacity ...int -func (_e *Client_Expecter) Subscribe(ctx interface{}, subscriber interface{}, query interface{}, outCapacity ...interface{}) *Client_Subscribe_Call { - return &Client_Subscribe_Call{Call: _e.mock.On("Subscribe", - append([]interface{}{ctx, subscriber, query}, outCapacity...)...)} -} - -func (_c *Client_Subscribe_Call) Run(run func(ctx context.Context, subscriber string, query string, outCapacity ...int)) *Client_Subscribe_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]int, len(args)-3) - for i, a := range args[3:] { - if a != nil { - variadicArgs[i] = a.(int) - } - } - run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...) - }) - return _c -} - -func (_c *Client_Subscribe_Call) Return(out <-chan coretypes.ResultEvent, err error) *Client_Subscribe_Call { - _c.Call.Return(out, err) - return _c -} - -func (_c *Client_Subscribe_Call) RunAndReturn(run func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)) *Client_Subscribe_Call { - _c.Call.Return(run) - return _c -} - // Tx provides a mock function with given fields: ctx, hash, prove func (_m *Client) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) @@ -1818,36 +933,6 @@ func (_m *Client) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*cor return r0, r1 } -// Client_Tx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tx' -type Client_Tx_Call struct { - *mock.Call -} - -// Tx is a helper method to define mock.On call -// - ctx context.Context -// - hash bytes.HexBytes -// - prove bool -func (_e *Client_Expecter) Tx(ctx interface{}, hash interface{}, prove interface{}) *Client_Tx_Call { - return &Client_Tx_Call{Call: _e.mock.On("Tx", ctx, hash, prove)} -} - -func (_c *Client_Tx_Call) Run(run func(ctx context.Context, hash bytes.HexBytes, prove bool)) *Client_Tx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes), args[2].(bool)) - }) - return _c -} - -func (_c *Client_Tx_Call) Return(_a0 *coretypes.ResultTx, _a1 error) *Client_Tx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Tx_Call) RunAndReturn(run func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)) *Client_Tx_Call { - _c.Call.Return(run) - return _c -} - // TxSearch provides a mock function with given fields: ctx, query, prove, page, perPage, orderBy func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) @@ -1878,39 +963,6 @@ func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page * return r0, r1 } -// Client_TxSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxSearch' -type Client_TxSearch_Call struct { - *mock.Call -} - -// TxSearch is a helper method to define mock.On call -// - ctx context.Context -// - query string -// - prove bool -// - page *int -// - perPage *int -// - orderBy string -func (_e *Client_Expecter) TxSearch(ctx interface{}, query interface{}, prove interface{}, page interface{}, perPage interface{}, orderBy interface{}) *Client_TxSearch_Call { - return &Client_TxSearch_Call{Call: _e.mock.On("TxSearch", ctx, query, prove, page, perPage, orderBy)} -} - -func (_c *Client_TxSearch_Call) Run(run func(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string)) *Client_TxSearch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(bool), args[3].(*int), args[4].(*int), args[5].(string)) - }) - return _c -} - -func (_c *Client_TxSearch_Call) Return(_a0 *coretypes.ResultTxSearch, _a1 error) *Client_TxSearch_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_TxSearch_Call) RunAndReturn(run func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)) *Client_TxSearch_Call { - _c.Call.Return(run) - return _c -} - // UnconfirmedTxs provides a mock function with given fields: ctx, page, perPage func (_m *Client) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) @@ -1941,36 +993,6 @@ func (_m *Client) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) ( return r0, r1 } -// Client_UnconfirmedTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnconfirmedTxs' -type Client_UnconfirmedTxs_Call struct { - *mock.Call -} - -// UnconfirmedTxs is a helper method to define mock.On call -// - ctx context.Context -// - page *int -// - perPage *int -func (_e *Client_Expecter) UnconfirmedTxs(ctx interface{}, page interface{}, perPage interface{}) *Client_UnconfirmedTxs_Call { - return &Client_UnconfirmedTxs_Call{Call: _e.mock.On("UnconfirmedTxs", ctx, page, perPage)} -} - -func (_c *Client_UnconfirmedTxs_Call) Run(run func(ctx context.Context, page *int, perPage *int)) *Client_UnconfirmedTxs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int), args[2].(*int)) - }) - return _c -} - -func (_c *Client_UnconfirmedTxs_Call) Return(_a0 *coretypes.ResultUnconfirmedTxs, _a1 error) *Client_UnconfirmedTxs_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_UnconfirmedTxs_Call) RunAndReturn(run func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)) *Client_UnconfirmedTxs_Call { - _c.Call.Return(run) - return _c -} - // Unsubscribe provides a mock function with given fields: ctx, subscriber, query func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) @@ -1989,36 +1011,6 @@ func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query stri return r0 } -// Client_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' -type Client_Unsubscribe_Call struct { - *mock.Call -} - -// Unsubscribe is a helper method to define mock.On call -// - ctx context.Context -// - subscriber string -// - query string -func (_e *Client_Expecter) Unsubscribe(ctx interface{}, subscriber interface{}, query interface{}) *Client_Unsubscribe_Call { - return &Client_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", ctx, subscriber, query)} -} - -func (_c *Client_Unsubscribe_Call) Run(run func(ctx context.Context, subscriber string, query string)) *Client_Unsubscribe_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *Client_Unsubscribe_Call) Return(_a0 error) *Client_Unsubscribe_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_Unsubscribe_Call) RunAndReturn(run func(context.Context, string, string) error) *Client_Unsubscribe_Call { - _c.Call.Return(run) - return _c -} - // UnsubscribeAll provides a mock function with given fields: ctx, subscriber func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) @@ -2037,35 +1029,6 @@ func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { return r0 } -// Client_UnsubscribeAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubscribeAll' -type Client_UnsubscribeAll_Call struct { - *mock.Call -} - -// UnsubscribeAll is a helper method to define mock.On call -// - ctx context.Context -// - subscriber string -func (_e *Client_Expecter) UnsubscribeAll(ctx interface{}, subscriber interface{}) *Client_UnsubscribeAll_Call { - return &Client_UnsubscribeAll_Call{Call: _e.mock.On("UnsubscribeAll", ctx, subscriber)} -} - -func (_c *Client_UnsubscribeAll_Call) Run(run func(ctx context.Context, subscriber string)) *Client_UnsubscribeAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *Client_UnsubscribeAll_Call) Return(_a0 error) *Client_UnsubscribeAll_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Client_UnsubscribeAll_Call) RunAndReturn(run func(context.Context, string) error) *Client_UnsubscribeAll_Call { - _c.Call.Return(run) - return _c -} - // Validators provides a mock function with given fields: ctx, height, page, perPage, requestQuorumInfo func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) @@ -2096,38 +1059,6 @@ func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perP return r0, r1 } -// Client_Validators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validators' -type Client_Validators_Call struct { - *mock.Call -} - -// Validators is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -// - page *int -// - perPage *int -// - requestQuorumInfo *bool -func (_e *Client_Expecter) Validators(ctx interface{}, height interface{}, page interface{}, perPage interface{}, requestQuorumInfo interface{}) *Client_Validators_Call { - return &Client_Validators_Call{Call: _e.mock.On("Validators", ctx, height, page, perPage, requestQuorumInfo)} -} - -func (_c *Client_Validators_Call) Run(run func(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool)) *Client_Validators_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64), args[2].(*int), args[3].(*int), args[4].(*bool)) - }) - return _c -} - -func (_c *Client_Validators_Call) Return(_a0 *coretypes.ResultValidators, _a1 error) *Client_Validators_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Client_Validators_Call) RunAndReturn(run func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)) *Client_Validators_Call { - _c.Call.Return(run) - return _c -} - // NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewClient(t interface { diff --git a/rpc/client/mocks/remoteclient.go b/rpc/client/mocks/remoteclient.go index 1fed245b7e..1708786162 100644 --- a/rpc/client/mocks/remoteclient.go +++ b/rpc/client/mocks/remoteclient.go @@ -20,14 +20,6 @@ type RemoteClient struct { mock.Mock } -type RemoteClient_Expecter struct { - mock *mock.Mock -} - -func (_m *RemoteClient) EXPECT() *RemoteClient_Expecter { - return &RemoteClient_Expecter{mock: &_m.Mock} -} - // ABCIInfo provides a mock function with given fields: _a0 func (_m *RemoteClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) @@ -58,34 +50,6 @@ func (_m *RemoteClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo return r0, r1 } -// RemoteClient_ABCIInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIInfo' -type RemoteClient_ABCIInfo_Call struct { - *mock.Call -} - -// ABCIInfo is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) ABCIInfo(_a0 interface{}) *RemoteClient_ABCIInfo_Call { - return &RemoteClient_ABCIInfo_Call{Call: _e.mock.On("ABCIInfo", _a0)} -} - -func (_c *RemoteClient_ABCIInfo_Call) Run(run func(_a0 context.Context)) *RemoteClient_ABCIInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_ABCIInfo_Call) Return(_a0 *coretypes.ResultABCIInfo, _a1 error) *RemoteClient_ABCIInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_ABCIInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultABCIInfo, error)) *RemoteClient_ABCIInfo_Call { - _c.Call.Return(run) - return _c -} - // ABCIQuery provides a mock function with given fields: ctx, path, data func (_m *RemoteClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) @@ -116,36 +80,6 @@ func (_m *RemoteClient) ABCIQuery(ctx context.Context, path string, data bytes.H return r0, r1 } -// RemoteClient_ABCIQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIQuery' -type RemoteClient_ABCIQuery_Call struct { - *mock.Call -} - -// ABCIQuery is a helper method to define mock.On call -// - ctx context.Context -// - path string -// - data bytes.HexBytes -func (_e *RemoteClient_Expecter) ABCIQuery(ctx interface{}, path interface{}, data interface{}) *RemoteClient_ABCIQuery_Call { - return &RemoteClient_ABCIQuery_Call{Call: _e.mock.On("ABCIQuery", ctx, path, data)} -} - -func (_c *RemoteClient_ABCIQuery_Call) Run(run func(ctx context.Context, path string, data bytes.HexBytes)) *RemoteClient_ABCIQuery_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(bytes.HexBytes)) - }) - return _c -} - -func (_c *RemoteClient_ABCIQuery_Call) Return(_a0 *coretypes.ResultABCIQuery, _a1 error) *RemoteClient_ABCIQuery_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_ABCIQuery_Call) RunAndReturn(run func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)) *RemoteClient_ABCIQuery_Call { - _c.Call.Return(run) - return _c -} - // ABCIQueryWithOptions provides a mock function with given fields: ctx, path, data, opts func (_m *RemoteClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) @@ -176,37 +110,6 @@ func (_m *RemoteClient) ABCIQueryWithOptions(ctx context.Context, path string, d return r0, r1 } -// RemoteClient_ABCIQueryWithOptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ABCIQueryWithOptions' -type RemoteClient_ABCIQueryWithOptions_Call struct { - *mock.Call -} - -// ABCIQueryWithOptions is a helper method to define mock.On call -// - ctx context.Context -// - path string -// - data bytes.HexBytes -// - opts client.ABCIQueryOptions -func (_e *RemoteClient_Expecter) ABCIQueryWithOptions(ctx interface{}, path interface{}, data interface{}, opts interface{}) *RemoteClient_ABCIQueryWithOptions_Call { - return &RemoteClient_ABCIQueryWithOptions_Call{Call: _e.mock.On("ABCIQueryWithOptions", ctx, path, data, opts)} -} - -func (_c *RemoteClient_ABCIQueryWithOptions_Call) Run(run func(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions)) *RemoteClient_ABCIQueryWithOptions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(bytes.HexBytes), args[3].(client.ABCIQueryOptions)) - }) - return _c -} - -func (_c *RemoteClient_ABCIQueryWithOptions_Call) Return(_a0 *coretypes.ResultABCIQuery, _a1 error) *RemoteClient_ABCIQueryWithOptions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_ABCIQueryWithOptions_Call) RunAndReturn(run func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)) *RemoteClient_ABCIQueryWithOptions_Call { - _c.Call.Return(run) - return _c -} - // Block provides a mock function with given fields: ctx, height func (_m *RemoteClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) @@ -237,35 +140,6 @@ func (_m *RemoteClient) Block(ctx context.Context, height *int64) (*coretypes.Re return r0, r1 } -// RemoteClient_Block_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Block' -type RemoteClient_Block_Call struct { - *mock.Call -} - -// Block is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *RemoteClient_Expecter) Block(ctx interface{}, height interface{}) *RemoteClient_Block_Call { - return &RemoteClient_Block_Call{Call: _e.mock.On("Block", ctx, height)} -} - -func (_c *RemoteClient_Block_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_Block_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *RemoteClient_Block_Call) Return(_a0 *coretypes.ResultBlock, _a1 error) *RemoteClient_Block_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Block_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultBlock, error)) *RemoteClient_Block_Call { - _c.Call.Return(run) - return _c -} - // BlockByHash provides a mock function with given fields: ctx, hash func (_m *RemoteClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) @@ -296,35 +170,6 @@ func (_m *RemoteClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (* return r0, r1 } -// RemoteClient_BlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHash' -type RemoteClient_BlockByHash_Call struct { - *mock.Call -} - -// BlockByHash is a helper method to define mock.On call -// - ctx context.Context -// - hash bytes.HexBytes -func (_e *RemoteClient_Expecter) BlockByHash(ctx interface{}, hash interface{}) *RemoteClient_BlockByHash_Call { - return &RemoteClient_BlockByHash_Call{Call: _e.mock.On("BlockByHash", ctx, hash)} -} - -func (_c *RemoteClient_BlockByHash_Call) Run(run func(ctx context.Context, hash bytes.HexBytes)) *RemoteClient_BlockByHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *RemoteClient_BlockByHash_Call) Return(_a0 *coretypes.ResultBlock, _a1 error) *RemoteClient_BlockByHash_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BlockByHash_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)) *RemoteClient_BlockByHash_Call { - _c.Call.Return(run) - return _c -} - // BlockResults provides a mock function with given fields: ctx, height func (_m *RemoteClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) @@ -355,35 +200,6 @@ func (_m *RemoteClient) BlockResults(ctx context.Context, height *int64) (*coret return r0, r1 } -// RemoteClient_BlockResults_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockResults' -type RemoteClient_BlockResults_Call struct { - *mock.Call -} - -// BlockResults is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *RemoteClient_Expecter) BlockResults(ctx interface{}, height interface{}) *RemoteClient_BlockResults_Call { - return &RemoteClient_BlockResults_Call{Call: _e.mock.On("BlockResults", ctx, height)} -} - -func (_c *RemoteClient_BlockResults_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_BlockResults_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *RemoteClient_BlockResults_Call) Return(_a0 *coretypes.ResultBlockResults, _a1 error) *RemoteClient_BlockResults_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BlockResults_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultBlockResults, error)) *RemoteClient_BlockResults_Call { - _c.Call.Return(run) - return _c -} - // BlockSearch provides a mock function with given fields: ctx, query, page, perPage, orderBy func (_m *RemoteClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) @@ -414,38 +230,6 @@ func (_m *RemoteClient) BlockSearch(ctx context.Context, query string, page *int return r0, r1 } -// RemoteClient_BlockSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockSearch' -type RemoteClient_BlockSearch_Call struct { - *mock.Call -} - -// BlockSearch is a helper method to define mock.On call -// - ctx context.Context -// - query string -// - page *int -// - perPage *int -// - orderBy string -func (_e *RemoteClient_Expecter) BlockSearch(ctx interface{}, query interface{}, page interface{}, perPage interface{}, orderBy interface{}) *RemoteClient_BlockSearch_Call { - return &RemoteClient_BlockSearch_Call{Call: _e.mock.On("BlockSearch", ctx, query, page, perPage, orderBy)} -} - -func (_c *RemoteClient_BlockSearch_Call) Run(run func(ctx context.Context, query string, page *int, perPage *int, orderBy string)) *RemoteClient_BlockSearch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(*int), args[3].(*int), args[4].(string)) - }) - return _c -} - -func (_c *RemoteClient_BlockSearch_Call) Return(_a0 *coretypes.ResultBlockSearch, _a1 error) *RemoteClient_BlockSearch_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BlockSearch_Call) RunAndReturn(run func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)) *RemoteClient_BlockSearch_Call { - _c.Call.Return(run) - return _c -} - // BlockchainInfo provides a mock function with given fields: ctx, minHeight, maxHeight func (_m *RemoteClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) @@ -476,36 +260,6 @@ func (_m *RemoteClient) BlockchainInfo(ctx context.Context, minHeight int64, max return r0, r1 } -// RemoteClient_BlockchainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockchainInfo' -type RemoteClient_BlockchainInfo_Call struct { - *mock.Call -} - -// BlockchainInfo is a helper method to define mock.On call -// - ctx context.Context -// - minHeight int64 -// - maxHeight int64 -func (_e *RemoteClient_Expecter) BlockchainInfo(ctx interface{}, minHeight interface{}, maxHeight interface{}) *RemoteClient_BlockchainInfo_Call { - return &RemoteClient_BlockchainInfo_Call{Call: _e.mock.On("BlockchainInfo", ctx, minHeight, maxHeight)} -} - -func (_c *RemoteClient_BlockchainInfo_Call) Run(run func(ctx context.Context, minHeight int64, maxHeight int64)) *RemoteClient_BlockchainInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(int64)) - }) - return _c -} - -func (_c *RemoteClient_BlockchainInfo_Call) Return(_a0 *coretypes.ResultBlockchainInfo, _a1 error) *RemoteClient_BlockchainInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BlockchainInfo_Call) RunAndReturn(run func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)) *RemoteClient_BlockchainInfo_Call { - _c.Call.Return(run) - return _c -} - // BroadcastEvidence provides a mock function with given fields: _a0, _a1 func (_m *RemoteClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) @@ -536,35 +290,6 @@ func (_m *RemoteClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidenc return r0, r1 } -// RemoteClient_BroadcastEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastEvidence' -type RemoteClient_BroadcastEvidence_Call struct { - *mock.Call -} - -// BroadcastEvidence is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Evidence -func (_e *RemoteClient_Expecter) BroadcastEvidence(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastEvidence_Call { - return &RemoteClient_BroadcastEvidence_Call{Call: _e.mock.On("BroadcastEvidence", _a0, _a1)} -} - -func (_c *RemoteClient_BroadcastEvidence_Call) Run(run func(_a0 context.Context, _a1 types.Evidence)) *RemoteClient_BroadcastEvidence_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Evidence)) - }) - return _c -} - -func (_c *RemoteClient_BroadcastEvidence_Call) Return(_a0 *coretypes.ResultBroadcastEvidence, _a1 error) *RemoteClient_BroadcastEvidence_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BroadcastEvidence_Call) RunAndReturn(run func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)) *RemoteClient_BroadcastEvidence_Call { - _c.Call.Return(run) - return _c -} - // BroadcastTx provides a mock function with given fields: _a0, _a1 func (_m *RemoteClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -595,35 +320,6 @@ func (_m *RemoteClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretyp return r0, r1 } -// RemoteClient_BroadcastTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTx' -type RemoteClient_BroadcastTx_Call struct { - *mock.Call -} - -// BroadcastTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RemoteClient_Expecter) BroadcastTx(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastTx_Call { - return &RemoteClient_BroadcastTx_Call{Call: _e.mock.On("BroadcastTx", _a0, _a1)} -} - -func (_c *RemoteClient_BroadcastTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_BroadcastTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *RemoteClient_BroadcastTx_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *RemoteClient_BroadcastTx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BroadcastTx_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *RemoteClient_BroadcastTx_Call { - _c.Call.Return(run) - return _c -} - // BroadcastTxAsync provides a mock function with given fields: _a0, _a1 func (_m *RemoteClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -654,35 +350,6 @@ func (_m *RemoteClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*co return r0, r1 } -// RemoteClient_BroadcastTxAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxAsync' -type RemoteClient_BroadcastTxAsync_Call struct { - *mock.Call -} - -// BroadcastTxAsync is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RemoteClient_Expecter) BroadcastTxAsync(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastTxAsync_Call { - return &RemoteClient_BroadcastTxAsync_Call{Call: _e.mock.On("BroadcastTxAsync", _a0, _a1)} -} - -func (_c *RemoteClient_BroadcastTxAsync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_BroadcastTxAsync_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *RemoteClient_BroadcastTxAsync_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *RemoteClient_BroadcastTxAsync_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BroadcastTxAsync_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *RemoteClient_BroadcastTxAsync_Call { - _c.Call.Return(run) - return _c -} - // BroadcastTxCommit provides a mock function with given fields: _a0, _a1 func (_m *RemoteClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) @@ -713,35 +380,6 @@ func (_m *RemoteClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*c return r0, r1 } -// RemoteClient_BroadcastTxCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxCommit' -type RemoteClient_BroadcastTxCommit_Call struct { - *mock.Call -} - -// BroadcastTxCommit is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RemoteClient_Expecter) BroadcastTxCommit(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastTxCommit_Call { - return &RemoteClient_BroadcastTxCommit_Call{Call: _e.mock.On("BroadcastTxCommit", _a0, _a1)} -} - -func (_c *RemoteClient_BroadcastTxCommit_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_BroadcastTxCommit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *RemoteClient_BroadcastTxCommit_Call) Return(_a0 *coretypes.ResultBroadcastTxCommit, _a1 error) *RemoteClient_BroadcastTxCommit_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BroadcastTxCommit_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)) *RemoteClient_BroadcastTxCommit_Call { - _c.Call.Return(run) - return _c -} - // BroadcastTxSync provides a mock function with given fields: _a0, _a1 func (_m *RemoteClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) @@ -772,35 +410,6 @@ func (_m *RemoteClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*cor return r0, r1 } -// RemoteClient_BroadcastTxSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxSync' -type RemoteClient_BroadcastTxSync_Call struct { - *mock.Call -} - -// BroadcastTxSync is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RemoteClient_Expecter) BroadcastTxSync(_a0 interface{}, _a1 interface{}) *RemoteClient_BroadcastTxSync_Call { - return &RemoteClient_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", _a0, _a1)} -} - -func (_c *RemoteClient_BroadcastTxSync_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_BroadcastTxSync_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *RemoteClient_BroadcastTxSync_Call) Return(_a0 *coretypes.ResultBroadcastTx, _a1 error) *RemoteClient_BroadcastTxSync_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_BroadcastTxSync_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)) *RemoteClient_BroadcastTxSync_Call { - _c.Call.Return(run) - return _c -} - // CheckTx provides a mock function with given fields: _a0, _a1 func (_m *RemoteClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) @@ -831,35 +440,6 @@ func (_m *RemoteClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.R return r0, r1 } -// RemoteClient_CheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTx' -type RemoteClient_CheckTx_Call struct { - *mock.Call -} - -// CheckTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.Tx -func (_e *RemoteClient_Expecter) CheckTx(_a0 interface{}, _a1 interface{}) *RemoteClient_CheckTx_Call { - return &RemoteClient_CheckTx_Call{Call: _e.mock.On("CheckTx", _a0, _a1)} -} - -func (_c *RemoteClient_CheckTx_Call) Run(run func(_a0 context.Context, _a1 types.Tx)) *RemoteClient_CheckTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.Tx)) - }) - return _c -} - -func (_c *RemoteClient_CheckTx_Call) Return(_a0 *coretypes.ResultCheckTx, _a1 error) *RemoteClient_CheckTx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_CheckTx_Call) RunAndReturn(run func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)) *RemoteClient_CheckTx_Call { - _c.Call.Return(run) - return _c -} - // Commit provides a mock function with given fields: ctx, height func (_m *RemoteClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) @@ -890,35 +470,6 @@ func (_m *RemoteClient) Commit(ctx context.Context, height *int64) (*coretypes.R return r0, r1 } -// RemoteClient_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit' -type RemoteClient_Commit_Call struct { - *mock.Call -} - -// Commit is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *RemoteClient_Expecter) Commit(ctx interface{}, height interface{}) *RemoteClient_Commit_Call { - return &RemoteClient_Commit_Call{Call: _e.mock.On("Commit", ctx, height)} -} - -func (_c *RemoteClient_Commit_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_Commit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *RemoteClient_Commit_Call) Return(_a0 *coretypes.ResultCommit, _a1 error) *RemoteClient_Commit_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Commit_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultCommit, error)) *RemoteClient_Commit_Call { - _c.Call.Return(run) - return _c -} - // ConsensusParams provides a mock function with given fields: ctx, height func (_m *RemoteClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) @@ -949,35 +500,6 @@ func (_m *RemoteClient) ConsensusParams(ctx context.Context, height *int64) (*co return r0, r1 } -// RemoteClient_ConsensusParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConsensusParams' -type RemoteClient_ConsensusParams_Call struct { - *mock.Call -} - -// ConsensusParams is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *RemoteClient_Expecter) ConsensusParams(ctx interface{}, height interface{}) *RemoteClient_ConsensusParams_Call { - return &RemoteClient_ConsensusParams_Call{Call: _e.mock.On("ConsensusParams", ctx, height)} -} - -func (_c *RemoteClient_ConsensusParams_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_ConsensusParams_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *RemoteClient_ConsensusParams_Call) Return(_a0 *coretypes.ResultConsensusParams, _a1 error) *RemoteClient_ConsensusParams_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_ConsensusParams_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)) *RemoteClient_ConsensusParams_Call { - _c.Call.Return(run) - return _c -} - // ConsensusState provides a mock function with given fields: _a0 func (_m *RemoteClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) @@ -1008,34 +530,6 @@ func (_m *RemoteClient) ConsensusState(_a0 context.Context) (*coretypes.ResultCo return r0, r1 } -// RemoteClient_ConsensusState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConsensusState' -type RemoteClient_ConsensusState_Call struct { - *mock.Call -} - -// ConsensusState is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) ConsensusState(_a0 interface{}) *RemoteClient_ConsensusState_Call { - return &RemoteClient_ConsensusState_Call{Call: _e.mock.On("ConsensusState", _a0)} -} - -func (_c *RemoteClient_ConsensusState_Call) Run(run func(_a0 context.Context)) *RemoteClient_ConsensusState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_ConsensusState_Call) Return(_a0 *coretypes.ResultConsensusState, _a1 error) *RemoteClient_ConsensusState_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_ConsensusState_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultConsensusState, error)) *RemoteClient_ConsensusState_Call { - _c.Call.Return(run) - return _c -} - // DumpConsensusState provides a mock function with given fields: _a0 func (_m *RemoteClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) @@ -1066,34 +560,6 @@ func (_m *RemoteClient) DumpConsensusState(_a0 context.Context) (*coretypes.Resu return r0, r1 } -// RemoteClient_DumpConsensusState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DumpConsensusState' -type RemoteClient_DumpConsensusState_Call struct { - *mock.Call -} - -// DumpConsensusState is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) DumpConsensusState(_a0 interface{}) *RemoteClient_DumpConsensusState_Call { - return &RemoteClient_DumpConsensusState_Call{Call: _e.mock.On("DumpConsensusState", _a0)} -} - -func (_c *RemoteClient_DumpConsensusState_Call) Run(run func(_a0 context.Context)) *RemoteClient_DumpConsensusState_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_DumpConsensusState_Call) Return(_a0 *coretypes.ResultDumpConsensusState, _a1 error) *RemoteClient_DumpConsensusState_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_DumpConsensusState_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultDumpConsensusState, error)) *RemoteClient_DumpConsensusState_Call { - _c.Call.Return(run) - return _c -} - // Events provides a mock function with given fields: ctx, req func (_m *RemoteClient) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) @@ -1124,35 +590,6 @@ func (_m *RemoteClient) Events(ctx context.Context, req *coretypes.RequestEvents return r0, r1 } -// RemoteClient_Events_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Events' -type RemoteClient_Events_Call struct { - *mock.Call -} - -// Events is a helper method to define mock.On call -// - ctx context.Context -// - req *coretypes.RequestEvents -func (_e *RemoteClient_Expecter) Events(ctx interface{}, req interface{}) *RemoteClient_Events_Call { - return &RemoteClient_Events_Call{Call: _e.mock.On("Events", ctx, req)} -} - -func (_c *RemoteClient_Events_Call) Run(run func(ctx context.Context, req *coretypes.RequestEvents)) *RemoteClient_Events_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*coretypes.RequestEvents)) - }) - return _c -} - -func (_c *RemoteClient_Events_Call) Return(_a0 *coretypes.ResultEvents, _a1 error) *RemoteClient_Events_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Events_Call) RunAndReturn(run func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)) *RemoteClient_Events_Call { - _c.Call.Return(run) - return _c -} - // Genesis provides a mock function with given fields: _a0 func (_m *RemoteClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) @@ -1183,34 +620,6 @@ func (_m *RemoteClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, return r0, r1 } -// RemoteClient_Genesis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Genesis' -type RemoteClient_Genesis_Call struct { - *mock.Call -} - -// Genesis is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) Genesis(_a0 interface{}) *RemoteClient_Genesis_Call { - return &RemoteClient_Genesis_Call{Call: _e.mock.On("Genesis", _a0)} -} - -func (_c *RemoteClient_Genesis_Call) Run(run func(_a0 context.Context)) *RemoteClient_Genesis_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_Genesis_Call) Return(_a0 *coretypes.ResultGenesis, _a1 error) *RemoteClient_Genesis_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Genesis_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultGenesis, error)) *RemoteClient_Genesis_Call { - _c.Call.Return(run) - return _c -} - // GenesisChunked provides a mock function with given fields: _a0, _a1 func (_m *RemoteClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) @@ -1241,35 +650,6 @@ func (_m *RemoteClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretype return r0, r1 } -// RemoteClient_GenesisChunked_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenesisChunked' -type RemoteClient_GenesisChunked_Call struct { - *mock.Call -} - -// GenesisChunked is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 uint -func (_e *RemoteClient_Expecter) GenesisChunked(_a0 interface{}, _a1 interface{}) *RemoteClient_GenesisChunked_Call { - return &RemoteClient_GenesisChunked_Call{Call: _e.mock.On("GenesisChunked", _a0, _a1)} -} - -func (_c *RemoteClient_GenesisChunked_Call) Run(run func(_a0 context.Context, _a1 uint)) *RemoteClient_GenesisChunked_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint)) - }) - return _c -} - -func (_c *RemoteClient_GenesisChunked_Call) Return(_a0 *coretypes.ResultGenesisChunk, _a1 error) *RemoteClient_GenesisChunked_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_GenesisChunked_Call) RunAndReturn(run func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)) *RemoteClient_GenesisChunked_Call { - _c.Call.Return(run) - return _c -} - // Header provides a mock function with given fields: ctx, height func (_m *RemoteClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) @@ -1300,35 +680,6 @@ func (_m *RemoteClient) Header(ctx context.Context, height *int64) (*coretypes.R return r0, r1 } -// RemoteClient_Header_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Header' -type RemoteClient_Header_Call struct { - *mock.Call -} - -// Header is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -func (_e *RemoteClient_Expecter) Header(ctx interface{}, height interface{}) *RemoteClient_Header_Call { - return &RemoteClient_Header_Call{Call: _e.mock.On("Header", ctx, height)} -} - -func (_c *RemoteClient_Header_Call) Run(run func(ctx context.Context, height *int64)) *RemoteClient_Header_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64)) - }) - return _c -} - -func (_c *RemoteClient_Header_Call) Return(_a0 *coretypes.ResultHeader, _a1 error) *RemoteClient_Header_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Header_Call) RunAndReturn(run func(context.Context, *int64) (*coretypes.ResultHeader, error)) *RemoteClient_Header_Call { - _c.Call.Return(run) - return _c -} - // HeaderByHash provides a mock function with given fields: ctx, hash func (_m *RemoteClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) @@ -1359,35 +710,6 @@ func (_m *RemoteClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) ( return r0, r1 } -// RemoteClient_HeaderByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByHash' -type RemoteClient_HeaderByHash_Call struct { - *mock.Call -} - -// HeaderByHash is a helper method to define mock.On call -// - ctx context.Context -// - hash bytes.HexBytes -func (_e *RemoteClient_Expecter) HeaderByHash(ctx interface{}, hash interface{}) *RemoteClient_HeaderByHash_Call { - return &RemoteClient_HeaderByHash_Call{Call: _e.mock.On("HeaderByHash", ctx, hash)} -} - -func (_c *RemoteClient_HeaderByHash_Call) Run(run func(ctx context.Context, hash bytes.HexBytes)) *RemoteClient_HeaderByHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *RemoteClient_HeaderByHash_Call) Return(_a0 *coretypes.ResultHeader, _a1 error) *RemoteClient_HeaderByHash_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_HeaderByHash_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)) *RemoteClient_HeaderByHash_Call { - _c.Call.Return(run) - return _c -} - // Health provides a mock function with given fields: _a0 func (_m *RemoteClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) @@ -1418,34 +740,6 @@ func (_m *RemoteClient) Health(_a0 context.Context) (*coretypes.ResultHealth, er return r0, r1 } -// RemoteClient_Health_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Health' -type RemoteClient_Health_Call struct { - *mock.Call -} - -// Health is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) Health(_a0 interface{}) *RemoteClient_Health_Call { - return &RemoteClient_Health_Call{Call: _e.mock.On("Health", _a0)} -} - -func (_c *RemoteClient_Health_Call) Run(run func(_a0 context.Context)) *RemoteClient_Health_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_Health_Call) Return(_a0 *coretypes.ResultHealth, _a1 error) *RemoteClient_Health_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Health_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultHealth, error)) *RemoteClient_Health_Call { - _c.Call.Return(run) - return _c -} - // NetInfo provides a mock function with given fields: _a0 func (_m *RemoteClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) @@ -1476,34 +770,6 @@ func (_m *RemoteClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, return r0, r1 } -// RemoteClient_NetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NetInfo' -type RemoteClient_NetInfo_Call struct { - *mock.Call -} - -// NetInfo is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) NetInfo(_a0 interface{}) *RemoteClient_NetInfo_Call { - return &RemoteClient_NetInfo_Call{Call: _e.mock.On("NetInfo", _a0)} -} - -func (_c *RemoteClient_NetInfo_Call) Run(run func(_a0 context.Context)) *RemoteClient_NetInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_NetInfo_Call) Return(_a0 *coretypes.ResultNetInfo, _a1 error) *RemoteClient_NetInfo_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_NetInfo_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultNetInfo, error)) *RemoteClient_NetInfo_Call { - _c.Call.Return(run) - return _c -} - // NumUnconfirmedTxs provides a mock function with given fields: _a0 func (_m *RemoteClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) @@ -1534,34 +800,6 @@ func (_m *RemoteClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.Resul return r0, r1 } -// RemoteClient_NumUnconfirmedTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NumUnconfirmedTxs' -type RemoteClient_NumUnconfirmedTxs_Call struct { - *mock.Call -} - -// NumUnconfirmedTxs is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) NumUnconfirmedTxs(_a0 interface{}) *RemoteClient_NumUnconfirmedTxs_Call { - return &RemoteClient_NumUnconfirmedTxs_Call{Call: _e.mock.On("NumUnconfirmedTxs", _a0)} -} - -func (_c *RemoteClient_NumUnconfirmedTxs_Call) Run(run func(_a0 context.Context)) *RemoteClient_NumUnconfirmedTxs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_NumUnconfirmedTxs_Call) Return(_a0 *coretypes.ResultUnconfirmedTxs, _a1 error) *RemoteClient_NumUnconfirmedTxs_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_NumUnconfirmedTxs_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)) *RemoteClient_NumUnconfirmedTxs_Call { - _c.Call.Return(run) - return _c -} - // Remote provides a mock function with given fields: func (_m *RemoteClient) Remote() string { ret := _m.Called() @@ -1580,33 +818,6 @@ func (_m *RemoteClient) Remote() string { return r0 } -// RemoteClient_Remote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remote' -type RemoteClient_Remote_Call struct { - *mock.Call -} - -// Remote is a helper method to define mock.On call -func (_e *RemoteClient_Expecter) Remote() *RemoteClient_Remote_Call { - return &RemoteClient_Remote_Call{Call: _e.mock.On("Remote")} -} - -func (_c *RemoteClient_Remote_Call) Run(run func()) *RemoteClient_Remote_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *RemoteClient_Remote_Call) Return(_a0 string) *RemoteClient_Remote_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *RemoteClient_Remote_Call) RunAndReturn(run func() string) *RemoteClient_Remote_Call { - _c.Call.Return(run) - return _c -} - // RemoveTx provides a mock function with given fields: _a0, _a1 func (_m *RemoteClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) @@ -1625,35 +836,6 @@ func (_m *RemoteClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { return r0 } -// RemoteClient_RemoveTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveTx' -type RemoteClient_RemoveTx_Call struct { - *mock.Call -} - -// RemoveTx is a helper method to define mock.On call -// - _a0 context.Context -// - _a1 types.TxKey -func (_e *RemoteClient_Expecter) RemoveTx(_a0 interface{}, _a1 interface{}) *RemoteClient_RemoveTx_Call { - return &RemoteClient_RemoveTx_Call{Call: _e.mock.On("RemoveTx", _a0, _a1)} -} - -func (_c *RemoteClient_RemoveTx_Call) Run(run func(_a0 context.Context, _a1 types.TxKey)) *RemoteClient_RemoveTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(types.TxKey)) - }) - return _c -} - -func (_c *RemoteClient_RemoveTx_Call) Return(_a0 error) *RemoteClient_RemoveTx_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *RemoteClient_RemoveTx_Call) RunAndReturn(run func(context.Context, types.TxKey) error) *RemoteClient_RemoveTx_Call { - _c.Call.Return(run) - return _c -} - // Start provides a mock function with given fields: _a0 func (_m *RemoteClient) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -1672,34 +854,6 @@ func (_m *RemoteClient) Start(_a0 context.Context) error { return r0 } -// RemoteClient_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type RemoteClient_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) Start(_a0 interface{}) *RemoteClient_Start_Call { - return &RemoteClient_Start_Call{Call: _e.mock.On("Start", _a0)} -} - -func (_c *RemoteClient_Start_Call) Run(run func(_a0 context.Context)) *RemoteClient_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_Start_Call) Return(_a0 error) *RemoteClient_Start_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *RemoteClient_Start_Call) RunAndReturn(run func(context.Context) error) *RemoteClient_Start_Call { - _c.Call.Return(run) - return _c -} - // Status provides a mock function with given fields: _a0 func (_m *RemoteClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) @@ -1730,34 +884,6 @@ func (_m *RemoteClient) Status(_a0 context.Context) (*coretypes.ResultStatus, er return r0, r1 } -// RemoteClient_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' -type RemoteClient_Status_Call struct { - *mock.Call -} - -// Status is a helper method to define mock.On call -// - _a0 context.Context -func (_e *RemoteClient_Expecter) Status(_a0 interface{}) *RemoteClient_Status_Call { - return &RemoteClient_Status_Call{Call: _e.mock.On("Status", _a0)} -} - -func (_c *RemoteClient_Status_Call) Run(run func(_a0 context.Context)) *RemoteClient_Status_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *RemoteClient_Status_Call) Return(_a0 *coretypes.ResultStatus, _a1 error) *RemoteClient_Status_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Status_Call) RunAndReturn(run func(context.Context) (*coretypes.ResultStatus, error)) *RemoteClient_Status_Call { - _c.Call.Return(run) - return _c -} - // Subscribe provides a mock function with given fields: ctx, subscriber, query, outCapacity func (_m *RemoteClient) Subscribe(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) { _va := make([]interface{}, len(outCapacity)) @@ -1795,44 +921,6 @@ func (_m *RemoteClient) Subscribe(ctx context.Context, subscriber string, query return r0, r1 } -// RemoteClient_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe' -type RemoteClient_Subscribe_Call struct { - *mock.Call -} - -// Subscribe is a helper method to define mock.On call -// - ctx context.Context -// - subscriber string -// - query string -// - outCapacity ...int -func (_e *RemoteClient_Expecter) Subscribe(ctx interface{}, subscriber interface{}, query interface{}, outCapacity ...interface{}) *RemoteClient_Subscribe_Call { - return &RemoteClient_Subscribe_Call{Call: _e.mock.On("Subscribe", - append([]interface{}{ctx, subscriber, query}, outCapacity...)...)} -} - -func (_c *RemoteClient_Subscribe_Call) Run(run func(ctx context.Context, subscriber string, query string, outCapacity ...int)) *RemoteClient_Subscribe_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]int, len(args)-3) - for i, a := range args[3:] { - if a != nil { - variadicArgs[i] = a.(int) - } - } - run(args[0].(context.Context), args[1].(string), args[2].(string), variadicArgs...) - }) - return _c -} - -func (_c *RemoteClient_Subscribe_Call) Return(out <-chan coretypes.ResultEvent, err error) *RemoteClient_Subscribe_Call { - _c.Call.Return(out, err) - return _c -} - -func (_c *RemoteClient_Subscribe_Call) RunAndReturn(run func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)) *RemoteClient_Subscribe_Call { - _c.Call.Return(run) - return _c -} - // Tx provides a mock function with given fields: ctx, hash, prove func (_m *RemoteClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) @@ -1863,36 +951,6 @@ func (_m *RemoteClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) return r0, r1 } -// RemoteClient_Tx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tx' -type RemoteClient_Tx_Call struct { - *mock.Call -} - -// Tx is a helper method to define mock.On call -// - ctx context.Context -// - hash bytes.HexBytes -// - prove bool -func (_e *RemoteClient_Expecter) Tx(ctx interface{}, hash interface{}, prove interface{}) *RemoteClient_Tx_Call { - return &RemoteClient_Tx_Call{Call: _e.mock.On("Tx", ctx, hash, prove)} -} - -func (_c *RemoteClient_Tx_Call) Run(run func(ctx context.Context, hash bytes.HexBytes, prove bool)) *RemoteClient_Tx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes), args[2].(bool)) - }) - return _c -} - -func (_c *RemoteClient_Tx_Call) Return(_a0 *coretypes.ResultTx, _a1 error) *RemoteClient_Tx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Tx_Call) RunAndReturn(run func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)) *RemoteClient_Tx_Call { - _c.Call.Return(run) - return _c -} - // TxSearch provides a mock function with given fields: ctx, query, prove, page, perPage, orderBy func (_m *RemoteClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) @@ -1923,39 +981,6 @@ func (_m *RemoteClient) TxSearch(ctx context.Context, query string, prove bool, return r0, r1 } -// RemoteClient_TxSearch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxSearch' -type RemoteClient_TxSearch_Call struct { - *mock.Call -} - -// TxSearch is a helper method to define mock.On call -// - ctx context.Context -// - query string -// - prove bool -// - page *int -// - perPage *int -// - orderBy string -func (_e *RemoteClient_Expecter) TxSearch(ctx interface{}, query interface{}, prove interface{}, page interface{}, perPage interface{}, orderBy interface{}) *RemoteClient_TxSearch_Call { - return &RemoteClient_TxSearch_Call{Call: _e.mock.On("TxSearch", ctx, query, prove, page, perPage, orderBy)} -} - -func (_c *RemoteClient_TxSearch_Call) Run(run func(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string)) *RemoteClient_TxSearch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(bool), args[3].(*int), args[4].(*int), args[5].(string)) - }) - return _c -} - -func (_c *RemoteClient_TxSearch_Call) Return(_a0 *coretypes.ResultTxSearch, _a1 error) *RemoteClient_TxSearch_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_TxSearch_Call) RunAndReturn(run func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)) *RemoteClient_TxSearch_Call { - _c.Call.Return(run) - return _c -} - // UnconfirmedTxs provides a mock function with given fields: ctx, page, perPage func (_m *RemoteClient) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) @@ -1986,36 +1011,6 @@ func (_m *RemoteClient) UnconfirmedTxs(ctx context.Context, page *int, perPage * return r0, r1 } -// RemoteClient_UnconfirmedTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnconfirmedTxs' -type RemoteClient_UnconfirmedTxs_Call struct { - *mock.Call -} - -// UnconfirmedTxs is a helper method to define mock.On call -// - ctx context.Context -// - page *int -// - perPage *int -func (_e *RemoteClient_Expecter) UnconfirmedTxs(ctx interface{}, page interface{}, perPage interface{}) *RemoteClient_UnconfirmedTxs_Call { - return &RemoteClient_UnconfirmedTxs_Call{Call: _e.mock.On("UnconfirmedTxs", ctx, page, perPage)} -} - -func (_c *RemoteClient_UnconfirmedTxs_Call) Run(run func(ctx context.Context, page *int, perPage *int)) *RemoteClient_UnconfirmedTxs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int), args[2].(*int)) - }) - return _c -} - -func (_c *RemoteClient_UnconfirmedTxs_Call) Return(_a0 *coretypes.ResultUnconfirmedTxs, _a1 error) *RemoteClient_UnconfirmedTxs_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_UnconfirmedTxs_Call) RunAndReturn(run func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)) *RemoteClient_UnconfirmedTxs_Call { - _c.Call.Return(run) - return _c -} - // Unsubscribe provides a mock function with given fields: ctx, subscriber, query func (_m *RemoteClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) @@ -2034,36 +1029,6 @@ func (_m *RemoteClient) Unsubscribe(ctx context.Context, subscriber string, quer return r0 } -// RemoteClient_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' -type RemoteClient_Unsubscribe_Call struct { - *mock.Call -} - -// Unsubscribe is a helper method to define mock.On call -// - ctx context.Context -// - subscriber string -// - query string -func (_e *RemoteClient_Expecter) Unsubscribe(ctx interface{}, subscriber interface{}, query interface{}) *RemoteClient_Unsubscribe_Call { - return &RemoteClient_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", ctx, subscriber, query)} -} - -func (_c *RemoteClient_Unsubscribe_Call) Run(run func(ctx context.Context, subscriber string, query string)) *RemoteClient_Unsubscribe_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *RemoteClient_Unsubscribe_Call) Return(_a0 error) *RemoteClient_Unsubscribe_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *RemoteClient_Unsubscribe_Call) RunAndReturn(run func(context.Context, string, string) error) *RemoteClient_Unsubscribe_Call { - _c.Call.Return(run) - return _c -} - // UnsubscribeAll provides a mock function with given fields: ctx, subscriber func (_m *RemoteClient) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) @@ -2082,35 +1047,6 @@ func (_m *RemoteClient) UnsubscribeAll(ctx context.Context, subscriber string) e return r0 } -// RemoteClient_UnsubscribeAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubscribeAll' -type RemoteClient_UnsubscribeAll_Call struct { - *mock.Call -} - -// UnsubscribeAll is a helper method to define mock.On call -// - ctx context.Context -// - subscriber string -func (_e *RemoteClient_Expecter) UnsubscribeAll(ctx interface{}, subscriber interface{}) *RemoteClient_UnsubscribeAll_Call { - return &RemoteClient_UnsubscribeAll_Call{Call: _e.mock.On("UnsubscribeAll", ctx, subscriber)} -} - -func (_c *RemoteClient_UnsubscribeAll_Call) Run(run func(ctx context.Context, subscriber string)) *RemoteClient_UnsubscribeAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *RemoteClient_UnsubscribeAll_Call) Return(_a0 error) *RemoteClient_UnsubscribeAll_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *RemoteClient_UnsubscribeAll_Call) RunAndReturn(run func(context.Context, string) error) *RemoteClient_UnsubscribeAll_Call { - _c.Call.Return(run) - return _c -} - // Validators provides a mock function with given fields: ctx, height, page, perPage, requestQuorumInfo func (_m *RemoteClient) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) @@ -2141,38 +1077,6 @@ func (_m *RemoteClient) Validators(ctx context.Context, height *int64, page *int return r0, r1 } -// RemoteClient_Validators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validators' -type RemoteClient_Validators_Call struct { - *mock.Call -} - -// Validators is a helper method to define mock.On call -// - ctx context.Context -// - height *int64 -// - page *int -// - perPage *int -// - requestQuorumInfo *bool -func (_e *RemoteClient_Expecter) Validators(ctx interface{}, height interface{}, page interface{}, perPage interface{}, requestQuorumInfo interface{}) *RemoteClient_Validators_Call { - return &RemoteClient_Validators_Call{Call: _e.mock.On("Validators", ctx, height, page, perPage, requestQuorumInfo)} -} - -func (_c *RemoteClient_Validators_Call) Run(run func(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool)) *RemoteClient_Validators_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*int64), args[2].(*int), args[3].(*int), args[4].(*bool)) - }) - return _c -} - -func (_c *RemoteClient_Validators_Call) Return(_a0 *coretypes.ResultValidators, _a1 error) *RemoteClient_Validators_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *RemoteClient_Validators_Call) RunAndReturn(run func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)) *RemoteClient_Validators_Call { - _c.Call.Return(run) - return _c -} - // NewRemoteClient creates a new instance of RemoteClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewRemoteClient(t interface { diff --git a/types/mocks/blockeventpublisher.go b/types/mocks/blockeventpublisher.go index c94dac30fa..8f5c17f637 100644 --- a/types/mocks/blockeventpublisher.go +++ b/types/mocks/blockeventpublisher.go @@ -12,14 +12,6 @@ type BlockEventPublisher struct { mock.Mock } -type BlockEventPublisher_Expecter struct { - mock *mock.Mock -} - -func (_m *BlockEventPublisher) EXPECT() *BlockEventPublisher_Expecter { - return &BlockEventPublisher_Expecter{mock: &_m.Mock} -} - // PublishEventNewBlock provides a mock function with given fields: _a0 func (_m *BlockEventPublisher) PublishEventNewBlock(_a0 types.EventDataNewBlock) error { ret := _m.Called(_a0) @@ -38,34 +30,6 @@ func (_m *BlockEventPublisher) PublishEventNewBlock(_a0 types.EventDataNewBlock) return r0 } -// BlockEventPublisher_PublishEventNewBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventNewBlock' -type BlockEventPublisher_PublishEventNewBlock_Call struct { - *mock.Call -} - -// PublishEventNewBlock is a helper method to define mock.On call -// - _a0 types.EventDataNewBlock -func (_e *BlockEventPublisher_Expecter) PublishEventNewBlock(_a0 interface{}) *BlockEventPublisher_PublishEventNewBlock_Call { - return &BlockEventPublisher_PublishEventNewBlock_Call{Call: _e.mock.On("PublishEventNewBlock", _a0)} -} - -func (_c *BlockEventPublisher_PublishEventNewBlock_Call) Run(run func(_a0 types.EventDataNewBlock)) *BlockEventPublisher_PublishEventNewBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.EventDataNewBlock)) - }) - return _c -} - -func (_c *BlockEventPublisher_PublishEventNewBlock_Call) Return(_a0 error) *BlockEventPublisher_PublishEventNewBlock_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockEventPublisher_PublishEventNewBlock_Call) RunAndReturn(run func(types.EventDataNewBlock) error) *BlockEventPublisher_PublishEventNewBlock_Call { - _c.Call.Return(run) - return _c -} - // PublishEventNewBlockHeader provides a mock function with given fields: _a0 func (_m *BlockEventPublisher) PublishEventNewBlockHeader(_a0 types.EventDataNewBlockHeader) error { ret := _m.Called(_a0) @@ -84,34 +48,6 @@ func (_m *BlockEventPublisher) PublishEventNewBlockHeader(_a0 types.EventDataNew return r0 } -// BlockEventPublisher_PublishEventNewBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventNewBlockHeader' -type BlockEventPublisher_PublishEventNewBlockHeader_Call struct { - *mock.Call -} - -// PublishEventNewBlockHeader is a helper method to define mock.On call -// - _a0 types.EventDataNewBlockHeader -func (_e *BlockEventPublisher_Expecter) PublishEventNewBlockHeader(_a0 interface{}) *BlockEventPublisher_PublishEventNewBlockHeader_Call { - return &BlockEventPublisher_PublishEventNewBlockHeader_Call{Call: _e.mock.On("PublishEventNewBlockHeader", _a0)} -} - -func (_c *BlockEventPublisher_PublishEventNewBlockHeader_Call) Run(run func(_a0 types.EventDataNewBlockHeader)) *BlockEventPublisher_PublishEventNewBlockHeader_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.EventDataNewBlockHeader)) - }) - return _c -} - -func (_c *BlockEventPublisher_PublishEventNewBlockHeader_Call) Return(_a0 error) *BlockEventPublisher_PublishEventNewBlockHeader_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockEventPublisher_PublishEventNewBlockHeader_Call) RunAndReturn(run func(types.EventDataNewBlockHeader) error) *BlockEventPublisher_PublishEventNewBlockHeader_Call { - _c.Call.Return(run) - return _c -} - // PublishEventNewEvidence provides a mock function with given fields: _a0 func (_m *BlockEventPublisher) PublishEventNewEvidence(_a0 types.EventDataNewEvidence) error { ret := _m.Called(_a0) @@ -130,34 +66,6 @@ func (_m *BlockEventPublisher) PublishEventNewEvidence(_a0 types.EventDataNewEvi return r0 } -// BlockEventPublisher_PublishEventNewEvidence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventNewEvidence' -type BlockEventPublisher_PublishEventNewEvidence_Call struct { - *mock.Call -} - -// PublishEventNewEvidence is a helper method to define mock.On call -// - _a0 types.EventDataNewEvidence -func (_e *BlockEventPublisher_Expecter) PublishEventNewEvidence(_a0 interface{}) *BlockEventPublisher_PublishEventNewEvidence_Call { - return &BlockEventPublisher_PublishEventNewEvidence_Call{Call: _e.mock.On("PublishEventNewEvidence", _a0)} -} - -func (_c *BlockEventPublisher_PublishEventNewEvidence_Call) Run(run func(_a0 types.EventDataNewEvidence)) *BlockEventPublisher_PublishEventNewEvidence_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.EventDataNewEvidence)) - }) - return _c -} - -func (_c *BlockEventPublisher_PublishEventNewEvidence_Call) Return(_a0 error) *BlockEventPublisher_PublishEventNewEvidence_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockEventPublisher_PublishEventNewEvidence_Call) RunAndReturn(run func(types.EventDataNewEvidence) error) *BlockEventPublisher_PublishEventNewEvidence_Call { - _c.Call.Return(run) - return _c -} - // PublishEventTx provides a mock function with given fields: _a0 func (_m *BlockEventPublisher) PublishEventTx(_a0 types.EventDataTx) error { ret := _m.Called(_a0) @@ -176,34 +84,6 @@ func (_m *BlockEventPublisher) PublishEventTx(_a0 types.EventDataTx) error { return r0 } -// BlockEventPublisher_PublishEventTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventTx' -type BlockEventPublisher_PublishEventTx_Call struct { - *mock.Call -} - -// PublishEventTx is a helper method to define mock.On call -// - _a0 types.EventDataTx -func (_e *BlockEventPublisher_Expecter) PublishEventTx(_a0 interface{}) *BlockEventPublisher_PublishEventTx_Call { - return &BlockEventPublisher_PublishEventTx_Call{Call: _e.mock.On("PublishEventTx", _a0)} -} - -func (_c *BlockEventPublisher_PublishEventTx_Call) Run(run func(_a0 types.EventDataTx)) *BlockEventPublisher_PublishEventTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.EventDataTx)) - }) - return _c -} - -func (_c *BlockEventPublisher_PublishEventTx_Call) Return(_a0 error) *BlockEventPublisher_PublishEventTx_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockEventPublisher_PublishEventTx_Call) RunAndReturn(run func(types.EventDataTx) error) *BlockEventPublisher_PublishEventTx_Call { - _c.Call.Return(run) - return _c -} - // PublishEventValidatorSetUpdates provides a mock function with given fields: _a0 func (_m *BlockEventPublisher) PublishEventValidatorSetUpdates(_a0 types.EventDataValidatorSetUpdate) error { ret := _m.Called(_a0) @@ -222,34 +102,6 @@ func (_m *BlockEventPublisher) PublishEventValidatorSetUpdates(_a0 types.EventDa return r0 } -// BlockEventPublisher_PublishEventValidatorSetUpdates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublishEventValidatorSetUpdates' -type BlockEventPublisher_PublishEventValidatorSetUpdates_Call struct { - *mock.Call -} - -// PublishEventValidatorSetUpdates is a helper method to define mock.On call -// - _a0 types.EventDataValidatorSetUpdate -func (_e *BlockEventPublisher_Expecter) PublishEventValidatorSetUpdates(_a0 interface{}) *BlockEventPublisher_PublishEventValidatorSetUpdates_Call { - return &BlockEventPublisher_PublishEventValidatorSetUpdates_Call{Call: _e.mock.On("PublishEventValidatorSetUpdates", _a0)} -} - -func (_c *BlockEventPublisher_PublishEventValidatorSetUpdates_Call) Run(run func(_a0 types.EventDataValidatorSetUpdate)) *BlockEventPublisher_PublishEventValidatorSetUpdates_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.EventDataValidatorSetUpdate)) - }) - return _c -} - -func (_c *BlockEventPublisher_PublishEventValidatorSetUpdates_Call) Return(_a0 error) *BlockEventPublisher_PublishEventValidatorSetUpdates_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *BlockEventPublisher_PublishEventValidatorSetUpdates_Call) RunAndReturn(run func(types.EventDataValidatorSetUpdate) error) *BlockEventPublisher_PublishEventValidatorSetUpdates_Call { - _c.Call.Return(run) - return _c -} - // NewBlockEventPublisher creates a new instance of BlockEventPublisher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewBlockEventPublisher(t interface { diff --git a/types/mocks/privvalidator.go b/types/mocks/privvalidator.go index ab43f2c703..4fff072e51 100644 --- a/types/mocks/privvalidator.go +++ b/types/mocks/privvalidator.go @@ -24,14 +24,6 @@ type PrivValidator struct { mock.Mock } -type PrivValidator_Expecter struct { - mock *mock.Mock -} - -func (_m *PrivValidator) EXPECT() *PrivValidator_Expecter { - return &PrivValidator_Expecter{mock: &_m.Mock} -} - // ExtractIntoValidator provides a mock function with given fields: ctx, quorumHash func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash bytes.HexBytes) *types.Validator { ret := _m.Called(ctx, quorumHash) @@ -52,35 +44,6 @@ func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash by return r0 } -// PrivValidator_ExtractIntoValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtractIntoValidator' -type PrivValidator_ExtractIntoValidator_Call struct { - *mock.Call -} - -// ExtractIntoValidator is a helper method to define mock.On call -// - ctx context.Context -// - quorumHash bytes.HexBytes -func (_e *PrivValidator_Expecter) ExtractIntoValidator(ctx interface{}, quorumHash interface{}) *PrivValidator_ExtractIntoValidator_Call { - return &PrivValidator_ExtractIntoValidator_Call{Call: _e.mock.On("ExtractIntoValidator", ctx, quorumHash)} -} - -func (_c *PrivValidator_ExtractIntoValidator_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_ExtractIntoValidator_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *PrivValidator_ExtractIntoValidator_Call) Return(_a0 *types.Validator) *PrivValidator_ExtractIntoValidator_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *PrivValidator_ExtractIntoValidator_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) *types.Validator) *PrivValidator_ExtractIntoValidator_Call { - _c.Call.Return(run) - return _c -} - // GetFirstQuorumHash provides a mock function with given fields: _a0 func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes, error) { ret := _m.Called(_a0) @@ -111,34 +74,6 @@ func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes return r0, r1 } -// PrivValidator_GetFirstQuorumHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFirstQuorumHash' -type PrivValidator_GetFirstQuorumHash_Call struct { - *mock.Call -} - -// GetFirstQuorumHash is a helper method to define mock.On call -// - _a0 context.Context -func (_e *PrivValidator_Expecter) GetFirstQuorumHash(_a0 interface{}) *PrivValidator_GetFirstQuorumHash_Call { - return &PrivValidator_GetFirstQuorumHash_Call{Call: _e.mock.On("GetFirstQuorumHash", _a0)} -} - -func (_c *PrivValidator_GetFirstQuorumHash_Call) Run(run func(_a0 context.Context)) *PrivValidator_GetFirstQuorumHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *PrivValidator_GetFirstQuorumHash_Call) Return(_a0 bytes.HexBytes, _a1 error) *PrivValidator_GetFirstQuorumHash_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *PrivValidator_GetFirstQuorumHash_Call) RunAndReturn(run func(context.Context) (bytes.HexBytes, error)) *PrivValidator_GetFirstQuorumHash_Call { - _c.Call.Return(run) - return _c -} - // GetHeight provides a mock function with given fields: ctx, quorumHash func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexBytes) (int64, error) { ret := _m.Called(ctx, quorumHash) @@ -167,35 +102,6 @@ func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexByte return r0, r1 } -// PrivValidator_GetHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHeight' -type PrivValidator_GetHeight_Call struct { - *mock.Call -} - -// GetHeight is a helper method to define mock.On call -// - ctx context.Context -// - quorumHash bytes.HexBytes -func (_e *PrivValidator_Expecter) GetHeight(ctx interface{}, quorumHash interface{}) *PrivValidator_GetHeight_Call { - return &PrivValidator_GetHeight_Call{Call: _e.mock.On("GetHeight", ctx, quorumHash)} -} - -func (_c *PrivValidator_GetHeight_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_GetHeight_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *PrivValidator_GetHeight_Call) Return(_a0 int64, _a1 error) *PrivValidator_GetHeight_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *PrivValidator_GetHeight_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (int64, error)) *PrivValidator_GetHeight_Call { - _c.Call.Return(run) - return _c -} - // GetPrivateKey provides a mock function with given fields: ctx, quorumHash func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PrivKey, error) { ret := _m.Called(ctx, quorumHash) @@ -226,35 +132,6 @@ func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.Hex return r0, r1 } -// PrivValidator_GetPrivateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrivateKey' -type PrivValidator_GetPrivateKey_Call struct { - *mock.Call -} - -// GetPrivateKey is a helper method to define mock.On call -// - ctx context.Context -// - quorumHash bytes.HexBytes -func (_e *PrivValidator_Expecter) GetPrivateKey(ctx interface{}, quorumHash interface{}) *PrivValidator_GetPrivateKey_Call { - return &PrivValidator_GetPrivateKey_Call{Call: _e.mock.On("GetPrivateKey", ctx, quorumHash)} -} - -func (_c *PrivValidator_GetPrivateKey_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_GetPrivateKey_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *PrivValidator_GetPrivateKey_Call) Return(_a0 crypto.PrivKey, _a1 error) *PrivValidator_GetPrivateKey_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *PrivValidator_GetPrivateKey_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (crypto.PrivKey, error)) *PrivValidator_GetPrivateKey_Call { - _c.Call.Return(run) - return _c -} - // GetProTxHash provides a mock function with given fields: _a0 func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, error) { ret := _m.Called(_a0) @@ -285,34 +162,6 @@ func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, erro return r0, r1 } -// PrivValidator_GetProTxHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProTxHash' -type PrivValidator_GetProTxHash_Call struct { - *mock.Call -} - -// GetProTxHash is a helper method to define mock.On call -// - _a0 context.Context -func (_e *PrivValidator_Expecter) GetProTxHash(_a0 interface{}) *PrivValidator_GetProTxHash_Call { - return &PrivValidator_GetProTxHash_Call{Call: _e.mock.On("GetProTxHash", _a0)} -} - -func (_c *PrivValidator_GetProTxHash_Call) Run(run func(_a0 context.Context)) *PrivValidator_GetProTxHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *PrivValidator_GetProTxHash_Call) Return(_a0 bytes.HexBytes, _a1 error) *PrivValidator_GetProTxHash_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *PrivValidator_GetProTxHash_Call) RunAndReturn(run func(context.Context) (bytes.HexBytes, error)) *PrivValidator_GetProTxHash_Call { - _c.Call.Return(run) - return _c -} - // GetPubKey provides a mock function with given fields: ctx, quorumHash func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { ret := _m.Called(ctx, quorumHash) @@ -343,35 +192,6 @@ func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexByte return r0, r1 } -// PrivValidator_GetPubKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPubKey' -type PrivValidator_GetPubKey_Call struct { - *mock.Call -} - -// GetPubKey is a helper method to define mock.On call -// - ctx context.Context -// - quorumHash bytes.HexBytes -func (_e *PrivValidator_Expecter) GetPubKey(ctx interface{}, quorumHash interface{}) *PrivValidator_GetPubKey_Call { - return &PrivValidator_GetPubKey_Call{Call: _e.mock.On("GetPubKey", ctx, quorumHash)} -} - -func (_c *PrivValidator_GetPubKey_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_GetPubKey_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *PrivValidator_GetPubKey_Call) Return(_a0 crypto.PubKey, _a1 error) *PrivValidator_GetPubKey_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *PrivValidator_GetPubKey_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (crypto.PubKey, error)) *PrivValidator_GetPubKey_Call { - _c.Call.Return(run) - return _c -} - // GetThresholdPublicKey provides a mock function with given fields: ctx, quorumHash func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { ret := _m.Called(ctx, quorumHash) @@ -402,35 +222,6 @@ func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash b return r0, r1 } -// PrivValidator_GetThresholdPublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetThresholdPublicKey' -type PrivValidator_GetThresholdPublicKey_Call struct { - *mock.Call -} - -// GetThresholdPublicKey is a helper method to define mock.On call -// - ctx context.Context -// - quorumHash bytes.HexBytes -func (_e *PrivValidator_Expecter) GetThresholdPublicKey(ctx interface{}, quorumHash interface{}) *PrivValidator_GetThresholdPublicKey_Call { - return &PrivValidator_GetThresholdPublicKey_Call{Call: _e.mock.On("GetThresholdPublicKey", ctx, quorumHash)} -} - -func (_c *PrivValidator_GetThresholdPublicKey_Call) Run(run func(ctx context.Context, quorumHash bytes.HexBytes)) *PrivValidator_GetThresholdPublicKey_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bytes.HexBytes)) - }) - return _c -} - -func (_c *PrivValidator_GetThresholdPublicKey_Call) Return(_a0 crypto.PubKey, _a1 error) *PrivValidator_GetThresholdPublicKey_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *PrivValidator_GetThresholdPublicKey_Call) RunAndReturn(run func(context.Context, bytes.HexBytes) (crypto.PubKey, error)) *PrivValidator_GetThresholdPublicKey_Call { - _c.Call.Return(run) - return _c -} - // SignProposal provides a mock function with given fields: ctx, chainID, quorumType, quorumHash, proposal func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, proposal *tenderminttypes.Proposal) (bytes.HexBytes, error) { ret := _m.Called(ctx, chainID, quorumType, quorumHash, proposal) @@ -461,38 +252,6 @@ func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quoru return r0, r1 } -// PrivValidator_SignProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignProposal' -type PrivValidator_SignProposal_Call struct { - *mock.Call -} - -// SignProposal is a helper method to define mock.On call -// - ctx context.Context -// - chainID string -// - quorumType btcjson.LLMQType -// - quorumHash bytes.HexBytes -// - proposal *tenderminttypes.Proposal -func (_e *PrivValidator_Expecter) SignProposal(ctx interface{}, chainID interface{}, quorumType interface{}, quorumHash interface{}, proposal interface{}) *PrivValidator_SignProposal_Call { - return &PrivValidator_SignProposal_Call{Call: _e.mock.On("SignProposal", ctx, chainID, quorumType, quorumHash, proposal)} -} - -func (_c *PrivValidator_SignProposal_Call) Run(run func(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, proposal *tenderminttypes.Proposal)) *PrivValidator_SignProposal_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(btcjson.LLMQType), args[3].(bytes.HexBytes), args[4].(*tenderminttypes.Proposal)) - }) - return _c -} - -func (_c *PrivValidator_SignProposal_Call) Return(_a0 bytes.HexBytes, _a1 error) *PrivValidator_SignProposal_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *PrivValidator_SignProposal_Call) RunAndReturn(run func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) (bytes.HexBytes, error)) *PrivValidator_SignProposal_Call { - _c.Call.Return(run) - return _c -} - // SignVote provides a mock function with given fields: ctx, chainID, quorumType, quorumHash, vote, logger func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, vote *tenderminttypes.Vote, logger log.Logger) error { ret := _m.Called(ctx, chainID, quorumType, quorumHash, vote, logger) @@ -511,76 +270,11 @@ func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumTyp return r0 } -// PrivValidator_SignVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignVote' -type PrivValidator_SignVote_Call struct { - *mock.Call -} - -// SignVote is a helper method to define mock.On call -// - ctx context.Context -// - chainID string -// - quorumType btcjson.LLMQType -// - quorumHash bytes.HexBytes -// - vote *tenderminttypes.Vote -// - logger log.Logger -func (_e *PrivValidator_Expecter) SignVote(ctx interface{}, chainID interface{}, quorumType interface{}, quorumHash interface{}, vote interface{}, logger interface{}) *PrivValidator_SignVote_Call { - return &PrivValidator_SignVote_Call{Call: _e.mock.On("SignVote", ctx, chainID, quorumType, quorumHash, vote, logger)} -} - -func (_c *PrivValidator_SignVote_Call) Run(run func(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, vote *tenderminttypes.Vote, logger log.Logger)) *PrivValidator_SignVote_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(btcjson.LLMQType), args[3].(bytes.HexBytes), args[4].(*tenderminttypes.Vote), args[5].(log.Logger)) - }) - return _c -} - -func (_c *PrivValidator_SignVote_Call) Return(_a0 error) *PrivValidator_SignVote_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *PrivValidator_SignVote_Call) RunAndReturn(run func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Vote, log.Logger) error) *PrivValidator_SignVote_Call { - _c.Call.Return(run) - return _c -} - // UpdatePrivateKey provides a mock function with given fields: ctx, privateKey, quorumHash, thresholdPublicKey, height func (_m *PrivValidator) UpdatePrivateKey(ctx context.Context, privateKey crypto.PrivKey, quorumHash bytes.HexBytes, thresholdPublicKey crypto.PubKey, height int64) { _m.Called(ctx, privateKey, quorumHash, thresholdPublicKey, height) } -// PrivValidator_UpdatePrivateKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePrivateKey' -type PrivValidator_UpdatePrivateKey_Call struct { - *mock.Call -} - -// UpdatePrivateKey is a helper method to define mock.On call -// - ctx context.Context -// - privateKey crypto.PrivKey -// - quorumHash bytes.HexBytes -// - thresholdPublicKey crypto.PubKey -// - height int64 -func (_e *PrivValidator_Expecter) UpdatePrivateKey(ctx interface{}, privateKey interface{}, quorumHash interface{}, thresholdPublicKey interface{}, height interface{}) *PrivValidator_UpdatePrivateKey_Call { - return &PrivValidator_UpdatePrivateKey_Call{Call: _e.mock.On("UpdatePrivateKey", ctx, privateKey, quorumHash, thresholdPublicKey, height)} -} - -func (_c *PrivValidator_UpdatePrivateKey_Call) Run(run func(ctx context.Context, privateKey crypto.PrivKey, quorumHash bytes.HexBytes, thresholdPublicKey crypto.PubKey, height int64)) *PrivValidator_UpdatePrivateKey_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(crypto.PrivKey), args[2].(bytes.HexBytes), args[3].(crypto.PubKey), args[4].(int64)) - }) - return _c -} - -func (_c *PrivValidator_UpdatePrivateKey_Call) Return() *PrivValidator_UpdatePrivateKey_Call { - _c.Call.Return() - return _c -} - -func (_c *PrivValidator_UpdatePrivateKey_Call) RunAndReturn(run func(context.Context, crypto.PrivKey, bytes.HexBytes, crypto.PubKey, int64)) *PrivValidator_UpdatePrivateKey_Call { - _c.Call.Return(run) - return _c -} - // NewPrivValidator creates a new instance of PrivValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewPrivValidator(t interface { From b96c288285dab6bdcbeef128d40c5b12adaac822 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:07:41 +0200 Subject: [PATCH 13/16] chore: updated check-mocks --- .github/workflows/check-generated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index f84122e4c4..1964d563a3 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/setup-go@v5.0.1 with: - go-version: "1.23" + go-version: "1.23.2" - uses: actions/checkout@v4 From 36b0bae8b4c8d6e8473de2fa9a366cfe4ac01ef7 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:15:55 +0200 Subject: [PATCH 14/16] chore: use prebuilt mockery --- dash/core/mocks/client.go | 10 +++--- types/mocks/privvalidator.go | 70 ++++++++++++++++++------------------ 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/dash/core/mocks/client.go b/dash/core/mocks/client.go index 19511f16ac..364f2aaa74 100644 --- a/dash/core/mocks/client.go +++ b/dash/core/mocks/client.go @@ -6,6 +6,8 @@ import ( btcjson "github.com/dashpay/dashd-go/btcjson" bytes "github.com/dashpay/tenderdash/libs/bytes" + crypto "github.com/dashpay/tenderdash/crypto" + mock "github.com/stretchr/testify/mock" ) @@ -141,7 +143,7 @@ func (_m *Client) Ping() error { } // QuorumInfo provides a mock function with given fields: quorumType, quorumHash -func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBytes) (*btcjson.QuorumInfoResult, error) { +func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash) (*btcjson.QuorumInfoResult, error) { ret := _m.Called(quorumType, quorumHash) if len(ret) == 0 { @@ -150,10 +152,10 @@ func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBy var r0 *btcjson.QuorumInfoResult var r1 error - if rf, ok := ret.Get(0).(func(btcjson.LLMQType, bytes.HexBytes) (*btcjson.QuorumInfoResult, error)); ok { + if rf, ok := ret.Get(0).(func(btcjson.LLMQType, crypto.QuorumHash) (*btcjson.QuorumInfoResult, error)); ok { return rf(quorumType, quorumHash) } - if rf, ok := ret.Get(0).(func(btcjson.LLMQType, bytes.HexBytes) *btcjson.QuorumInfoResult); ok { + if rf, ok := ret.Get(0).(func(btcjson.LLMQType, crypto.QuorumHash) *btcjson.QuorumInfoResult); ok { r0 = rf(quorumType, quorumHash) } else { if ret.Get(0) != nil { @@ -161,7 +163,7 @@ func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBy } } - if rf, ok := ret.Get(1).(func(btcjson.LLMQType, bytes.HexBytes) error); ok { + if rf, ok := ret.Get(1).(func(btcjson.LLMQType, crypto.QuorumHash) error); ok { r1 = rf(quorumType, quorumHash) } else { r1 = ret.Error(1) diff --git a/types/mocks/privvalidator.go b/types/mocks/privvalidator.go index 4fff072e51..94c9663489 100644 --- a/types/mocks/privvalidator.go +++ b/types/mocks/privvalidator.go @@ -25,7 +25,7 @@ type PrivValidator struct { } // ExtractIntoValidator provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash bytes.HexBytes) *types.Validator { +func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash crypto.QuorumHash) *types.Validator { ret := _m.Called(ctx, quorumHash) if len(ret) == 0 { @@ -33,7 +33,7 @@ func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash by } var r0 *types.Validator - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *types.Validator); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) *types.Validator); ok { r0 = rf(ctx, quorumHash) } else { if ret.Get(0) != nil { @@ -45,23 +45,23 @@ func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash by } // GetFirstQuorumHash provides a mock function with given fields: _a0 -func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes, error) { +func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (crypto.QuorumHash, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetFirstQuorumHash") } - var r0 bytes.HexBytes + var r0 crypto.QuorumHash var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context) (crypto.QuorumHash, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(context.Context) bytes.HexBytes); ok { + if rf, ok := ret.Get(0).(func(context.Context) crypto.QuorumHash); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(bytes.HexBytes) + r0 = ret.Get(0).(crypto.QuorumHash) } } @@ -75,7 +75,7 @@ func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes } // GetHeight provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexBytes) (int64, error) { +func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash crypto.QuorumHash) (int64, error) { ret := _m.Called(ctx, quorumHash) if len(ret) == 0 { @@ -84,16 +84,16 @@ func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexByte var r0 int64 var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (int64, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) (int64, error)); ok { return rf(ctx, quorumHash) } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) int64); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) int64); ok { r0 = rf(ctx, quorumHash) } else { r0 = ret.Get(0).(int64) } - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, crypto.QuorumHash) error); ok { r1 = rf(ctx, quorumHash) } else { r1 = ret.Error(1) @@ -103,7 +103,7 @@ func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexByte } // GetPrivateKey provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PrivKey, error) { +func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash crypto.QuorumHash) (crypto.PrivKey, error) { ret := _m.Called(ctx, quorumHash) if len(ret) == 0 { @@ -112,10 +112,10 @@ func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.Hex var r0 crypto.PrivKey var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PrivKey, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) (crypto.PrivKey, error)); ok { return rf(ctx, quorumHash) } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PrivKey); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) crypto.PrivKey); ok { r0 = rf(ctx, quorumHash) } else { if ret.Get(0) != nil { @@ -123,7 +123,7 @@ func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.Hex } } - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, crypto.QuorumHash) error); ok { r1 = rf(ctx, quorumHash) } else { r1 = ret.Error(1) @@ -133,23 +133,23 @@ func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.Hex } // GetProTxHash provides a mock function with given fields: _a0 -func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, error) { +func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (crypto.ProTxHash, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetProTxHash") } - var r0 bytes.HexBytes + var r0 crypto.ProTxHash var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context) (crypto.ProTxHash, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(context.Context) bytes.HexBytes); ok { + if rf, ok := ret.Get(0).(func(context.Context) crypto.ProTxHash); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(bytes.HexBytes) + r0 = ret.Get(0).(crypto.ProTxHash) } } @@ -163,7 +163,7 @@ func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, erro } // GetPubKey provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { +func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash crypto.QuorumHash) (crypto.PubKey, error) { ret := _m.Called(ctx, quorumHash) if len(ret) == 0 { @@ -172,10 +172,10 @@ func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexByte var r0 crypto.PubKey var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) (crypto.PubKey, error)); ok { return rf(ctx, quorumHash) } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PubKey); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) crypto.PubKey); ok { r0 = rf(ctx, quorumHash) } else { if ret.Get(0) != nil { @@ -183,7 +183,7 @@ func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexByte } } - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, crypto.QuorumHash) error); ok { r1 = rf(ctx, quorumHash) } else { r1 = ret.Error(1) @@ -193,7 +193,7 @@ func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexByte } // GetThresholdPublicKey provides a mock function with given fields: ctx, quorumHash -func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { +func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash crypto.QuorumHash) (crypto.PubKey, error) { ret := _m.Called(ctx, quorumHash) if len(ret) == 0 { @@ -202,10 +202,10 @@ func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash b var r0 crypto.PubKey var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) (crypto.PubKey, error)); ok { return rf(ctx, quorumHash) } - if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) crypto.PubKey); ok { + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) crypto.PubKey); ok { r0 = rf(ctx, quorumHash) } else { if ret.Get(0) != nil { @@ -213,7 +213,7 @@ func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash b } } - if rf, ok := ret.Get(1).(func(context.Context, bytes.HexBytes) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, crypto.QuorumHash) error); ok { r1 = rf(ctx, quorumHash) } else { r1 = ret.Error(1) @@ -223,7 +223,7 @@ func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash b } // SignProposal provides a mock function with given fields: ctx, chainID, quorumType, quorumHash, proposal -func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, proposal *tenderminttypes.Proposal) (bytes.HexBytes, error) { +func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash, proposal *tenderminttypes.Proposal) (bytes.HexBytes, error) { ret := _m.Called(ctx, chainID, quorumType, quorumHash, proposal) if len(ret) == 0 { @@ -232,10 +232,10 @@ func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quoru var r0 bytes.HexBytes var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) (bytes.HexBytes, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, crypto.QuorumHash, *tenderminttypes.Proposal) (bytes.HexBytes, error)); ok { return rf(ctx, chainID, quorumType, quorumHash, proposal) } - if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) bytes.HexBytes); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, crypto.QuorumHash, *tenderminttypes.Proposal) bytes.HexBytes); ok { r0 = rf(ctx, chainID, quorumType, quorumHash, proposal) } else { if ret.Get(0) != nil { @@ -243,7 +243,7 @@ func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quoru } } - if rf, ok := ret.Get(1).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, string, btcjson.LLMQType, crypto.QuorumHash, *tenderminttypes.Proposal) error); ok { r1 = rf(ctx, chainID, quorumType, quorumHash, proposal) } else { r1 = ret.Error(1) @@ -253,7 +253,7 @@ func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quoru } // SignVote provides a mock function with given fields: ctx, chainID, quorumType, quorumHash, vote, logger -func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, vote *tenderminttypes.Vote, logger log.Logger) error { +func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash, vote *tenderminttypes.Vote, logger log.Logger) error { ret := _m.Called(ctx, chainID, quorumType, quorumHash, vote, logger) if len(ret) == 0 { @@ -261,7 +261,7 @@ func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumTyp } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Vote, log.Logger) error); ok { + if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, crypto.QuorumHash, *tenderminttypes.Vote, log.Logger) error); ok { r0 = rf(ctx, chainID, quorumType, quorumHash, vote, logger) } else { r0 = ret.Error(0) @@ -271,7 +271,7 @@ func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumTyp } // UpdatePrivateKey provides a mock function with given fields: ctx, privateKey, quorumHash, thresholdPublicKey, height -func (_m *PrivValidator) UpdatePrivateKey(ctx context.Context, privateKey crypto.PrivKey, quorumHash bytes.HexBytes, thresholdPublicKey crypto.PubKey, height int64) { +func (_m *PrivValidator) UpdatePrivateKey(ctx context.Context, privateKey crypto.PrivKey, quorumHash crypto.QuorumHash, thresholdPublicKey crypto.PubKey, height int64) { _m.Called(ctx, privateKey, quorumHash, thresholdPublicKey, height) } From ac34cf2b2900430b8cfbfabb6d23c7820e1312b5 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:50:10 +0100 Subject: [PATCH 15/16] chore: fix consistency of indexermocks invocation --- cmd/tenderdash/commands/reindex_event_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tenderdash/commands/reindex_event_test.go b/cmd/tenderdash/commands/reindex_event_test.go index 6352b995fa..5de0aa5bb3 100644 --- a/cmd/tenderdash/commands/reindex_event_test.go +++ b/cmd/tenderdash/commands/reindex_event_test.go @@ -13,7 +13,7 @@ import ( abcitypes "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/config" "github.com/dashpay/tenderdash/internal/state/indexer" - imocks "github.com/dashpay/tenderdash/internal/state/indexer/mocks" + indexermocks "github.com/dashpay/tenderdash/internal/state/indexer/mocks" "github.com/dashpay/tenderdash/internal/state/mocks" "github.com/dashpay/tenderdash/libs/log" "github.com/dashpay/tenderdash/proto/tendermint/state" @@ -137,7 +137,7 @@ func TestLoadBlockStore(t *testing.T) { func TestReIndexEvent(t *testing.T) { mockBlockStore := &mocks.BlockStore{} mockStateStore := &mocks.Store{} - mockEventSink := &imocks.EventSink{} + mockEventSink := &indexermocks.EventSink{} mockBlockStore. On("Base").Return(base). From 10817a3606cedfa7af07aaa96fe7ea0b5f19e023 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:06:57 +0100 Subject: [PATCH 16/16] build(deps): update mockery to 2.46.3 --- .github/workflows/check-generated.yml | 2 +- go.mod | 2 +- go.sum | 4 ++-- scripts/mockery_generate.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index 3cb802ea05..3e8c3802a9 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -31,7 +31,7 @@ jobs: run: | set -euo pipefail - readonly MOCKERY=2.46.2 # N.B. no leading "v" + readonly MOCKERY=2.46.3 # N.B. no leading "v" curl -sL "https://github.com/vektra/mockery/releases/download/v${MOCKERY}/mockery_${MOCKERY}_Linux_x86_64.tar.gz" | tar -C /usr/local/bin -xzf - make mockery 2>/dev/null diff --git a/go.mod b/go.mod index 0cce90ef68..119905765c 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/creachadair/taskgroup v0.3.2 github.com/go-pkgz/jrpc v0.2.0 github.com/google/go-cmp v0.6.0 - github.com/vektra/mockery/v2 v2.46.2 + github.com/vektra/mockery/v2 v2.46.3 ) require ( diff --git a/go.sum b/go.sum index 0c13d91704..4d79ad8f4e 100644 --- a/go.sum +++ b/go.sum @@ -934,8 +934,8 @@ github.com/uudashr/gocognit v1.1.3 h1:l+a111VcDbKfynh+airAy/DJQKaXh2m9vkoysMPSZy github.com/uudashr/gocognit v1.1.3/go.mod h1:aKH8/e8xbTRBwjbCkwZ8qt4l2EpKXl31KMHgSS+lZ2U= github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= -github.com/vektra/mockery/v2 v2.46.2 h1:bpUncWvkiDzqn+aWwt4dY1aS0F8Ob4k8+WJrWU/Kh4s= -github.com/vektra/mockery/v2 v2.46.2/go.mod h1:dDivqi0ShM8A29mLgZn13yZ14MdXlTM4V360u8JDWCQ= +github.com/vektra/mockery/v2 v2.46.3 h1:Aia4iShZeNTy6CZJcvweK4X97XOzXcqb+k9jm8IqBS0= +github.com/vektra/mockery/v2 v2.46.3/go.mod h1:dDivqi0ShM8A29mLgZn13yZ14MdXlTM4V360u8JDWCQ= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= diff --git a/scripts/mockery_generate.sh b/scripts/mockery_generate.sh index 70668c08f3..66d1fbbd19 100755 --- a/scripts/mockery_generate.sh +++ b/scripts/mockery_generate.sh @@ -6,7 +6,7 @@ # runs the published Docker container. This legerdemain is so that the CI build # and a local build can work off the same script. # -VERSION=v2.46.2 +VERSION=v2.46.3 if ! mockery --version 2>/dev/null | grep $VERSION; then echo "Please install mockery $VERSION"