diff --git a/.github/actions/bls/action.yml b/.github/actions/bls/action.yml index 442dc78b89..086757c92c 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.23" + go-version: "1.23.2" - uses: actions/checkout@v2 with: submodules: true diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 31f130e3c9..deaeb9e522 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ updates: directory: "/" schedule: interval: weekly - open-pull-requests-limit: 10 + open-pull-requests-limit: 5 # - package-ecosystem: npm # directory: "/docs" # schedule: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 633e5fd3f6..58bf607b3e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,9 @@ jobs: goos: ["linux"] timeout-minutes: 55 steps: - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "1.23" + go-version: "1.23.2" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -52,9 +52,9 @@ jobs: needs: build timeout-minutes: 5 steps: - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "1.23" + go-version: "1.23.2" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: @@ -77,9 +77,9 @@ jobs: needs: build timeout-minutes: 5 steps: - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "1.23" + go-version: "1.23.2" - 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 6e57e2ebae..5b751145a3 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -21,9 +21,9 @@ jobs: check-mocks: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "1.23" + go-version: "1.23.2" - uses: actions/checkout@v4 @@ -31,11 +31,11 @@ jobs: run: | set -euo pipefail - readonly MOCKERY=2.46.2 # N.B. no leading "v" + readonly MOCKERY=2.50.0 # 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 - 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)." @@ -47,9 +47,9 @@ jobs: check-proto: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "1.23" + go-version: "1.23.2" - uses: actions/checkout@v4 with: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9f168d3575..735bb7abdc 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -86,7 +86,7 @@ jobs: # on Docker Hub, as Github caches are not available for other branches. - name: Build and cache image with dependencies id: docker_bls - uses: docker/build-push-action@v6.9.0 + uses: docker/build-push-action@v6.10.0 with: context: . file: ./DOCKER/Dockerfile @@ -102,7 +102,7 @@ jobs: - name: Publish to Docker Hub id: docker_build - uses: docker/build-push-action@v6.9.0 + uses: docker/build-push-action@v6.10.0 with: context: . file: ./DOCKER/Dockerfile diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 77379b4379..d38c13e78e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -8,6 +8,7 @@ on: paths: - "**Dockerfile" - "**.go" + - "go.sum" push: branches: - master @@ -26,9 +27,9 @@ jobs: CGO_LDFLAGS: "-L/usr/local/lib -ldashbls -lrelic_s -lmimalloc-secure -lgmp" CGO_CXXFLAGS: "-I/usr/local/include" steps: - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "1.23" + go-version: "1.23.2" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.7.1 @@ -54,7 +55,7 @@ jobs: if: "github.event_name != 'pull_request' || env.GIT_DIFF != ''" - name: Build E2E Docker image - uses: docker/build-push-action@v6.9.0 + uses: docker/build-push-action@v6.10.0 with: context: . file: test/e2e/docker/Dockerfile diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bd494e3a7b..5644aeab14 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,9 +30,9 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "^1.23" + go-version: "^1.23.2" - uses: technote-space/get-diff-action@v6 with: PATTERNS: | diff --git a/.github/workflows/proto-lint.yml b/.github/workflows/proto-lint.yml index cfa456a217..b5bb731649 100644 --- a/.github/workflows/proto-lint.yml +++ b/.github/workflows/proto-lint.yml @@ -14,7 +14,7 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.35.0 + - uses: bufbuild/buf-setup-action@v1.47.2 - uses: bufbuild/buf-lint-action@v1 with: input: "proto" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 972ac03089..b531a0b373 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,9 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "1.23" + go-version: "1.23.2" - name: Build uses: goreleaser/goreleaser-action@v6 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1e16964c60..86b74651d1 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,11 +10,12 @@ jobs: - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-pr-message: "This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions." + stale-pr-message: + "This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions." days-before-stale: -1 days-before-close: -1 - days-before-pr-stale: 10 - days-before-pr-close: 4 + days-before-pr-stale: 31 + days-before-pr-close: 16 exempt-pr-labels: "S:wip" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2bb4cc2ada..7300760a4f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,7 @@ on: pull_request: paths: - "**.go" + - "go.sum" push: branches: - master @@ -16,9 +17,9 @@ jobs: matrix: part: ["00", "01", "02", "03", "04", "05"] steps: - - uses: actions/setup-go@v5.0.1 + - uses: actions/setup-go@v5.1.0 with: - go-version: "1.23" + go-version: "1.23.2" - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6 with: diff --git a/.golangci.yml b/.golangci.yml index 955e41347e..56416f8852 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,7 +6,6 @@ linters: - dogsled - dupl - errcheck - - exportloopref # - funlen # - gochecknoglobals # - gochecknoinits @@ -24,7 +23,6 @@ linters: - ineffassign # - interfacer # - lll - # - maligned - misspell - nakedret - nolintlint @@ -47,14 +45,10 @@ issues: linters-settings: dogsled: max-blank-identifiers: 3 - golint: - min-confidence: 0 goconst: min-len: 5 min-occurrences: 5 ignore-tests: true - maligned: - suggest-new: true misspell: locale: US revive: diff --git a/.mockery.yaml b/.mockery.yaml new file mode 100644 index 0000000000..d44c09dfc8 --- /dev/null +++ b/.mockery.yaml @@ -0,0 +1,73 @@ +--- +with-expecter: true +dir: "{{.InterfaceDir}}/mocks" +mockname: "{{.InterfaceName}}" +outpkg: "mocks" +filename: "{{.InterfaceName | lower}}.go" +log-level: "warn" +disable-version-string: true +resolve-type-alias: false +issue-845-fix: 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: + Store: + 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: diff --git a/CHANGELOG.md b/CHANGELOG.md index 59b2e47972..6ef5646977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,52 @@ +## [1.3.2] - 2024-12-11 + +### Bug Fixes + +- Validators endpoint fail during quorum rotation (#959) +- Node stalled after client has stopped (#1001) + +### Miscellaneous Tasks + +- [**breaking**] Docker log to stdout and minor logging tweaks (#951) +- Tune stale and dependabot settings (#967) + +### Refactor + +- [**breaking**] Remove support for cleveldb, boltdb, rocksdb, badgerdb (#974) + +### Testing + +- Update mockery configuration and regenerate mocks (#955) + +### Build + +- Bump actions/setup-go from 5.0.1 to 5.1.0 (#965) +- Bump github.com/creachadair/taskgroup from 0.3.2 to 0.12.0 (#961) +- Bump github.com/prometheus/common from 0.37.0 to 0.60.1 (#964) +- Bump github.com/oasisprotocol/oasis-core/go (#962) +- Replace tendermint/tm-db with cometbft/cometbft-db (#973) +- Bump golang.org/x/sync from 0.8.0 to 0.9.0 (#976) +- Bump github.com/creachadair/taskgroup from 0.12.0 to 0.13.2 (#986) +- Bump golang.org/x/crypto from 0.28.0 to 0.29.0 (#981) +- Bump bufbuild/buf-setup-action from 1.35.0 to 1.46.0 (#969) +- Bump golang.org/x/time from 0.6.0 to 0.8.0 (#980) +- Bump github.com/vektra/mockery/v2 from 2.46.3 to 2.49.1 (#988) +- Bump golang.org/x/net from 0.30.0 to 0.31.0 (#979) +- Bump github.com/golangci/golangci-lint from 1.61.0 to 1.62.2 (#985) +- Bump github.com/bufbuild/buf from 1.35.1 to 1.47.2 (#982) +- Bump google.golang.org/grpc from 1.67.1 to 1.68.0 (#977) +- Bump docker/build-push-action from 6.9.0 to 6.10.0 (#991) +- Bump github.com/oasisprotocol/oasis-core/go (#990) +- Bump bufbuild/buf-setup-action from 1.46.0 to 1.47.2 (#992) +- Bump github.com/creachadair/atomicfile from 0.2.6 to 0.3.6 (#989) +- Bump golang.org/x/term from 0.26.0 to 0.27.0 (#1000) +- Bump google.golang.org/grpc from 1.68.0 to 1.68.1 (#998) +- Bump golang.org/x/sync from 0.9.0 to 0.10.0 (#995) +- Bump golang.org/x/crypto from 0.29.0 to 0.30.0 (#996) +- Bump github.com/vektra/mockery/v2 from 2.49.1 to 2.50.0 (#999) +- Bump golang.org/x/net from 0.31.0 to 0.32.0 (#994) +- Bump github.com/prometheus/common from 0.60.1 to 0.61.0 (#997) + ## [1.3.1] - 2024-11-02 ### Bug Fixes @@ -10,6 +59,10 @@ - Update readme (#934) - Fix broken links (#940) +### Miscellaneous Tasks + +- Update changelog and version to 1.3.1 + ### Testing - Update tests for new proposal selection algo (#925) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 57b3b6b083..e9f49b5b30 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -5,7 +5,7 @@ # * image - creates final image of minimal size ARG ALPINE_VERSION=3.19 -ARG GOLANG_VERSION=1.23 +ARG GOLANG_VERSION=1.23.2 ################################# # STAGE 1: install dependencies # ################################# diff --git a/DOCKER/docker-entrypoint.sh b/DOCKER/docker-entrypoint.sh index acec503887..2853513428 100755 --- a/DOCKER/docker-entrypoint.sh +++ b/DOCKER/docker-entrypoint.sh @@ -1,6 +1,5 @@ #!/bin/bash - # TODO: Workaround for busy port problem happening with docker restart policy # we are trying to start a new container but previous process still not release # the port. @@ -15,9 +14,9 @@ got_signal=false # Function to handle signals and forward them to the tenderdash process # shellcheck disable=SC2317 _forward_signal() { - echo "Caught signal! Forwarding to tenderdash process." - got_signal=true - kill -s "$1" "$child" + echo "Caught signal! Forwarding to tenderdash process." + got_signal=true + kill -s "$1" "$child" } # Trap signals and forward them to the tenderdash process @@ -52,14 +51,14 @@ if [ ! -d "$TMHOME/config" ]; then fi # Start tenderdash in the background -tenderdash "$@" & +tenderdash "$@" 2>&1 & child=$! wait "$child" exit_code=$? if [ $got_signal == false ] && [ $exit_code -ne 0 ] && [ "$1" == "start" ]; then - echo "Sleeping for 10 seconds as workaround for the busy port problem. See entrypoint code for details." - sleep 10 + echo "Sleeping for 10 seconds as workaround for the busy port problem. See entrypoint code for details." + sleep 10 fi exit $exit_code diff --git a/Makefile b/Makefile index 9dd5f0384e..672eaa8c8f 100644 --- a/Makefile +++ b/Makefile @@ -65,28 +65,6 @@ ifeq (race,$(findstring race,$(TENDERMINT_BUILD_OPTIONS))) BUILD_FLAGS += -race endif -# handle cleveldb -ifeq (cleveldb,$(findstring cleveldb,$(TENDERMINT_BUILD_OPTIONS))) - CGO_ENABLED=1 - BUILD_TAGS += cleveldb -endif - -# handle badgerdb -ifeq (badgerdb,$(findstring badgerdb,$(TENDERMINT_BUILD_OPTIONS))) - BUILD_TAGS += badgerdb -endif - -# handle rocksdb -ifeq (rocksdb,$(findstring rocksdb,$(TENDERMINT_BUILD_OPTIONS))) - CGO_ENABLED=1 - BUILD_TAGS += rocksdb -endif - -# handle boltdb -ifeq (boltdb,$(findstring boltdb,$(TENDERMINT_BUILD_OPTIONS))) - BUILD_TAGS += boltdb -endif - # allow users to pass additional flags via the conventional LDFLAGS variable LD_FLAGS += $(LDFLAGS) @@ -292,7 +270,7 @@ format: lint: @echo "--> Running linter" - go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 run + go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 run .PHONY: lint DESTINATION = ./index.html.md @@ -336,7 +314,7 @@ build-docker: ############################################################################### mockery: - go generate -run="./scripts/mockery_generate.sh" ./... + ./scripts/mockery_generate.sh .PHONY: mockery ############################################################################### diff --git a/README.md b/README.md index 4f4ee8cfcb..93db563b36 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ requirements if installing from source. | Requirement | Notes | |-------------|------------------| -| Go version | Go1.23 or higher | +| Go version | Go1.23.2 or higher | ## Versioning diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md index 98e81d7235..ab7c86f396 100644 --- a/STYLE_GUIDE.md +++ b/STYLE_GUIDE.md @@ -76,7 +76,7 @@ Sometimes it's necessary to rename libraries to avoid naming collisions or ambig * Use [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) * Separate imports into blocks - one for the standard lib, one for external libs and one for application libs. * Here are some common library labels for consistency: - * dbm "github.com/tendermint/tm-db" + * dbm "github.com/cometbft/cometbft-db" * tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands" * tmcfg "github.com/tendermint/tendermint/config/tendermint" * tmtypes "github.com/tendermint/tendermint/types" diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 433a0cb60d..7c2d062858 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,7 +170,36 @@ func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, er return r0, r1 } -// Error provides a mock function with given fields: +// 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 no 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,7 +497,36 @@ func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (* return r0, r1 } -// IsRunning provides a mock function with given fields: +// 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 no 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 } -// Wait provides a mock function with given fields: +// 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 no 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.Run(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/client/socket_client.go b/abci/client/socket_client.go index 0726bb85f9..fb046187d8 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -38,6 +38,11 @@ type socketClient struct { var _ Client = (*socketClient)(nil) +var ( + // ErrClientStopped is returned when client wasn't started yet or it was terminated with an error. + ErrClientStopped = errors.New("client has stopped") +) + // NewSocketClient creates a new socket client, which connects to a given // address. If mustConnect is true, the client will return an error upon start // if it fails to connect. @@ -234,7 +239,7 @@ func (cli *socketClient) didRecvResponse(res *types.Response) error { func (cli *socketClient) doRequest(ctx context.Context, req *types.Request) (*types.Response, error) { if !cli.IsRunning() { - return nil, errors.New("client has stopped") + return nil, ErrClientStopped } reqres := makeReqRes(ctx, req) diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 608bc8be44..bf952d5ab4 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -12,9 +12,9 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/gogo/protobuf/proto" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/abci/example/code" abci "github.com/dashpay/tenderdash/abci/types" diff --git a/abci/example/kvstore/state.go b/abci/example/kvstore/state.go index 8a9e47602c..9852ab3c58 100644 --- a/abci/example/kvstore/state.go +++ b/abci/example/kvstore/state.go @@ -7,7 +7,7 @@ import ( "io" "net/url" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/crypto" diff --git a/abci/example/kvstore/state_test.go b/abci/example/kvstore/state_test.go index e65f14950e..6ad3ad750a 100644 --- a/abci/example/kvstore/state_test.go +++ b/abci/example/kvstore/state_test.go @@ -4,9 +4,9 @@ import ( "bytes" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/crypto" tmbytes "github.com/dashpay/tenderdash/libs/bytes" diff --git a/abci/example/kvstore/store.go b/abci/example/kvstore/store.go index 6d5ab19d3c..032da081cf 100644 --- a/abci/example/kvstore/store.go +++ b/abci/example/kvstore/store.go @@ -6,7 +6,7 @@ import ( "io" "os" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" ) // StoreFactory is a factory that offers a reader to read data from, or writer to write data to it. 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/inspect.go b/cmd/tenderdash/commands/inspect.go index 84bbb1e18f..541f3bdb70 100644 --- a/cmd/tenderdash/commands/inspect.go +++ b/cmd/tenderdash/commands/inspect.go @@ -43,8 +43,6 @@ func MakeInspectCommand(conf *config.Config, logger log.Logger) *cobra.Command { } cmd.Flags().String("rpc.laddr", conf.RPC.ListenAddress, "RPC listenener address. Port required") - cmd.Flags().String("db-backend", - conf.DBBackend, "database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb") cmd.Flags().String("db-dir", conf.DBPath, "database directory") return cmd diff --git a/cmd/tenderdash/commands/light.go b/cmd/tenderdash/commands/light.go index acbe7ac21b..ff307401c9 100644 --- a/cmd/tenderdash/commands/light.go +++ b/cmd/tenderdash/commands/light.go @@ -11,8 +11,8 @@ import ( "syscall" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/spf13/cobra" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/config" dashcore "github.com/dashpay/tenderdash/dash/core" diff --git a/cmd/tenderdash/commands/reindex_event.go b/cmd/tenderdash/commands/reindex_event.go index 43250430b8..5716876090 100644 --- a/cmd/tenderdash/commands/reindex_event.go +++ b/cmd/tenderdash/commands/reindex_event.go @@ -6,8 +6,8 @@ import ( "path/filepath" "strings" + dbm "github.com/cometbft/cometbft-db" "github.com/spf13/cobra" - dbm "github.com/tendermint/tm-db" abcitypes "github.com/dashpay/tenderdash/abci/types" tmcfg "github.com/dashpay/tenderdash/config" diff --git a/cmd/tenderdash/commands/reindex_event_test.go b/cmd/tenderdash/commands/reindex_event_test.go index 37f58d9529..de55ad924e 100644 --- a/cmd/tenderdash/commands/reindex_event_test.go +++ b/cmd/tenderdash/commands/reindex_event_test.go @@ -5,14 +5,15 @@ import ( "errors" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/spf13/cobra" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abcitypes "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/config" "github.com/dashpay/tenderdash/internal/state/indexer" + 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" @@ -136,7 +137,7 @@ func TestLoadBlockStore(t *testing.T) { func TestReIndexEvent(t *testing.T) { mockBlockStore := &mocks.BlockStore{} mockStateStore := &mocks.Store{} - mockEventSink := &mocks.EventSink{} + mockEventSink := &indexermocks.EventSink{} mockBlockStore. On("Base").Return(base). diff --git a/cmd/tenderdash/commands/run_node.go b/cmd/tenderdash/commands/run_node.go index 820eb7f8fe..e7962630c3 100644 --- a/cmd/tenderdash/commands/run_node.go +++ b/cmd/tenderdash/commands/run_node.go @@ -81,10 +81,6 @@ func AddNodeFlags(cmd *cobra.Command, conf *cfg.Config) { } func addDBFlags(cmd *cobra.Command, conf *cfg.Config) { - cmd.Flags().String( - "db-backend", - conf.DBBackend, - "database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb") cmd.Flags().String( "db-dir", conf.DBPath, diff --git a/config/config.go b/config/config.go index afc0ced999..ac43d04413 100644 --- a/config/config.go +++ b/config/config.go @@ -9,6 +9,7 @@ import ( "os" "path/filepath" "strings" + "testing" "time" "github.com/dashpay/dashd-go/btcjson" @@ -197,25 +198,12 @@ type BaseConfig struct { //nolint: maligned // - No priv_validator_key.json, priv_validator_state.json Mode string `mapstructure:"mode"` - // Database backend: goleveldb | cleveldb | boltdb | rocksdb + // Database backend: only goleveldb is supported // * goleveldb (github.com/syndtr/goleveldb - most popular implementation) // - pure go // - stable - // * cleveldb (uses levigo wrapper) - // - fast - // - requires gcc - // - use cleveldb build tag (go build -tags cleveldb) - // * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) - // - EXPERIMENTAL - // - may be faster is some use-cases (random reads - indexer) - // - use boltdb build tag (go build -tags boltdb) - // * rocksdb (uses github.com/tecbot/gorocksdb) - // - EXPERIMENTAL - // - requires gcc - // - use rocksdb build tag (go build -tags rocksdb) - // * badgerdb (uses github.com/dgraph-io/badger) - // - EXPERIMENTAL - // - use badgerdb build tag (go build -tags badgerdb) + // + // Note: we don't remove it from config as we also use `memdb` in some tests. DBBackend string `mapstructure:"db-backend"` // Database directory @@ -356,6 +344,15 @@ func (cfg BaseConfig) ValidateBasic() error { return errors.New("deadlock-detection can't be negative") } + backends := map[string]bool{"goleveldb": true} + if testing.Testing() { + backends["memdb"] = true + } + // check if db_backends contains the db backend + if !backends[cfg.DBBackend] { + return fmt.Errorf("unsupported db backend: %s, only goleveldb is supported", cfg.DBBackend) + } + return nil } diff --git a/config/db.go b/config/db.go index 19874b1dab..d965997f4e 100644 --- a/config/db.go +++ b/config/db.go @@ -3,7 +3,7 @@ package config import ( "context" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/tenderdash/libs/log" "github.com/dashpay/tenderdash/libs/service" diff --git a/config/toml.go b/config/toml.go index 21badab4be..b6be127b28 100644 --- a/config/toml.go +++ b/config/toml.go @@ -101,25 +101,10 @@ moniker = "{{ .BaseConfig.Moniker }}" # - No priv_validator_key.json, priv_validator_state.json mode = "{{ .BaseConfig.Mode }}" -# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb +# Database backend: only goleveldb supported # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) # - pure go # - stable -# * cleveldb (uses levigo wrapper) -# - fast -# - requires gcc -# - use cleveldb build tag (go build -tags cleveldb) -# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) -# - EXPERIMENTAL -# - may be faster is some use-cases (random reads - indexer) -# - use boltdb build tag (go build -tags boltdb) -# * rocksdb (uses github.com/tecbot/gorocksdb) -# - EXPERIMENTAL -# - requires gcc -# - use rocksdb build tag (go build -tags rocksdb) -# * badgerdb (uses github.com/dgraph-io/badger) -# - EXPERIMENTAL -# - use badgerdb build tag (go build -tags badgerdb) db-backend = "{{ .BaseConfig.DBBackend }}" # Database directory diff --git a/dash/core/mocks/client.go b/dash/core/mocks/client.go index 364f2aaa74..34625cd015 100644 --- a/dash/core/mocks/client.go +++ b/dash/core/mocks/client.go @@ -16,7 +16,15 @@ type Client struct { mock.Mock } -// Close provides a mock function with given fields: +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 no fields func (_m *Client) Close() error { ret := _m.Called() @@ -34,7 +42,34 @@ func (_m *Client) Close() error { return r0 } -// GetNetworkInfo provides a mock function with given fields: +// 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 no fields func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { ret := _m.Called() @@ -64,6 +99,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) @@ -94,7 +156,35 @@ func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.Masterno return r0, r1 } -// MasternodeStatus provides a mock function with given fields: +// 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 no fields func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { ret := _m.Called() @@ -124,7 +214,34 @@ func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { return r0, r1 } -// Ping provides a mock function with given fields: +// 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 no fields func (_m *Client) Ping() error { ret := _m.Called() @@ -142,6 +259,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 crypto.QuorumHash) (*btcjson.QuorumInfoResult, error) { ret := _m.Called(quorumType, quorumHash) @@ -172,6 +316,35 @@ func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash crypto.Quor 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 crypto.QuorumHash +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 crypto.QuorumHash)) *Client_QuorumInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(btcjson.LLMQType), args[1].(crypto.QuorumHash)) + }) + 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, crypto.QuorumHash) (*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) @@ -202,6 +375,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) @@ -230,6 +434,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/dash/quorum/validator_conn_executor_test.go b/dash/quorum/validator_conn_executor_test.go index 4430648700..47c5d88fe9 100644 --- a/dash/quorum/validator_conn_executor_test.go +++ b/dash/quorum/validator_conn_executor_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" testifymock "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" abci "github.com/dashpay/tenderdash/abci/types" diff --git a/docs/nodes/configuration.md b/docs/nodes/configuration.md index a55bfb63a2..2a7c33e8ad 100644 --- a/docs/nodes/configuration.md +++ b/docs/nodes/configuration.md @@ -48,25 +48,10 @@ moniker = "sidewinder" # - No priv_validator_key.json, priv_validator_state.json mode = "validator" -# Database backend: goleveldb | cleveldb | boltdb | rocksdb | badgerdb +# Database backend: goleveldb # * goleveldb (github.com/syndtr/goleveldb - most popular implementation) # - pure go # - stable -# * cleveldb (uses levigo wrapper) -# - fast -# - requires gcc -# - use cleveldb build tag (go build -tags cleveldb) -# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) -# - EXPERIMENTAL -# - may be faster is some use-cases (random reads - indexer) -# - use boltdb build tag (go build -tags boltdb) -# * rocksdb (uses github.com/tecbot/gorocksdb) -# - EXPERIMENTAL -# - requires gcc -# - use rocksdb build tag (go build -tags rocksdb) -# * badgerdb (uses github.com/dgraph-io/badger) -# - EXPERIMENTAL -# - use badgerdb build tag (go build -tags badgerdb) db-backend = "goleveldb" # Database directory @@ -533,29 +518,31 @@ Tendermint will only create blocks if there are transactions, or after waiting This section will cover settings within the p2p section of the `config.toml`. - `external-address` = is the address that will be advertised for other nodes to use. We recommend setting this field with your public IP and p2p port. - - > We recommend setting an external address. When used in a private network, Tendermint Core currently doesn't advertise the node's public address. There is active and ongoing work to improve the P2P system, but this is a helpful workaround for now. + - > We recommend setting an external address. When used in a private network, Tendermint Core currently doesn't advertise the node's public address. There is active and ongoing work to improve the P2P system, but this is a helpful workaround for now. - `persistent-peers` = is a list of comma separated peers that you will always want to be connected to. If you're already connected to the maximum number of peers, persistent peers will not be added. - `pex` = turns the peer exchange reactor on or off. Validator node will want the `pex` turned off so it would not begin gossiping to unknown peers on the network. PeX can also be turned off for statically configured networks with fixed network connectivity. For full nodes on open, dynamic networks, it should be turned on. - `private-peer-ids` = is a comma-separated list of node ids that will _not_ be exposed to other peers (i.e., you will not tell other peers about the ids in this list). This can be filled with a validator's node id. -Recently the Tendermint Team conducted a refactor of the p2p layer. This lead to multiple config parameters being deprecated and/or replaced. +Recently the Tendermint Team conducted a refactor of the p2p layer. This lead to multiple config parameters being deprecated and/or replaced. We will cover the new and deprecated parameters below. + ### New Parameters There are three new parameters, which are enabled if use-legacy is set to false. - `queue-type` = sets a type of queue to use in the p2p layer. There are three options available `fifo`, `priority` and `wdrr`. The default is priority -- `bootstrap-peers` = is a list of comma seperated peers which will be used to bootstrap the address book. +- `bootstrap-peers` = is a list of comma seperated peers which will be used to bootstrap the address book. - `max-connections` = is the max amount of allowed inbound and outbound connections. + ### Deprecated Parameters > Note: For Tendermint 0.35, there are two p2p implementations. The old version is used by default with the deprecated fields. The new implementation uses different config parameters, explained above. -- `max-num-inbound-peers` = is the maximum number of peers you will accept inbound connections from at one time (where they dial your address and initiate the connection). *This was replaced by `max-connections`* -- `max-num-outbound-peers` = is the maximum number of peers you will initiate outbound connects to at one time (where you dial their address and initiate the connection).*This was replaced by `max-connections`* -- `unconditional-peer-ids` = is similar to `persistent-peers` except that these peers will be connected to even if you are already connected to the maximum number of peers. This can be a validator node ID on your sentry node. *Deprecated* -- `seeds` = is a list of comma separated seed nodes that you will connect upon a start and ask for peers. A seed node is a node that does not participate in consensus but only helps propagate peers to nodes in the networks *Deprecated, replaced by bootstrap peers* +- `max-num-inbound-peers` = is the maximum number of peers you will accept inbound connections from at one time (where they dial your address and initiate the connection). _This was replaced by `max-connections`_ +- `max-num-outbound-peers` = is the maximum number of peers you will initiate outbound connects to at one time (where you dial their address and initiate the connection)._This was replaced by `max-connections`_ +- `unconditional-peer-ids` = is similar to `persistent-peers` except that these peers will be connected to even if you are already connected to the maximum number of peers. This can be a validator node ID on your sentry node. _Deprecated_ +- `seeds` = is a list of comma separated seed nodes that you will connect upon a start and ask for peers. A seed node is a node that does not participate in consensus but only helps propagate peers to nodes in the networks _Deprecated, replaced by bootstrap peers_ ## Indexing Settings @@ -590,7 +577,7 @@ the `psql` indexer type. Example: ```shell -$ psql ... -f state/indexer/sink/psql/schema.sql +psql ... -f state/indexer/sink/psql/schema.sql ``` ## Unsafe Consensus Timeout Overrides diff --git a/docs/rfc/rfc-012-custom-indexing.md b/docs/rfc/rfc-012-custom-indexing.md index 9dc9bdbd60..2d2ef87aa8 100644 --- a/docs/rfc/rfc-012-custom-indexing.md +++ b/docs/rfc/rfc-012-custom-indexing.md @@ -329,7 +329,7 @@ something like this (subject to refinement): - [KV transaction indexer][kv-index] - [Pluggable custom event indexing][i7135] (#7135) - [PostgreSQL event sink][psql] - - [PostgreSQL database][postgres] + - [PostgreSQL database][postgres] - [Query filter language][query] - [Stream events to postgres for indexing][i1161] (#1161) - [Unbuffered event subscription slow down the consensus][i7247] (#7247) @@ -346,7 +346,6 @@ something like this (subject to refinement): [kv-index]: https://github.com/tendermint/tendermint/blob/master/internal/state/indexer/tx/kv [postgres]: https://postgresql.org/ [psql]: https://github.com/tendermint/tendermint/blob/master/internal/state/indexer/sink/psql -[psql]: https://github.com/tendermint/tendermint/blob/master/internal/state/indexer/sink/psql [query]: https://pkg.go.dev/github.com/tendermint/tendermint/internal/pubsub/query/syntax [sdk]: https://github.com/cosmos/cosmos-sdk -[tmdb]: https://pkg.go.dev/github.com/tendermint/tm-db#DB +[tmdb]: https://pkg.go.dev/github.com/cometbft/cometbft-db#DB diff --git a/docs/tutorials/go-built-in.md b/docs/tutorials/go-built-in.md index 9048130e15..e694d8e959 100644 --- a/docs/tutorials/go-built-in.md +++ b/docs/tutorials/go-built-in.md @@ -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.23 +go 1.23.2 require ( github.com/dgraph-io/badger/v3 v3.2103.2 diff --git a/docs/tutorials/go.md b/docs/tutorials/go.md index 8ca6f23a8c..034602cc26 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.23 +go 1.23.2 require ( github.com/dgraph-io/badger/v3 v3.2103.2 diff --git a/go.mod b/go.mod index 0cce90ef68..37752780e2 100644 --- a/go.mod +++ b/go.mod @@ -1,120 +1,143 @@ module github.com/dashpay/tenderdash -go 1.23 +go 1.23.2 require ( 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 - github.com/containerd/continuity v0.3.0 // indirect + github.com/containerd/continuity v0.4.4 // indirect github.com/dashpay/bls-signatures/go-bindings v0.0.0-20230207105415-06df92693ac8 github.com/dashpay/dashd-go v0.25.0 github.com/dashpay/dashd-go/btcec/v2 v2.1.0 // indirect github.com/fortytw2/leaktest v1.3.0 github.com/fxamacker/cbor/v2 v2.4.0 github.com/go-chi/chi v4.1.2+incompatible // indirect - github.com/go-kit/kit v0.12.0 + github.com/go-kit/kit v0.13.0 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.61.0 - github.com/google/btree v1.1.2 // indirect + github.com/golangci/golangci-lint v1.62.2 + github.com/google/btree v1.1.3 // indirect github.com/google/gopacket v1.1.19 github.com/google/orderedcode v0.0.1 github.com/google/uuid v1.6.0 - github.com/gorilla/websocket v1.5.0 + github.com/gorilla/websocket v1.5.3 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/lib/pq v1.10.9 github.com/libp2p/go-buffer-pool v0.1.0 github.com/mroth/weightedrand v0.4.1 - github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a github.com/ory/dockertest v3.3.5+incompatible - github.com/prometheus/client_golang v1.13.0 - github.com/rs/cors v1.11.0 + github.com/prometheus/client_golang v1.20.5 + github.com/rs/cors v1.11.1 github.com/rs/zerolog v1.29.0 github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa github.com/spf13/cobra v1.8.1 - github.com/spf13/viper v1.15.0 - 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.28.0 - golang.org/x/sync v0.8.0 - google.golang.org/grpc v1.66.0 + github.com/spf13/viper v1.19.0 + github.com/stretchr/testify v1.10.0 + golang.org/x/crypto v0.30.0 + golang.org/x/net v0.32.0 + golang.org/x/sync v0.10.0 + google.golang.org/grpc v1.68.1 pgregory.net/rapid v0.4.8 ) require ( - github.com/bufbuild/buf v1.35.1 - github.com/creachadair/atomicfile v0.2.6 - github.com/creachadair/taskgroup v0.3.2 + github.com/bufbuild/buf v1.47.2 + github.com/creachadair/atomicfile v0.3.6 + github.com/creachadair/taskgroup v0.13.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.50.0 ) require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2 // indirect - buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.2-20240723163933-aa5836eeaf8d.1 // indirect - buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.2-20240723163933-aa5836eeaf8d.2 // indirect - connectrpc.com/connect v1.16.2 // indirect + buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1 // indirect + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 // indirect + buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 // indirect + buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241025140216-aa40f2c93090.1 // indirect + buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1 // indirect + buf.build/go/bufplugin v0.6.0 // indirect + buf.build/go/protoyaml v0.2.0 // indirect + buf.build/go/spdx v0.2.0 // indirect + cel.dev/expr v0.18.0 // indirect + connectrpc.com/connect v1.17.0 // indirect connectrpc.com/otelconnect v0.7.1 // indirect - dario.cat/mergo v1.0.0 // 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/Abirdcfly/dupword v0.1.3 // indirect + github.com/Antonboom/testifylint v1.5.2 // indirect + github.com/Crocmagnon/fatcontext v0.5.3 // indirect + github.com/DataDog/zstd v1.4.5 // indirect github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Microsoft/hcsshim v0.12.9 // 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/alecthomas/go-check-sumtype v0.2.0 // indirect + github.com/alexkohler/nakedret/v2 v2.0.5 // 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 - github.com/bufbuild/protocompile v0.14.0 // indirect - 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/bufbuild/protocompile v0.14.1 // indirect + github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a // indirect + github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576 // 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/ckaznocha/intrange v0.2.1 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v1.1.2 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft v0.37.11 // indirect + github.com/containerd/cgroups/v3 v3.0.3 // indirect + github.com/containerd/containerd v1.7.23 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect + github.com/containerd/ttrpc v1.2.6 // indirect + github.com/containerd/typeurl/v2 v2.2.3 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/dashpay/dashd-go/btcutil v1.2.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/dgraph-io/badger/v4 v4.3.1 // indirect github.com/didip/tollbooth/v6 v6.0.1 // indirect github.com/didip/tollbooth_chi v0.0.0-20200524181329-8b84cd7183d9 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/cli v27.1.1+incompatible // indirect + github.com/docker/cli v27.3.1+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v27.1.1+incompatible // indirect + github.com/docker/docker v27.3.1+incompatible // indirect github.com/docker/docker-credential-helpers v0.8.2 // indirect - github.com/felixge/fgprof v0.9.4 // indirect + github.com/felixge/fgprof v0.9.5 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/ghostiam/protogetter v0.3.6 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/ghostiam/protogetter v0.3.8 // 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.1.0 // indirect - github.com/gofrs/uuid/v5 v5.2.0 // indirect - github.com/golang/glog v1.2.1 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golangci/go-printf-func-name v0.1.0 // 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-20240827171923-fa2c70bbbfe5 // indirect + github.com/google/cel-go v0.22.0 // indirect + github.com/google/flatbuffers v24.3.25+incompatible // indirect + github.com/google/go-containerregistry v0.20.2 // indirect + github.com/google/pprof v0.0.0-20241101162523-b92577c0c142 // 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 @@ -123,46 +146,73 @@ require ( 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/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/lasiar/canonicalheader v1.1.2 // indirect + github.com/linxGnu/grocksdb v1.9.3 // 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/locker v1.0.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/mount v0.3.4 // indirect + github.com/moby/sys/mountinfo v0.7.2 // indirect + github.com/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/user v0.3.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/nunnatsa/ginkgolinter v0.16.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/nunnatsa/ginkgolinter v0.18.3 // indirect + github.com/onsi/ginkgo/v2 v2.21.0 // indirect + github.com/opencontainers/runtime-spec v1.2.0 // 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/quic-go/qpack v0.5.1 // indirect + github.com/quic-go/quic-go v0.48.2 // indirect + github.com/raeperd/recvcheck v0.1.2 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.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.27.0 // indirect + github.com/segmentio/asm v1.2.0 // indirect + github.com/segmentio/encoding v0.4.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect github.com/stoewer/go-strcase v1.3.0 // 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/tetratelabs/wazero v1.8.1 // indirect + github.com/timonwong/loggercheck v0.10.1 // indirect + github.com/uudashr/iface v1.2.1 // indirect + github.com/vbatts/tar-split v0.11.6 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect github.com/ykadowak/zerologlint v0.1.5 // indirect - go-simpler.org/musttag v0.12.2 // indirect + go-simpler.org/musttag v0.13.0 // 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.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // 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 + go.lsp.dev/jsonrpc2 v0.10.0 // indirect + go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 // indirect + go.lsp.dev/protocol v0.12.0 // indirect + go.lsp.dev/uri v0.3.0 // indirect + go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect + go.uber.org/mock v0.5.0 // indirect + go.uber.org/zap/exp v0.3.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + pluginrpc.com/pluginrpc v0.5.0 // indirect ) require ( 4d63.com/gochecknoglobals v0.2.1 // indirect - github.com/Antonboom/errname v0.1.13 // indirect - github.com/Antonboom/nilnil v0.1.9 // indirect + github.com/Antonboom/errname v1.0.0 // indirect + github.com/Antonboom/nilnil v1.0.0 // 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/Microsoft/go-winio v0.6.2 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect @@ -171,33 +221,30 @@ require ( github.com/ashanbrown/forbidigo v1.6.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bkielbasa/cyclop v1.2.1 // indirect + github.com/bkielbasa/cyclop v1.2.3 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/breml/bidichk v0.2.7 // indirect - github.com/breml/errchkjson v0.3.6 // indirect + github.com/breml/bidichk v0.3.2 // indirect + github.com/breml/errchkjson v0.4.0 // 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.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/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/daixiang0/gci v0.13.5 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // 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/dgraph-io/ristretto v1.0.0 // 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/dustin/go-humanize v1.0.1 // indirect github.com/ettle/strcase v0.2.0 // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.5 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/go-critic/go-critic v0.11.4 // indirect + github.com/go-critic/go-critic v0.11.5 // 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.2.0 // indirect @@ -226,11 +273,10 @@ require ( github.com/inconshreveable/mousetrap v1.1.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.7.0 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/kisielk/errcheck v1.8.0 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.10 // indirect @@ -238,15 +284,13 @@ require ( github.com/ldez/gomoddirectives v0.2.4 // indirect github.com/ldez/tagliatelle v0.5.0 // 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.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/mgechev/revive v1.3.9 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/mgechev/revive v1.5.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moricho/tparallel v0.3.2 // indirect @@ -256,15 +300,15 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/opencontainers/runc v1.1.3 // indirect + github.com/opencontainers/runc v1.1.14 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect 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.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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/polyfloyd/go-errorlint v1.7.0 // indirect + github.com/prometheus/client_model v0.6.1 + github.com/prometheus/common v0.61.0 + github.com/prometheus/procfs v0.15.1 // 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 @@ -273,23 +317,22 @@ require ( 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.21.2 // indirect + github.com/securego/gosec/v2 v2.21.4 // 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/tenv v1.10.0 // indirect - github.com/sonatard/noctx v0.0.2 // indirect + github.com/sivchari/tenv v1.12.1 // indirect + github.com/sonatard/noctx v0.1.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // 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/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.17 // indirect + github.com/tetafro/godot v1.4.18 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect @@ -300,17 +343,16 @@ require ( github.com/yagipy/maintidx v1.0.0 // 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.etcd.io/bbolt v1.3.11 // 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-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.24.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 + golang.org/x/text v0.21.0 // indirect + golang.org/x/tools v0.27.0 // indirect + google.golang.org/protobuf v1.35.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 @@ -320,13 +362,14 @@ require ( ) require ( + github.com/cometbft/cometbft-db v1.0.1 github.com/creachadair/tomledit v0.0.23 github.com/jonboulle/clockwork v0.3.0 - github.com/oasisprotocol/oasis-core/go v0.2202.5 + github.com/oasisprotocol/oasis-core/go v0.2403.1 github.com/sasha-s/go-deadlock v0.3.5 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-20240904232852-e7e105dedf7e - golang.org/x/time v0.6.0 + golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f + golang.org/x/time v0.8.0 ) diff --git a/go.sum b/go.sum index 0c13d91704..9bd189c2c2 100644 --- a/go.sum +++ b/go.sum @@ -2,72 +2,52 @@ 4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= 4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= 4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2 h1:SZRVx928rbYZ6hEKUIN+vtGDkl7uotABRWGY4OAg5gM= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2/go.mod h1:ylS4c28ACSI59oJrOdW4pHS4n0Hw4TgSPHn8rpHl4Yw= -buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.2-20240723163933-aa5836eeaf8d.1 h1:KVuCjYvvLCRFauVmXSGYQPdcSzzOMMsYrr01DYpI/+4= -buf.build/gen/go/bufbuild/registry/connectrpc/go v1.16.2-20240723163933-aa5836eeaf8d.1/go.mod h1:lAy2iG76hqz5AtMLglcGk+Ar9eHZ1HWqvssdp3DBhsk= -buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.2-20240723163933-aa5836eeaf8d.2 h1:6gCcD/yXj6DAJKE0D+UEB1bRITZ36K4WnstdviCCss0= -buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.34.2-20240723163933-aa5836eeaf8d.2/go.mod h1:psseUmlKRo9v5LZJtR/aTpdTLuyp9o3X7rnLT87SZEo= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1 h1:APVDdZ4VfUvERVIj//yDjCWV7WezEOiK7+b6gvJ+iAk= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1/go.mod h1:rYPnjsUZ2lGpoQ/T322HWZQil9/MIZF2njP+/u/0GKg= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 h1:9wP6ZZYWnF2Z0TxmII7m3XNykxnP4/w8oXeth6ekcRI= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1/go.mod h1:Duw/9JoXkXIydyASnLYIiufkzySThoqavOsF+IihqvM= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 h1:FHQXg3T7S2jp8yc7/bQJgqEH1yza/rrDHXITUK2Tm0g= +buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1/go.mod h1:5iwF5l+9lKCnvr1zLvDgUHrv6X+vU5nNPjvig1sbnao= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241025140216-aa40f2c93090.1 h1:PyqnJojY+BXNuJHp5aEfN9wPiP1dzrobXVmgLrUMe+A= +buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241025140216-aa40f2c93090.1/go.mod h1:x5Mti5bhMO87zJxCkcEbr7Lz+bHiFsqpxnpqSB1okG0= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1 h1:rPi3qs3qpDIXIl5QW2IPOaYZhppRkvuVKwEZrfhpy78= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1/go.mod h1:4IVMTaeh4JIjBYcGFLlTorfWpKVEXDjDfHAgKTeR0Ds= +buf.build/go/bufplugin v0.6.0 h1:3lhoh+0z+IUPS3ZajTPn/27LaLIkero2BDVnV7yXD1s= +buf.build/go/bufplugin v0.6.0/go.mod h1:hWCjxxv24xdR6F5pNlQavZV2oo0J3uF4Ff1XEoyV6vU= +buf.build/go/protoyaml v0.2.0 h1:2g3OHjtLDqXBREIOjpZGHmQ+U/4mkN1YiQjxNB68Ip8= +buf.build/go/protoyaml v0.2.0/go.mod h1:L/9QvTDkTWcDTzAL6HMfN+mYC6CmZRm2KnsUA054iL0= +buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= +buf.build/go/spdx v0.2.0/go.mod h1:bXdwQFem9Si3nsbNy8aJKGPoaPi5DKwdeEp5/ArZ6w8= +cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= +cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -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.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= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -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/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= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -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= -connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= -connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= +connectrpc.com/connect v1.17.0 h1:W0ZqMhtVzn9Zhn2yATuUokDLO5N+gIuBWMOnsQrfmZk= +connectrpc.com/connect v1.17.0/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8= connectrpc.com/otelconnect v0.7.1 h1:scO5pOb0i4yUE66CnNrHeK1x51yq0bE0ehPg6WvzXJY= connectrpc.com/otelconnect v0.7.1/go.mod h1:dh3bFgHBTb2bkqGCeVVOtHJreSns7uu9wwL2Tbz17ms= 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.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/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE= +github.com/Abirdcfly/dupword v0.1.3/go.mod h1:8VbB2t7e10KRNdwTVoxdBaxla6avbhGzb8sCTygUMhw= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Antonboom/errname v1.0.0 h1:oJOOWR07vS1kRusl6YRSlat7HFnb3mSfMl6sDMRoTBA= +github.com/Antonboom/errname v1.0.0/go.mod h1:gMOBFzK/vrTiXN9Oh+HFs+e6Ndl0eTFbtsRTSRdXyGI= +github.com/Antonboom/nilnil v1.0.0 h1:n+v+B12dsE5tbAqRODXmEKfZv9j2KcTBrp+LkoM4HZk= +github.com/Antonboom/nilnil v1.0.0/go.mod h1:fDJ1FSFoLN6yoG65ANb1WihItf6qt9PJVTn/s2IrcII= +github.com/Antonboom/testifylint v1.5.2 h1:4s3Xhuv5AvdIgbd8wOOEeo0uZG7PbDKQyKY5lGoQazk= +github.com/Antonboom/testifylint v1.5.2/go.mod h1:vxy8VJ0bc6NavlYqjZfmp6EfqXMtBgQ4+mhCojwC1P8= 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.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/Crocmagnon/fatcontext v0.5.3 h1:zCh/wjc9oyeF+Gmp+V60wetm8ph2tlsxocgg/J0hOps= +github.com/Crocmagnon/fatcontext v0.5.3/go.mod h1:XoCQYY1J+XTfyv74qLXvNw4xFunr3L1wkopIIKG7wGM= 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= 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= @@ -78,10 +58,10 @@ github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+ 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/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6lLg= +github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEPuoIWYVvZ8Y= 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.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= @@ -91,48 +71,39 @@ 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.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= -github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= +github.com/alecthomas/go-check-sumtype v0.2.0 h1:Bo+e4DFf3rs7ME9w/0SU/g6nmzJaphduP8Cjiz0gbwY= +github.com/alecthomas/go-check-sumtype v0.2.0/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= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -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.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= -github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= +github.com/alexkohler/nakedret/v2 v2.0.5 h1:fP5qLgtwbx9EJE8dGEERT02YwS8En4r9nnZ71RK+EVU= +github.com/alexkohler/nakedret/v2 v2.0.5/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= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= -github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= +github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= +github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= 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= -github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= +github.com/breml/bidichk v0.3.2 h1:xV4flJ9V5xWTqxL+/PMFF6dtJPvZLPsyixAoPe8BGJs= +github.com/breml/bidichk v0.3.2/go.mod h1:VzFLBxuYtT23z5+iVkamXO386OB+/sVwZOpIj6zXGos= +github.com/breml/errchkjson v0.4.0 h1:gftf6uWZMtIa/Is3XJgibewBm2ksAQSY/kABDNFTAdk= +github.com/breml/errchkjson v0.4.0/go.mod h1:AuBOSTHyLSaaAFlWsRSuRBIroCh3eh7ZHh5YeelDIk8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= +github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -145,16 +116,14 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/bufbuild/buf v1.35.1 h1:aiCi/YFOg7eXKZeveWb2ZhnmLFwUMM/FnDCM0roFp+M= -github.com/bufbuild/buf v1.35.1/go.mod h1:SM7b5QW3FkQPNkkqIa/9UWzLOoe51la+GGZpEgH9b68= -github.com/bufbuild/protocompile v0.14.0 h1:z3DW4IvXE5G/uTOnSQn+qwQQxvhckkTWLS/0No/o7KU= -github.com/bufbuild/protocompile v0.14.0/go.mod h1:N6J1NYzkspJo3ZwyL4Xjvli86XOj1xq4qAasUFxGups= -github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee h1:E6ET8YUcYJ1lAe6ctR3as7yqzW2BNItDFnaB5zQq/8M= -github.com/bufbuild/protoplugin v0.0.0-20240323223605-e2735f6c31ee/go.mod h1:HjGFxsck9RObrTJp2hXQZfWhPgZqnR6sR1U5fCA/Kus= -github.com/bufbuild/protovalidate-go v0.6.3 h1:wxQyzW035zM16Binbaz/nWAzS12dRIXhZdSUWRY7Fv0= -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/bufbuild/buf v1.47.2 h1:fA5e2yVQGabxAz7W5aNbO7Fku1P6TpoHhjs1wER1pOc= +github.com/bufbuild/buf v1.47.2/go.mod h1:1Xd0QG0a1uCGk7cODUenpQ8E5l7bj2Ry9tnUfERm1YI= +github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= +github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= +github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a h1:l3RhVoG0RtC61h6TVWnkniGj4TgBebuyPQRdleFAmTg= +github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= +github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576 h1:A4TfjZJqApnAvGKDgxHqA1rG6BK1OswyNcTcnSrDbJc= +github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576/go.mod h1:R/UFeIPyFAh0eH7Ic/JJbO2ABdkxFuZZKDbzsI5UiwM= 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= @@ -165,21 +134,15 @@ github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I 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= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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.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= github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chigopher/pathlib v0.19.1 h1:RoLlUJc0CqBGwq239cilyhxPNLXTK+HXoASGyGznx5A= github.com/chigopher/pathlib v0.19.1/go.mod h1:tzC1dZLW8o33UQpWkNkhvPwL5n4yyFRFm/jL1YGWFvY= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= @@ -191,43 +154,65 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= 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/ckaznocha/intrange v0.2.1 h1:M07spnNEQoALOJhwrImSrJLaxwuiQK+hA2DeajBlwYk= +github.com/ckaznocha/intrange v0.2.1/go.mod h1:7NEhVyf8fzZO5Ds7CRaqPEm52Ut83hsTiL5zbER/HYk= 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-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= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/cometbft/cometbft v0.37.11 h1:gFr13UXt0MVzgfW11FKsDDy3T9nz/VWqEnFbHf08H2U= +github.com/cometbft/cometbft v0.37.11/go.mod h1:PR1WWNZC6BMPD5rnHVxKsaLk5ZSwcduQd73ON3PAVjc= +github.com/cometbft/cometbft-db v1.0.1 h1:SylKuLseMLQKw3+i8y8KozZyJcQSL98qEe2CGMCGTYE= +github.com/cometbft/cometbft-db v1.0.1/go.mod h1:EBrFs1GDRiTqrWXYi4v90Awf/gcdD5ExzdPbg4X8+mk= +github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= +github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= +github.com/containerd/containerd v1.7.23 h1:H2CClyUkmpKAGlhQp95g2WXHfLYc7whAuvZGBNYOOwQ= +github.com/containerd/containerd v1.7.23/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw= +github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII= +github.com/containerd/continuity v0.4.4/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/containerd/ttrpc v1.2.6 h1:zG+Kn5EZ6MUYCS1t2Hmt2J4tMVaLSFEJVOraDQwNPC4= +github.com/containerd/ttrpc v1.2.6/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= +github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40= +github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/atomicfile v0.2.6 h1:FgYxYvGcqREApTY8Nxg8msM6P/KVKK3ob5h9FaRUTNg= -github.com/creachadair/atomicfile v0.2.6/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= -github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= -github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creachadair/atomicfile v0.3.6 h1:BcXSDRq7waImZhKflqnTJjf+02CLi0W2Exlb2lyZ2yE= +github.com/creachadair/atomicfile v0.3.6/go.mod h1:iaBMVDkRBQTIGzbYGCTS+gXeZPidWAeVbthIxSbEphE= +github.com/creachadair/mds v0.21.4 h1:osKuLbjkV7YswBnhuTJh1lCDkqZMQnNfFVn0j8wLpz8= +github.com/creachadair/mds v0.21.4/go.mod h1:1ltMWZd9yXhaHEoZwBialMaviWVUpRPvMwVP7saFAzM= +github.com/creachadair/taskgroup v0.13.2 h1:3KyqakBuFsm3KkXi/9XIb0QcA8tEzLHLgaoidf0MdVc= +github.com/creachadair/taskgroup v0.13.2/go.mod h1:i3V1Zx7H8RjwljUEeUWYT30Lmb9poewSb2XI1yTwD0g= github.com/creachadair/tomledit v0.0.23 h1:ohYJjMsxwzj4dDzKaBWFbWH5J+3LO/8CYnlVY+baBWA= github.com/creachadair/tomledit v0.0.23/go.mod h1:cIu/4x5L855oSRejIqr+WRFh+mv9g4fWLiUFaApYn/Y= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= 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.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= @@ -240,87 +225,78 @@ github.com/dashpay/dashd-go/btcutil v1.2.0 h1:YMq7L0V0au5bbphIhpsBBc+nfOZqU+gJ4p github.com/dashpay/dashd-go/btcutil v1.2.0/go.mod h1:7UHoqUh3LY3OI4mEcogx0CnL3rtzDQyoqvsOCZZtvzE= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= 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= -github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= -github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgraph-io/badger/v4 v4.3.1 h1:7r5wKqmoRpGgSxqa0S/nGdpOpvvzuREGPLSua73C8tw= +github.com/dgraph-io/badger/v4 v4.3.1/go.mod h1:oObz97DImXpd6O/Dt8BqdKLLTDmEmarAimo72VV5whQ= +github.com/dgraph-io/ristretto v1.0.0 h1:SYG07bONKMlFDUYu5pEu3DGAh8c2OFNzKm6G9J4Si84= +github.com/dgraph-io/ristretto v1.0.0/go.mod h1:jTi2FiYEhQ1NsMmA7DeBykizjOuY88NhKBkepyu1jPc= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/didip/tollbooth/v6 v6.0.1 h1:QvLvRpB1G2bzKvkRze0muMUBlGN9H1z7tJ4DH4ypWOU= github.com/didip/tollbooth/v6 v6.0.1/go.mod h1:j2pKs+JQ5PvU/K4jFnrnwntrmfUbYLJE5oSdxR37FD0= github.com/didip/tollbooth_chi v0.0.0-20200524181329-8b84cd7183d9 h1:gTh8fKuI/yLqQtZEPlDX3ZGsiTPZIe0ADHsxXSbwO1I= github.com/didip/tollbooth_chi v0.0.0-20200524181329-8b84cd7183d9/go.mod h1:YWyIfq3y4ArRfWZ9XksmuusP+7Mad+T0iFZ0kv0XG/M= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2oNn0GkeZE= -github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.3.1+incompatible h1:qEGdFBF3Xu6SCvCYhc7CzaQTlBmqDuzxPDpigSyeKQQ= +github.com/docker/cli v27.3.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= -github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= +github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= 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.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/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= +github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= 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.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= 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= -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/fgprof v0.9.5 h1:8+vR6yu2vvSKn08urWyEuxx75NWPEvybbkBirEpsbVY= +github.com/felixge/fgprof v0.9.5/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.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= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= 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.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= -github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghostiam/protogetter v0.3.8 h1:LYcXbYvybUyTIxN2Mj9h6rHrDZBDwZloPoKctWrFyJY= +github.com/ghostiam/protogetter v0.3.8/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA= 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= @@ -328,21 +304,14 @@ 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.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= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-critic/go-critic v0.11.5 h1:TkDTOn5v7EEngMxu8KbuFqFR43USaaH8XRJLz1jhVYA= +github.com/go-critic/go-critic v0.11.5/go.mod h1:wu6U7ny9PiaHaZHcvMDmdysMqvDem162Rh3zWTrqk8M= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -359,7 +328,6 @@ github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZs 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-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= @@ -381,8 +349,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.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/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= @@ -391,12 +359,8 @@ github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u1 github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= 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.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= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= @@ -404,25 +368,14 @@ 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.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= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -431,20 +384,19 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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/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-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUPPyAKJuzv8pEJU= +github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s= 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/golangci-lint v1.62.2 h1:b8K5K9PN+rZN1+mKLtsZHz2XXS9aYKzQ9i25x3Qnxxw= +github.com/golangci/golangci-lint v1.62.2/go.mod h1:ILWWyeFUrctpHVGMa1dg2xZPKoMUTc5OIMgW7HZr34g= 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= @@ -455,62 +407,47 @@ github.com/golangci/revgrep v0.5.3 h1:3tL7c1XBMtWHHqVpS5ChmiAAoe4PF/d5+ULzV9sLAz 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= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= -github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= +github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= +github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= +github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.20.1 h1:eTgx9QNYugV4DN5mz4U8hiAGTi1ybXn0TPi4Smd8du0= -github.com/google/go-containerregistry v0.20.1/go.mod h1:YCMFNQeeXeLF+dnhhWkqDItx/JSkH01j1Kis4PsjzFI= +github.com/google/go-containerregistry v0.20.2 h1:B1wPJ1SN/S7pB+ZAimcciVD+r+yV/l/DSArMxlbwseo= +github.com/google/go-containerregistry v0.20.2/go.mod h1:z38EKdKh4h7IP2gSfUUqEvalZBqs6AoLeWfUy34nQC8= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= 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/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= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -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-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-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/pprof v0.0.0-20241101162523-b92577c0c142 h1:sAGdeJj0bnMgUNVeUpp6AYlVdCt3/GdI3pGRqsNSQLs= +github.com/google/pprof v0.0.0-20241101162523-b92577c0c142/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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/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/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= @@ -529,7 +466,6 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaW github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -540,8 +476,6 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/go-version v1.2.1/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= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= @@ -551,10 +485,8 @@ github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= 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-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= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= @@ -562,14 +494,13 @@ github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569z github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= 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/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= +github.com/jhump/protoreflect/v2 v2.0.0-beta.2 h1:qZU+rEZUOYTz1Bnhi3xbwn+VxdXkLVeEpAeZzVXLY88= +github.com/jhump/protoreflect/v2 v2.0.0-beta.2/go.mod h1:4tnOYkB/mq7QTyS3YKtVtNrJv4Psqout8HA1U+hZtgM= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= 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= @@ -577,50 +508,38 @@ github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+ github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg= github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -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.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= -github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= +github.com/kisielk/errcheck v1.8.0 h1:ZX/URYa7ilESY19ik/vBmCn6zdGQLxACwjAcWbHlYlg= +github.com/kisielk/errcheck v1.8.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.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= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= 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/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= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 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.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs= github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= -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/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= +github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= 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= @@ -632,11 +551,10 @@ 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/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= +github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= 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= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -656,64 +574,66 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ 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= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -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/mgechev/revive v1.3.9 h1:18Y3R4a2USSBF+QZKFQwVkBROUda7uoBlkEuBD+YD1A= -github.com/mgechev/revive v1.3.9/go.mod h1:+uxEIr5UH0TjXWHTno3xh4u7eg6jDpXKzQccA9UGhHU= +github.com/mgechev/revive v1.5.1 h1:hE+QPeq0/wIzJwOphdVyUJ82njdd8Khp4fUIHGZHW3M= +github.com/mgechev/revive v1.5.1/go.mod h1:lC9AhkJIBs5zwx8wkudyHrU+IJkrEKmpCmGMnIJPk4o= 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= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/mount v0.3.4 h1:yn5jq4STPztkkzSKpZkLcmjue+bZJ0u2AuQY1iNI1Ww= +github.com/moby/sys/mount v0.3.4/go.mod h1:KcQJMbQdJHPlq5lcYT+/CjatWM4PuxKe+XLSVS4J6Os= +github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg= +github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= +github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= +github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -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.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= github.com/mroth/weightedrand v0.4.1/go.mod h1:3p2SIcC8al1YMzGhAIoXD+r9olo/g/cdJgAD905gyNE= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 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.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.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= -github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= +github.com/nunnatsa/ginkgolinter v0.18.3 h1:WgS7X3zzmni3vwHSBhvSgqrRgUecN6PQUcfB0j1noDw= +github.com/nunnatsa/ginkgolinter v0.18.3/go.mod h1:BE1xyB/PNtXXG1azrvrqJW5eFH0hSRylNzFy8QHPwzs= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= 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= -github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae h1:FatpGJD2jmJfhZiFDElaC0QhZUDQnxUeAwTGkfAHN3I= -github.com/oasisprotocol/curve25519-voi v0.0.0-20220708102147-0a8a51822cae/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= -github.com/oasisprotocol/oasis-core/go v0.2202.5 h1:SwT3XIKz4W5gYZd9I2fe+4qGPYaVvqG0kF8jsancd4E= -github.com/oasisprotocol/oasis-core/go v0.2202.5/go.mod h1:hKUgtuPPq371HokUQL5ashT5MZLZxK/VkWNKRLb9m+w= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/oasis-core/go v0.2403.1 h1:WS9upKZ5S53lMc9eRcLdNOC4X0IKILFf/6GwlOvdpS0= +github.com/oasisprotocol/oasis-core/go v0.2403.1/go.mod h1:H0wKb3CmUGVSioHjLCtzphc6MKODWcZs+YYAegoUT4g= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= 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.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= -github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= 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= @@ -723,10 +643,12 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 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= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opencontainers/runc v1.1.14 h1:rgSuzbmgz5DUJjeSnw337TxDbRuqjs6iqQck/2weR6w= +github.com/opencontainers/runc v1.1.14/go.mod h1:E4C2z+7BxR7GHXp0hAY53mek+x49X1LjPNeMTfRGvOA= +github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= +github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= +github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= @@ -740,51 +662,36 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ 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.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/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/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.6.0 h1:tftWV9DE7txiFzPpztTAwyoRLKNj9gpVm2cg8/OwcYY= -github.com/polyfloyd/go-errorlint v1.6.0/go.mod h1:HR7u8wuP1kb1NeN1zqTd1ZMlqUKPPHF+Id4vIPvDqVw= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v1.7.0 h1:Zp6lzCK4hpBDj8y8a237YK4EPrMXQWvOe3nGoH4pFrU= +github.com/polyfloyd/go-errorlint v1.7.0/go.mod h1:dGWKu85mGHnegQ2SWpEybFityCg3j7ZbwsVUxAOk9gY= 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= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a h1:CmF68hwI0XsOQ5UwlBopMi2Ow4Pbg32akc4KIVCOm+Y= -github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -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/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= 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= @@ -795,25 +702,33 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= +github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= +github.com/quic-go/quic-go v0.48.2 h1:wsKXZPeGWpMpCGSWqOcqpW2wZYic/8T3aqiOID0/KWE= +github.com/quic-go/quic-go v0.48.2/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs= +github.com/raeperd/recvcheck v0.1.2 h1:SjdquRsRXJc26eSonWIo8b7IMtKD3OAT2Lb5G3ZX1+4= +github.com/raeperd/recvcheck v0.1.2/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= 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.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/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -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.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/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= 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= @@ -824,51 +739,41 @@ github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tM github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= 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.21.2 h1:deZp5zmYf3TWwU7A7cR2+SolbTpZ3HQiwFqnzQyEl3M= -github.com/securego/gosec/v2 v2.21.2/go.mod h1:au33kg78rNseF5PwPnTWhuYBFf534bvJRvOrgZ/bFzU= +github.com/securego/gosec/v2 v2.21.4 h1:Le8MSj0PDmOnHJgUATjD96PaXRvCpKC+DGJvwyy0Mlk= +github.com/securego/gosec/v2 v2.21.4/go.mod h1:Jtb/MwRQfRxCXyCm1rfM1BEiiiTfUOdyzzAhlr6lUTA= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/segmentio/encoding v0.4.0 h1:MEBYvRqiUB2nfR2criEXWqwdY6HJOUrCn5hboVOVmy8= +github.com/segmentio/encoding v0.4.0/go.mod h1:/d03Cd8PoaDeceuhUUUQWjU0KhWjrmYrWPgtJHYZSnI= 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= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 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/tenv v1.10.0 h1:g/hzMA+dBCKqGXgW8AV/1xIWhAvDrx0zFKNR48NFMg0= -github.com/sivchari/tenv v1.10.0/go.mod h1:tdY24masnVoZFxYrHv/nD6Tc8FbkEtAQEEziXpyMgqY= +github.com/sivchari/tenv v1.12.1 h1:+E0QzjktdnExv/wwsnnyk4oqZBUfuh89YMQT1cyuvSY= +github.com/sivchari/tenv v1.12.1/go.mod h1:1LjSOUCc25snIr5n3DtGGrENhX3LuWefcplwVGC24mw= 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= -github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= +github.com/sonatard/noctx v0.1.0 h1:JjqOc2WN16ISWAjAk8M5ej0RfExEXtkEyExl2hLW+OM= +github.com/sonatard/noctx v0.1.0/go.mod h1:0RvBxqY8D4j9cTTTWE8ylt2vqj2EPI8fHmrxHdsaZ2c= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -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.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= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= @@ -890,54 +795,46 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= 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/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= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tendermint v0.34.21 h1:UiGGnBFHVrZhoQVQ7EfwSOLuCtarqCSsRf8VrklqB7s= -github.com/tendermint/tendermint v0.34.21/go.mod h1:XDvfg6U7grcFTDx7VkzxnhazQ/bspGJAn4DZ6DcLLjQ= -github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kGM= -github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= 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.17 h1:pGzu+Ye7ZUEFx7LHU0dAKmCOXWsPjl7qA6iMGndsjPs= -github.com/tetafro/godot v1.4.17/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetafro/godot v1.4.18 h1:ouX3XGiziKDypbpXqShBfnNLTSjR8r3/HVzrtJ+bHlI= +github.com/tetafro/godot v1.4.18/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetratelabs/wazero v1.8.1 h1:NrcgVbWfkWvVc4UtT4LRLDf91PsOzDzefMdwhLfA550= +github.com/tetratelabs/wazero v1.8.1/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs= 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/timonwong/loggercheck v0.10.1 h1:uVZYClxQFpw55eh+PIoqM7uAOHMrhVcDoWDery9R8Lg= +github.com/timonwong/loggercheck v0.10.1/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= 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= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -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.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.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= -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/uudashr/iface v1.2.1 h1:vHHyzAUmWZ64Olq6NZT3vg/z1Ws56kyPdBOd5kTXDF8= +github.com/uudashr/iface v1.2.1/go.mod h1:4QvspiRd3JLPAEXBQ9AiZpLbJlrWWgRChOKDJEuQTdg= +github.com/vbatts/tar-split v0.11.6 h1:4SjTW5+PU11n6fZenf2IPoV8/tz3AaYHMWjf23envGs= +github.com/vbatts/tar-split v0.11.6/go.mod h1:dqKNtesIOr2j2Qv3W/cHjnvk9I8+G7oAkFDFN6TCBEI= +github.com/vektra/mockery/v2 v2.50.0 h1:0GYRH38nKiRghwUq+0aJXG1sT3yyTYj/J1xQRM8kGzQ= +github.com/vektra/mockery/v2 v2.50.0/go.mod h1:xO2DeYemEPC2tCzIZ+a1tifZ/7Laf/Chxg3vlc+oDsI= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= @@ -948,7 +845,6 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= -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.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= @@ -966,101 +862,76 @@ 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/musttag v0.13.0 h1:Q/YAW0AHvaoaIbsPj3bvEI5/QFP7w696IMUpnKXQfCE= +go-simpler.org/musttag v0.13.0/go.mod h1:FTzIGeK6OkKlUDVpj0iQUXZLUO1Js9+mvykDQy9C5yM= 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= -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.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.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.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.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= +go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= +go.lsp.dev/jsonrpc2 v0.10.0 h1:Pr/YcXJoEOTMc/b6OTmcR1DPJ3mSWl/SWiU1Cct6VmI= +go.lsp.dev/jsonrpc2 v0.10.0/go.mod h1:fmEzIdXPi/rf6d4uFcayi8HpFP1nBF99ERP1htC72Ac= +go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 h1:hCzQgh6UcwbKgNSRurYWSqh8MufqRRPODRBblutn4TE= +go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2/go.mod h1:gtSHRuYfbCT0qnbLnovpie/WEmqyJ7T4n6VXiFMBtcw= +go.lsp.dev/protocol v0.12.0 h1:tNprUI9klQW5FAFVM4Sa+AbPFuVQByWhP1ttNUAjIWg= +go.lsp.dev/protocol v0.12.0/go.mod h1:Qb11/HgZQ72qQbeyPfJbu3hZBH23s1sr4st8czGeDMQ= +go.lsp.dev/uri v0.3.0 h1:KcZJmh6nFIBeJzTugn5JTU6OOyG0lDOo3R9KwTxTYbo= +go.lsp.dev/uri v0.3.0/go.mod h1:P5sbO1IQR+qySTWOCnhnK7phBx+W3zbLqSMDJNTw88I= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 h1:DheMAlT6POBP+gh8RUH19EOTnQIor5QE0uSRPtzCpSw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0/go.mod h1:wZcGmeVO9nzP67aYSLDqXNWK87EZWhi7JWj1v7ZXf94= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= 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.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.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= 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/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= 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/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= +go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20210921155107-089bfa567519/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= +golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -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-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk= -golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak= 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-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/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f h1:WTyX8eCCyfdqiPYkRGm0MqElSfYFH3yR1+rl/mct9sA= +golang.org/x/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -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/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= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -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.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -1071,164 +942,91 @@ 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.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.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= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 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-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 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= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 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.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= 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-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= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -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-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-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-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= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -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-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= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= 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.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -1236,62 +1034,25 @@ 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= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -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/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -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/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.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= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -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-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= @@ -1306,89 +1067,31 @@ 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.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -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/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/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= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -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/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/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= 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= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= 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.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -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.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= -google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= 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= @@ -1397,20 +1100,12 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1418,9 +1113,7 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -1429,15 +1122,10 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -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.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= @@ -1446,6 +1134,5 @@ mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8 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= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +pluginrpc.com/pluginrpc v0.5.0 h1:tOQj2D35hOmvHyPu8e7ohW2/QvAnEtKscy2IJYWQ2yo= +pluginrpc.com/pluginrpc v0.5.0/go.mod h1:UNWZ941hcVAoOZUn8YZsMmOZBzbUjQa3XMns8RQLp9o= 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/blocksync/reactor_test.go b/internal/blocksync/reactor_test.go index 21aa67df43..ed55b51d3c 100644 --- a/internal/blocksync/reactor_test.go +++ b/internal/blocksync/reactor_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/fortytw2/leaktest" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" abci "github.com/dashpay/tenderdash/abci/types" diff --git a/internal/consensus/byzantine_test.go b/internal/consensus/byzantine_test.go index 79ec408e07..7f39833dea 100644 --- a/internal/consensus/byzantine_test.go +++ b/internal/consensus/byzantine_test.go @@ -9,9 +9,9 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" "github.com/dashpay/tenderdash/abci/example/kvstore" diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index a3de1f11cd..88159d5ddc 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -14,10 +14,10 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" "github.com/dashpay/tenderdash/abci/example/kvstore" diff --git a/internal/consensus/helper_test.go b/internal/consensus/helper_test.go index 7864364a45..cb8cff4d13 100644 --- a/internal/consensus/helper_test.go +++ b/internal/consensus/helper_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" "github.com/dashpay/tenderdash/abci/example/kvstore" diff --git a/internal/consensus/mempool_test.go b/internal/consensus/mempool_test.go index 1e71ec3bff..d643c4f6de 100644 --- a/internal/consensus/mempool_test.go +++ b/internal/consensus/mempool_test.go @@ -9,9 +9,9 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/abci/example/code" abci "github.com/dashpay/tenderdash/abci/types" 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..e4548d1c62 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.Run(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.Run(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.Run(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.Run(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.Run(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.Run(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/reactor_test.go b/internal/consensus/reactor_test.go index 269ff7a578..72088defe6 100644 --- a/internal/consensus/reactor_test.go +++ b/internal/consensus/reactor_test.go @@ -9,11 +9,11 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/fortytw2/leaktest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" "github.com/dashpay/tenderdash/abci/example/kvstore" diff --git a/internal/consensus/replay_file.go b/internal/consensus/replay_file.go index 210dbc7568..9d201ed776 100644 --- a/internal/consensus/replay_file.go +++ b/internal/consensus/replay_file.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/tenderdash/config" "github.com/dashpay/tenderdash/internal/eventbus" diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index 671329c9ed..4f12f9d8ca 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -12,12 +12,12 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/fortytw2/leaktest" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" "github.com/dashpay/tenderdash/abci/example/kvstore" diff --git a/internal/consensus/replayer_test.go b/internal/consensus/replayer_test.go index c9548a8628..14c952f41d 100644 --- a/internal/consensus/replayer_test.go +++ b/internal/consensus/replayer_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/dashd-go/btcjson" diff --git a/internal/consensus/state.go b/internal/consensus/state.go index ab7d6b086d..02180c3305 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -446,7 +446,7 @@ func (cs *State) OnStart(ctx context.Context) error { break LOOP case !IsDataCorruptionError(err): - cs.logger.Error("error on catchup replay; proceeding to start state anyway", "err", err) + cs.logger.Warn("error on catchup replay; proceeding to start state anyway", "err", err) break LOOP case repairAttempted: diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index 5604c0cd44..6aa41f283f 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -12,6 +12,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + abciclient "github.com/dashpay/tenderdash/abci/client" + clientmocks "github.com/dashpay/tenderdash/abci/client/mocks" "github.com/dashpay/tenderdash/abci/example/kvstore" abci "github.com/dashpay/tenderdash/abci/types" abcimocks "github.com/dashpay/tenderdash/abci/types/mocks" @@ -22,6 +24,7 @@ import ( "github.com/dashpay/tenderdash/internal/mempool" tmpubsub "github.com/dashpay/tenderdash/internal/pubsub" tmquery "github.com/dashpay/tenderdash/internal/pubsub/query" + sm "github.com/dashpay/tenderdash/internal/state" sf "github.com/dashpay/tenderdash/internal/state/test/factory" "github.com/dashpay/tenderdash/internal/test/factory" tmbytes "github.com/dashpay/tenderdash/libs/bytes" @@ -3272,6 +3275,84 @@ func TestStateTryAddCommitCallsProcessProposal(t *testing.T) { assert.NoError(t, err) } +// TestStateTryAddCommitPanicsOnClientError ensures that +// given ABCI client that errors on ProcessProposal, +// when new block is about to be processed, +// then the TryAddCommitEvent causes a panic. +func TestStateTryAddCommitPanicsOnClientError(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + config := configSetup(t) + + // setup some node and commit + genDoc, privVals := factory.RandGenesisDoc(1, factory.ConsensusParams()) + logger := consensusLogger(t) + + state, err := sm.MakeGenesisState(genDoc) + require.NoError(t, err) + + // Create a panicking app + app := clientmocks.NewClient(t) + app.On("ProcessProposal", mock.Anything, mock.Anything). + Return(&abci.ResponseProcessProposal{}, abciclient.ErrClientStopped). + Once() + + // create a new consensus state + proTxHash, err := privVals[0].GetProTxHash(ctx) + require.NoError(t, err) + ctx = dash.ContextWithProTxHash(ctx, proTxHash) + consensusState := newStateWithConfig(ctx, t, logger, config, state, privVals[0], app) + + stateData := consensusState.GetStateData() + + // create proposal and a block to be processed + block, err := sf.MakeBlock(state, 1, &types.Commit{}, kvstore.ProtocolVersion) + require.NoError(t, err) + require.NotZero(t, block.Version.App) + block.CoreChainLockedHeight = 1 + + commit, err := factory.MakeCommit( + ctx, + block.BlockID(nil), + block.Height, + 0, + stateData.Votes.Precommits(0), + state.Validators, + privVals, + ) + require.NoError(t, err) + + proposal := types.NewProposal( + block.Height, + block.CoreChainLockedHeight, + 0, + -1, + commit.BlockID, + block.Time) + + parts, err := block.MakePartSet(999999999) + require.NoError(t, err) + + // emulate that the node has received proposal and block + peerID := stateData.Validators.Proposer().NodeAddress.NodeID + stateData.Proposal = proposal + stateData.ProposalBlock = block + stateData.ProposalBlockParts = parts + stateData.updateRoundStep(commit.Round, cstypes.RoundStepPrevote) + + // invoke the TryAddCommitEvent to see if it will panic + ctx = msgInfoWithCtx(ctx, msgInfo{ + Msg: &CommitMessage{commit}, + PeerID: peerID, + ReceiveTime: time.Time{}, + }) + assert.PanicsWithError(t, + "ABCI client stopped, Tenderdash needs to be restarted: ProcessProposal abci method: client has stopped", + func() { + _ = consensusState.ctrl.Dispatch(ctx, &TryAddCommitEvent{Commit: commit, PeerID: peerID}, &stateData) + }) +} + // TestStateTimestamp_ProposalMatch tests that a validator prevotes a // proposed block if the timestamp in the block matches the timestamp in the // corresponding proposal message. diff --git a/internal/consensus/state_try_add_commit.go b/internal/consensus/state_try_add_commit.go index 4537d37a2d..ba1964aa6b 100644 --- a/internal/consensus/state_try_add_commit.go +++ b/internal/consensus/state_try_add_commit.go @@ -2,8 +2,10 @@ package consensus import ( "context" + "errors" "fmt" + abciclient "github.com/dashpay/tenderdash/abci/client" "github.com/dashpay/tenderdash/dash" cstypes "github.com/dashpay/tenderdash/internal/consensus/types" "github.com/dashpay/tenderdash/libs/log" @@ -108,6 +110,10 @@ func (cs *TryAddCommitAction) verifyCommit(ctx context.Context, stateData *State // We have a correct block, let's process it before applying the commit err = cs.blockExec.ensureProcess(ctx, &stateData.RoundState, commit.Round) if err != nil { + if errors.Is(err, abciclient.ErrClientStopped) { + // this is a non-recoverable error in current architecture + panic(fmt.Errorf("ABCI client stopped, Tenderdash needs to be restarted: %w", err)) + } return false, fmt.Errorf("unable to process proposal: %w", err) } err = cs.blockExec.validate(ctx, stateData) diff --git a/internal/consensus/versioned/selectproposer/height_proposer.go b/internal/consensus/versioned/selectproposer/height_proposer.go index 4b2d87a691..4ac873e396 100644 --- a/internal/consensus/versioned/selectproposer/height_proposer.go +++ b/internal/consensus/versioned/selectproposer/height_proposer.go @@ -90,7 +90,7 @@ func (s *heightProposerSelector) proposerFromStore(height int64) error { "validators_hash", meta.Header.ValidatorsHash, "quorum_hash", s.valSet.QuorumHash, "validators", s.valSet) - return fmt.Errorf("quorum hash mismatch at height %d", height) + return fmt.Errorf("validator set hash mismatch at height %d", height) } proposer = meta.Header.ProposerProTxHash diff --git a/internal/consensus/versioned/selectproposer/height_round_proposer.go b/internal/consensus/versioned/selectproposer/height_round_proposer.go index b8c2e0d1ac..57088f75a4 100644 --- a/internal/consensus/versioned/selectproposer/height_round_proposer.go +++ b/internal/consensus/versioned/selectproposer/height_round_proposer.go @@ -65,6 +65,8 @@ func NewHeightRoundProposerSelector(vset *types.ValidatorSet, currentHeight int6 // proposerFromStore determines the proposer for the given height and round using current or previous block read from // the block store. +// +// Requires s.valSet to be set to correct validator set. func (s *heightRoundProposerSelector) proposerFromStore(height int64, round int32) error { if s.bs == nil { return fmt.Errorf("block store is nil") @@ -85,15 +87,18 @@ func (s *heightRoundProposerSelector) proposerFromStore(height int64, round int3 meta := s.bs.LoadBlockMeta(height) if meta != nil { + valSetHash := s.valSet.Hash() // block already saved to store, just take the proposer - if !meta.Header.ValidatorsHash.Equal(s.valSet.Hash()) { + if !meta.Header.ValidatorsHash.Equal(valSetHash) { // we loaded the same block, so quorum should be the same s.logger.Error("quorum rotation detected but not expected", "height", height, - "validators_hash", meta.Header.ValidatorsHash, "quorum_hash", s.valSet.QuorumHash, + "validators_hash", meta.Header.ValidatorsHash, + "expected_validators_hash", valSetHash, + "next_validators_hash", meta.Header.NextValidatorsHash, "validators", s.valSet) - return fmt.Errorf("quorum hash mismatch at height %d", height) + return fmt.Errorf("validators hash mismatch at height %d", height) } proposer = meta.Header.ProposerProTxHash 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..bcee70886a --- /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 no 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 no 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/consensus/versioned/selectproposer/proposer_selector.go b/internal/consensus/versioned/selectproposer/proposer_selector.go index 9895dfd467..403a8e4c49 100644 --- a/internal/consensus/versioned/selectproposer/proposer_selector.go +++ b/internal/consensus/versioned/selectproposer/proposer_selector.go @@ -60,7 +60,6 @@ func NewProposerSelector(cp types.ConsensusParams, valSet *types.ValidatorSet, v case int32(tmtypes.VersionParams_CONSENSUS_VERSION_0): return NewHeightProposerSelector(valSet, valsetHeight, bs, logger) case int32(tmtypes.VersionParams_CONSENSUS_VERSION_1): - return NewHeightRoundProposerSelector(valSet, valsetHeight, valsetRound, bs, logger) default: return nil, fmt.Errorf("unknown consensus version: %v", cp.Version.ConsensusVersion) 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..cc27dc4d2a --- /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 no 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 no 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/evidence/pool.go b/internal/evidence/pool.go index 6c4db07a89..128fa85cbe 100644 --- a/internal/evidence/pool.go +++ b/internal/evidence/pool.go @@ -10,10 +10,10 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" gogotypes "github.com/gogo/protobuf/types" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/internal/eventbus" clist "github.com/dashpay/tenderdash/internal/libs/clist" diff --git a/internal/evidence/pool_test.go b/internal/evidence/pool_test.go index 036f1df60e..34b7aed6df 100644 --- a/internal/evidence/pool_test.go +++ b/internal/evidence/pool_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/crypto" "github.com/dashpay/tenderdash/internal/consensus/versioned/selectproposer" diff --git a/internal/evidence/reactor_test.go b/internal/evidence/reactor_test.go index 6154052819..cec9c185ae 100644 --- a/internal/evidence/reactor_test.go +++ b/internal/evidence/reactor_test.go @@ -9,12 +9,12 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/fortytw2/leaktest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/crypto" "github.com/dashpay/tenderdash/crypto/bls12381" diff --git a/internal/evidence/verify_test.go b/internal/evidence/verify_test.go index 023ec9e39b..fde060ad30 100644 --- a/internal/evidence/verify_test.go +++ b/internal/evidence/verify_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/crypto" "github.com/dashpay/tenderdash/internal/eventbus" diff --git a/internal/inspect/inspect.go b/internal/inspect/inspect.go index 4db926bdb3..20444118c1 100644 --- a/internal/inspect/inspect.go +++ b/internal/inspect/inspect.go @@ -77,7 +77,7 @@ func NewFromConfig(logger log.Logger, cfg *config.Config) (*Inspector, error) { if err != nil { return nil, err } - ss := state.NewStore(sDB) + ss := state.NewStore(sDB, logger.With("module", "state_store")) return New(cfg.RPC, bs, ss, sinks, logger), nil } diff --git a/internal/mempool/mocks/mempool.go b/internal/mempool/mocks/mempool.go index 6f4996f400..b8a04669f3 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 } -// EnableTxsAvailable provides a mock function with given fields: +// 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 no fields func (_m *Mempool) EnableTxsAvailable() { _m.Called() } -// Flush provides a mock function with given fields: +// 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.Run(run) + return _c +} + +// Flush provides a mock function with no 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.Run(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 } -// Lock provides a mock function with given fields: +// 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 no 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.Run(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,7 +333,35 @@ func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { return r0 } -// Size provides a mock function with given fields: +// 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 no fields func (_m *Mempool) Size() int { ret := _m.Called() @@ -146,7 +379,34 @@ func (_m *Mempool) Size() int { return r0 } -// SizeBytes provides a mock function with given fields: +// 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 no fields func (_m *Mempool) SizeBytes() int64 { ret := _m.Called() @@ -164,7 +424,34 @@ func (_m *Mempool) SizeBytes() int64 { return r0 } -// TxsAvailable provides a mock function with given fields: +// 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 no fields func (_m *Mempool) TxsAvailable() <-chan struct{} { ret := _m.Called() @@ -184,11 +471,65 @@ func (_m *Mempool) TxsAvailable() <-chan struct{} { return r0 } -// Unlock provides a mock function with given fields: +// 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 no 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.Run(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..9af5e12e5d 100644 --- a/internal/p2p/mocks/channel.go +++ b/internal/p2p/mocks/channel.go @@ -14,7 +14,15 @@ type Channel struct { mock.Mock } -// Err provides a mock function with given fields: +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 no 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,7 +180,36 @@ func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { return r0 } -// String provides a mock function with given fields: +// 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 no 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..fd1fcad61f 100644 --- a/internal/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -20,7 +20,15 @@ type Connection struct { mock.Mock } -// Close provides a mock function with given fields: +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 no 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,7 +110,38 @@ func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 type return r0, r1, r2 } -// LocalEndpoint provides a mock function with given fields: +// 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 no 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,7 +223,35 @@ func (_m *Connection) ReceiveMessage(_a0 context.Context) (p2p.ChannelID, []byte return r0, r1, r2 } -// RemoteEndpoint provides a mock function with given fields: +// 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 no 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,7 +314,37 @@ func (_m *Connection) SendMessage(_a0 context.Context, _a1 p2p.ChannelID, _a2 [] return r0 } -// String provides a mock function with given fields: +// 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 no 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..9ad3323d8d 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,12 +52,68 @@ 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) } -// Close provides a mock function with given fields: +// 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.Run(run) + return _c +} + +// Close provides a mock function with no 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,7 +188,36 @@ func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connectio return r0, r1 } -// Endpoint provides a mock function with given fields: +// 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 no 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,7 +292,35 @@ func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { return r0 } -// Protocols provides a mock function with given fields: +// 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 no fields func (_m *Transport) Protocols() []p2p.Protocol { ret := _m.Called() @@ -165,7 +340,34 @@ func (_m *Transport) Protocols() []p2p.Protocol { return r0 } -// String provides a mock function with given fields: +// 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 no 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/p2p/p2ptest/network.go b/internal/p2p/p2ptest/network.go index e9f6d9abde..ba209d9038 100644 --- a/internal/p2p/p2ptest/network.go +++ b/internal/p2p/p2ptest/network.go @@ -6,8 +6,8 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/config" "github.com/dashpay/tenderdash/crypto" diff --git a/internal/p2p/peermanager.go b/internal/p2p/peermanager.go index 533a570fe5..c692753bad 100644 --- a/internal/p2p/peermanager.go +++ b/internal/p2p/peermanager.go @@ -10,12 +10,12 @@ import ( "sort" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/jsonpb" "github.com/gogo/protobuf/proto" "github.com/google/orderedcode" "github.com/rs/zerolog" sync "github.com/sasha-s/go-deadlock" - dbm "github.com/tendermint/tm-db" tmsync "github.com/dashpay/tenderdash/internal/libs/sync" "github.com/dashpay/tenderdash/libs/log" diff --git a/internal/p2p/peermanager_scoring_test.go b/internal/p2p/peermanager_scoring_test.go index 0ca50775cc..50d7ff6d68 100644 --- a/internal/p2p/peermanager_scoring_test.go +++ b/internal/p2p/peermanager_scoring_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/crypto/ed25519" "github.com/dashpay/tenderdash/types" diff --git a/internal/p2p/peermanager_test.go b/internal/p2p/peermanager_test.go index 7440c4a929..32474a5c4a 100644 --- a/internal/p2p/peermanager_test.go +++ b/internal/p2p/peermanager_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/fortytw2/leaktest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/internal/p2p" "github.com/dashpay/tenderdash/libs/log" diff --git a/internal/p2p/pex/reactor_test.go b/internal/p2p/pex/reactor_test.go index cfd8c25288..6602c677bd 100644 --- a/internal/p2p/pex/reactor_test.go +++ b/internal/p2p/pex/reactor_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/config" "github.com/dashpay/tenderdash/crypto/ed25519" diff --git a/internal/p2p/router_test.go b/internal/p2p/router_test.go index d8cd615c87..d3a81cd54d 100644 --- a/internal/p2p/router_test.go +++ b/internal/p2p/router_test.go @@ -11,13 +11,13 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/fortytw2/leaktest" gogotypes "github.com/gogo/protobuf/types" sync "github.com/sasha-s/go-deadlock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/crypto" tmsync "github.com/dashpay/tenderdash/internal/libs/sync" 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/rpc/core/blocks_test.go b/internal/rpc/core/blocks_test.go index 7caef89219..4a2cf4f50b 100644 --- a/internal/rpc/core/blocks_test.go +++ b/internal/rpc/core/blocks_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/dashpay/tenderdash/abci/types" sm "github.com/dashpay/tenderdash/internal/state" diff --git a/internal/state/execution_test.go b/internal/state/execution_test.go index c94602d3ab..3cf05674d9 100644 --- a/internal/state/execution_test.go +++ b/internal/state/execution_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" abciclientmocks "github.com/dashpay/tenderdash/abci/client/mocks" diff --git a/internal/state/helpers_test.go b/internal/state/helpers_test.go index 180be9d749..3e76ad9ea1 100644 --- a/internal/state/helpers_test.go +++ b/internal/state/helpers_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/crypto" diff --git a/internal/state/indexer/block/kv/kv.go b/internal/state/indexer/block/kv/kv.go index dd9f62764c..92edab6d10 100644 --- a/internal/state/indexer/block/kv/kv.go +++ b/internal/state/indexer/block/kv/kv.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" + dbm "github.com/cometbft/cometbft-db" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/internal/pubsub/query" diff --git a/internal/state/indexer/block/kv/kv_test.go b/internal/state/indexer/block/kv/kv_test.go index 4d5552745b..ada8c05f61 100644 --- a/internal/state/indexer/block/kv/kv_test.go +++ b/internal/state/indexer/block/kv/kv_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/internal/pubsub/query" diff --git a/internal/state/indexer/indexer_service_test.go b/internal/state/indexer/indexer_service_test.go index b3a3843a75..9c2501baec 100644 --- a/internal/state/indexer/indexer_service_test.go +++ b/internal/state/indexer/indexer_service_test.go @@ -9,11 +9,11 @@ import ( "time" "github.com/adlio/schema" + dbm "github.com/cometbft/cometbft-db" "github.com/ory/dockertest" "github.com/ory/dockertest/docker" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/internal/eventbus" 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..1d9d86ec3b --- /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 no 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 no 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/indexer/sink/kv/kv.go b/internal/state/indexer/sink/kv/kv.go index 688841097a..26a28dfca7 100644 --- a/internal/state/indexer/sink/kv/kv.go +++ b/internal/state/indexer/sink/kv/kv.go @@ -3,7 +3,7 @@ package kv import ( "context" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/internal/pubsub/query" diff --git a/internal/state/indexer/sink/kv/kv_test.go b/internal/state/indexer/sink/kv/kv_test.go index 5ec843672d..bc85895021 100644 --- a/internal/state/indexer/sink/kv/kv_test.go +++ b/internal/state/indexer/sink/kv/kv_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" diff --git a/internal/state/indexer/tx/kv/kv.go b/internal/state/indexer/tx/kv/kv.go index d9e93f2c8a..411edf5dcc 100644 --- a/internal/state/indexer/tx/kv/kv.go +++ b/internal/state/indexer/tx/kv/kv.go @@ -7,9 +7,9 @@ import ( "strconv" "strings" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/internal/pubsub/query" diff --git a/internal/state/indexer/tx/kv/kv_bench_test.go b/internal/state/indexer/tx/kv/kv_bench_test.go index c0e4d89ae7..ed6a8dac4f 100644 --- a/internal/state/indexer/tx/kv/kv_bench_test.go +++ b/internal/state/indexer/tx/kv/kv_bench_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/internal/pubsub/query" diff --git a/internal/state/indexer/tx/kv/kv_test.go b/internal/state/indexer/tx/kv/kv_test.go index 79f8b32173..047f09e18d 100644 --- a/internal/state/indexer/tx/kv/kv_test.go +++ b/internal/state/indexer/tx/kv/kv_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/internal/pubsub/query" 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..388e81e133 --- /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 no 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 no 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 no 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 no 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 no 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.Run(run) + return _c +} + +// Size provides a mock function with no 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..1491806b7d --- /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.Run(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..a1a19d63ec 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.Run(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 index 006a8b4e03..499ce2c313 100644 --- a/internal/state/mocks/store.go +++ b/internal/state/mocks/store.go @@ -17,6 +17,14 @@ type Store struct { mock.Mock } +type Store_Expecter struct { + mock *mock.Mock +} + +func (_m *Store) EXPECT() *Store_Expecter { + return &Store_Expecter{mock: &_m.Mock} +} + // Bootstrap provides a mock function with given fields: _a0 func (_m *Store) Bootstrap(_a0 state.State) error { ret := _m.Called(_a0) @@ -35,7 +43,35 @@ func (_m *Store) Bootstrap(_a0 state.State) error { return r0 } -// Close provides a mock function with given fields: +// Store_Bootstrap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bootstrap' +type Store_Bootstrap_Call struct { + *mock.Call +} + +// Bootstrap is a helper method to define mock.On call +// - _a0 state.State +func (_e *Store_Expecter) Bootstrap(_a0 interface{}) *Store_Bootstrap_Call { + return &Store_Bootstrap_Call{Call: _e.mock.On("Bootstrap", _a0)} +} + +func (_c *Store_Bootstrap_Call) Run(run func(_a0 state.State)) *Store_Bootstrap_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(state.State)) + }) + return _c +} + +func (_c *Store_Bootstrap_Call) Return(_a0 error) *Store_Bootstrap_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_Bootstrap_Call) RunAndReturn(run func(state.State) error) *Store_Bootstrap_Call { + _c.Call.Return(run) + return _c +} + +// Close provides a mock function with no fields func (_m *Store) Close() error { ret := _m.Called() @@ -53,7 +89,34 @@ func (_m *Store) Close() error { return r0 } -// Load provides a mock function with given fields: +// Store_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Store_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Store_Expecter) Close() *Store_Close_Call { + return &Store_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Store_Close_Call) Run(run func()) *Store_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Store_Close_Call) Return(_a0 error) *Store_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_Close_Call) RunAndReturn(run func() error) *Store_Close_Call { + _c.Call.Return(run) + return _c +} + +// Load provides a mock function with no fields func (_m *Store) Load() (state.State, error) { ret := _m.Called() @@ -81,6 +144,33 @@ func (_m *Store) Load() (state.State, error) { return r0, r1 } +// Store_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load' +type Store_Load_Call struct { + *mock.Call +} + +// Load is a helper method to define mock.On call +func (_e *Store_Expecter) Load() *Store_Load_Call { + return &Store_Load_Call{Call: _e.mock.On("Load")} +} + +func (_c *Store_Load_Call) Run(run func()) *Store_Load_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Store_Load_Call) Return(_a0 state.State, _a1 error) *Store_Load_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Store_Load_Call) RunAndReturn(run func() (state.State, error)) *Store_Load_Call { + _c.Call.Return(run) + return _c +} + // LoadABCIResponses provides a mock function with given fields: _a0 func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, error) { ret := _m.Called(_a0) @@ -111,6 +201,34 @@ func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, e return r0, r1 } +// Store_LoadABCIResponses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadABCIResponses' +type Store_LoadABCIResponses_Call struct { + *mock.Call +} + +// LoadABCIResponses is a helper method to define mock.On call +// - _a0 int64 +func (_e *Store_Expecter) LoadABCIResponses(_a0 interface{}) *Store_LoadABCIResponses_Call { + return &Store_LoadABCIResponses_Call{Call: _e.mock.On("LoadABCIResponses", _a0)} +} + +func (_c *Store_LoadABCIResponses_Call) Run(run func(_a0 int64)) *Store_LoadABCIResponses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *Store_LoadABCIResponses_Call) Return(_a0 *tendermintstate.ABCIResponses, _a1 error) *Store_LoadABCIResponses_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Store_LoadABCIResponses_Call) RunAndReturn(run func(int64) (*tendermintstate.ABCIResponses, error)) *Store_LoadABCIResponses_Call { + _c.Call.Return(run) + return _c +} + // LoadConsensusParams provides a mock function with given fields: _a0 func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { ret := _m.Called(_a0) @@ -139,6 +257,34 @@ func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { return r0, r1 } +// Store_LoadConsensusParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadConsensusParams' +type Store_LoadConsensusParams_Call struct { + *mock.Call +} + +// LoadConsensusParams is a helper method to define mock.On call +// - _a0 int64 +func (_e *Store_Expecter) LoadConsensusParams(_a0 interface{}) *Store_LoadConsensusParams_Call { + return &Store_LoadConsensusParams_Call{Call: _e.mock.On("LoadConsensusParams", _a0)} +} + +func (_c *Store_LoadConsensusParams_Call) Run(run func(_a0 int64)) *Store_LoadConsensusParams_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *Store_LoadConsensusParams_Call) Return(_a0 types.ConsensusParams, _a1 error) *Store_LoadConsensusParams_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Store_LoadConsensusParams_Call) RunAndReturn(run func(int64) (types.ConsensusParams, error)) *Store_LoadConsensusParams_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -169,6 +315,35 @@ func (_m *Store) LoadValidators(_a0 int64, _a1 selectproposer.BlockStore) (*type return r0, r1 } +// Store_LoadValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadValidators' +type Store_LoadValidators_Call struct { + *mock.Call +} + +// LoadValidators is a helper method to define mock.On call +// - _a0 int64 +// - _a1 selectproposer.BlockStore +func (_e *Store_Expecter) LoadValidators(_a0 interface{}, _a1 interface{}) *Store_LoadValidators_Call { + return &Store_LoadValidators_Call{Call: _e.mock.On("LoadValidators", _a0, _a1)} +} + +func (_c *Store_LoadValidators_Call) Run(run func(_a0 int64, _a1 selectproposer.BlockStore)) *Store_LoadValidators_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(selectproposer.BlockStore)) + }) + return _c +} + +func (_c *Store_LoadValidators_Call) Return(_a0 *types.ValidatorSet, _a1 error) *Store_LoadValidators_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Store_LoadValidators_Call) RunAndReturn(run func(int64, selectproposer.BlockStore) (*types.ValidatorSet, error)) *Store_LoadValidators_Call { + _c.Call.Return(run) + return _c +} + // PruneStates provides a mock function with given fields: _a0 func (_m *Store) PruneStates(_a0 int64) error { ret := _m.Called(_a0) @@ -187,6 +362,34 @@ func (_m *Store) PruneStates(_a0 int64) error { return r0 } +// Store_PruneStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneStates' +type Store_PruneStates_Call struct { + *mock.Call +} + +// PruneStates is a helper method to define mock.On call +// - _a0 int64 +func (_e *Store_Expecter) PruneStates(_a0 interface{}) *Store_PruneStates_Call { + return &Store_PruneStates_Call{Call: _e.mock.On("PruneStates", _a0)} +} + +func (_c *Store_PruneStates_Call) Run(run func(_a0 int64)) *Store_PruneStates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *Store_PruneStates_Call) Return(_a0 error) *Store_PruneStates_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_PruneStates_Call) RunAndReturn(run func(int64) error) *Store_PruneStates_Call { + _c.Call.Return(run) + return _c +} + // Save provides a mock function with given fields: _a0 func (_m *Store) Save(_a0 state.State) error { ret := _m.Called(_a0) @@ -205,6 +408,34 @@ func (_m *Store) Save(_a0 state.State) error { return r0 } +// Store_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save' +type Store_Save_Call struct { + *mock.Call +} + +// Save is a helper method to define mock.On call +// - _a0 state.State +func (_e *Store_Expecter) Save(_a0 interface{}) *Store_Save_Call { + return &Store_Save_Call{Call: _e.mock.On("Save", _a0)} +} + +func (_c *Store_Save_Call) Run(run func(_a0 state.State)) *Store_Save_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(state.State)) + }) + return _c +} + +func (_c *Store_Save_Call) Return(_a0 error) *Store_Save_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_Save_Call) RunAndReturn(run func(state.State) error) *Store_Save_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -223,6 +454,35 @@ func (_m *Store) SaveABCIResponses(_a0 int64, _a1 tendermintstate.ABCIResponses) return r0 } +// Store_SaveABCIResponses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveABCIResponses' +type Store_SaveABCIResponses_Call struct { + *mock.Call +} + +// SaveABCIResponses is a helper method to define mock.On call +// - _a0 int64 +// - _a1 tendermintstate.ABCIResponses +func (_e *Store_Expecter) SaveABCIResponses(_a0 interface{}, _a1 interface{}) *Store_SaveABCIResponses_Call { + return &Store_SaveABCIResponses_Call{Call: _e.mock.On("SaveABCIResponses", _a0, _a1)} +} + +func (_c *Store_SaveABCIResponses_Call) Run(run func(_a0 int64, _a1 tendermintstate.ABCIResponses)) *Store_SaveABCIResponses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(tendermintstate.ABCIResponses)) + }) + return _c +} + +func (_c *Store_SaveABCIResponses_Call) Return(_a0 error) *Store_SaveABCIResponses_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_SaveABCIResponses_Call) RunAndReturn(run func(int64, tendermintstate.ABCIResponses) error) *Store_SaveABCIResponses_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -241,6 +501,36 @@ func (_m *Store) SaveValidatorSets(_a0 int64, _a1 int64, _a2 *types.ValidatorSet return r0 } +// Store_SaveValidatorSets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveValidatorSets' +type Store_SaveValidatorSets_Call struct { + *mock.Call +} + +// SaveValidatorSets is a helper method to define mock.On call +// - _a0 int64 +// - _a1 int64 +// - _a2 *types.ValidatorSet +func (_e *Store_Expecter) SaveValidatorSets(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Store_SaveValidatorSets_Call { + return &Store_SaveValidatorSets_Call{Call: _e.mock.On("SaveValidatorSets", _a0, _a1, _a2)} +} + +func (_c *Store_SaveValidatorSets_Call) Run(run func(_a0 int64, _a1 int64, _a2 *types.ValidatorSet)) *Store_SaveValidatorSets_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(int64), args[2].(*types.ValidatorSet)) + }) + return _c +} + +func (_c *Store_SaveValidatorSets_Call) Return(_a0 error) *Store_SaveValidatorSets_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Store_SaveValidatorSets_Call) RunAndReturn(run func(int64, int64, *types.ValidatorSet) error) *Store_SaveValidatorSets_Call { + _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(t interface { diff --git a/internal/state/rollback_test.go b/internal/state/rollback_test.go index 6fca9fe147..b7d9d3ed2f 100644 --- a/internal/state/rollback_test.go +++ b/internal/state/rollback_test.go @@ -3,8 +3,8 @@ package state_test import ( "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/internal/state" "github.com/dashpay/tenderdash/internal/state/mocks" diff --git a/internal/state/state_test.go b/internal/state/state_test.go index 9b8bb59384..6d297bec02 100644 --- a/internal/state/state_test.go +++ b/internal/state/state_test.go @@ -6,10 +6,10 @@ import ( "os" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/abci/example/kvstore" abci "github.com/dashpay/tenderdash/abci/types" diff --git a/internal/state/store.go b/internal/state/store.go index 1bd53067ba..bbfad95a1e 100644 --- a/internal/state/store.go +++ b/internal/state/store.go @@ -5,9 +5,9 @@ import ( "errors" "fmt" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" abci "github.com/dashpay/tenderdash/abci/types" selectproposer "github.com/dashpay/tenderdash/internal/consensus/versioned/selectproposer" @@ -113,7 +113,7 @@ type Store interface { Close() error } -// dbStore wraps a db (github.com/tendermint/tm-db) +// dbStore wraps a db (github.com/cometbft/cometbft-db) type dbStore struct { db dbm.DB logger log.Logger @@ -122,11 +122,31 @@ type dbStore struct { var _ Store = (*dbStore)(nil) // NewStore creates the dbStore of the state pkg. -func NewStore(db dbm.DB) Store { - return dbStore{db, log.NewNopLogger()} +// +// ## Parameters +// +// - `db` - the database to use +// - `logger` - the logger to use; optional, defaults to a nop logger if not provided; if more than one is provided, +// it will panic +// +// ##Panics +// +// If more than one logger is provided. +func NewStore(db dbm.DB, logger ...log.Logger) Store { + // To avoid changing the API, we use `logger ...log.Logger` in function signature, so that old code can + // provide only `db`. In this case, we use NopLogger. + if len(logger) == 0 || logger[0] == nil { + logger = []log.Logger{log.NewNopLogger()} + } + + if len(logger) > 1 { + panic("NewStore(): maximum one logger is allowed") + } + + return dbStore{db, logger[0]} } -// LoadState loads the State from the database. +// Load loads the State from the database. func (store dbStore) Load() (State, error) { return store.loadState(stateKey) } @@ -498,30 +518,43 @@ func (store dbStore) SaveValidatorSets(lowerHeight, upperHeight int64, vals *typ return batch.WriteSync() } -//----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- -// LoadValidators loads the ValidatorSet for a given height and round 0. -// -// Returns ErrNoValSetForHeight if the validator set can't be found for this height. -func (store dbStore) LoadValidators(height int64, bs selectproposer.BlockStore) (*types.ValidatorSet, error) { +// loadValidators is a helper that loads the validator set from height or last stored height. +// It does NOT set a correct proposer. +func (store dbStore) loadValidators(height int64) (*tmstate.ValidatorsInfo, error) { valInfo, err := loadValidatorsInfo(store.db, height) if err != nil { - return nil, ErrNoValSetForHeight{Height: height, Err: err} + return nil, ErrNoValSetForHeight{Height: height, Err: fmt.Errorf("failed to load validators info: %w", err)} } if valInfo.ValidatorSet == nil { lastStoredHeight := lastStoredHeightFor(height, valInfo.LastHeightChanged) + store.logger.Debug("Validator set is nil, loading last stored height", "height", height, "last_height_changed", valInfo.LastHeightChanged, "last_stored_height", lastStoredHeight) valInfo, err = loadValidatorsInfo(store.db, lastStoredHeight) if err != nil || valInfo.ValidatorSet == nil { - return nil, - fmt.Errorf("couldn't find validators at height %d (height %d was originally requested): %w", - lastStoredHeight, - height, - err, - ) + return nil, ErrNoValSetForHeight{Height: height, Err: fmt.Errorf("couldn't find validators at height %d (height %d was originally requested): %w", + lastStoredHeight, + height, + err, + )} } } + return valInfo, nil +} + +// LoadValidators loads the ValidatorSet for a given height and round 0. +// +// Returns ErrNoValSetForHeight if the validator set can't be found for this height. +func (store dbStore) LoadValidators(height int64, bs selectproposer.BlockStore) (*types.ValidatorSet, error) { + store.logger.Debug("Loading validators", "height", height) + + valInfo, err := store.loadValidators(height) + if err != nil { + return nil, ErrNoValSetForHeight{Height: height, Err: err} + } + valSet, err := types.ValidatorSetFromProto(valInfo.ValidatorSet) if err != nil { return nil, err @@ -562,27 +595,48 @@ func (store dbStore) LoadValidators(height int64, bs selectproposer.BlockStore) return strategy.ValidatorSet(), nil } - // If we have that height in the block store, we just take proposer from previous block and advance it. + // If we don't have that height in the block store, we just take proposer from previous block and advance it. // We don't use current height block because we want to return proposer at round 0. prevMeta := bs.LoadBlockMeta(height - 1) if prevMeta == nil { return nil, fmt.Errorf("could not find block meta for height %d", height-1) } - // Configure proposer strategy; first set proposer from previous block - if err := valSet.SetProposer(prevMeta.Header.ProposerProTxHash); err != nil { - return nil, fmt.Errorf("could not set proposer: %w", err) - } - strategy, err := selectproposer.NewProposerSelector(cp, valSet, prevMeta.Header.Height, prevMeta.Round, bs, store.logger) - if err != nil { - return nil, fmt.Errorf("failed to create validator scoring strategy: %w", err) - } + // Configure proposer strategy; first check if we have a quorum change + if !prevMeta.Header.ValidatorsHash.Equal(prevMeta.Header.NextValidatorsHash) { + // rotation happened - we select 1st validator as proposer + valSetHash := valSet.Hash() + if !prevMeta.Header.NextValidatorsHash.Equal(valSetHash) { + return nil, ErrNoValSetForHeight{ + Height: height, + Err: fmt.Errorf("next validators hash mismatch at height %d, expected %X, got %X", height, + prevMeta.Header.NextValidatorsHash, valSetHash), + } + } + + if err = valSet.SetProposer(valSet.GetByIndex(0).ProTxHash); err != nil { + return nil, ErrNoValSetForHeight{height, fmt.Errorf("could not set proposer: %w", err)} + } - // now, advance to (height,0) - if err := strategy.UpdateHeightRound(height, 0); err != nil { - return nil, fmt.Errorf("failed to update validator scores at height %d, round 0: %w", height, err) + return valSet, nil + } else { + + // set proposer from previous block + if err := valSet.SetProposer(prevMeta.Header.ProposerProTxHash); err != nil { + return nil, fmt.Errorf("could not set proposer: %w", err) + } + strategy, err := selectproposer.NewProposerSelector(cp, valSet, prevMeta.Header.Height, prevMeta.Round, bs, store.logger) + if err != nil { + return nil, fmt.Errorf("failed to create validator scoring strategy: %w", err) + } + + // now, advance to (height,0) + if err := strategy.UpdateHeightRound(height, 0); err != nil { + return nil, fmt.Errorf("failed to update validator scores at height %d, round 0: %w", height, err) + } + + return strategy.ValidatorSet(), nil } - return strategy.ValidatorSet(), nil } func lastStoredHeightFor(height, lastHeightChanged int64) int64 { @@ -643,6 +697,7 @@ func (store dbStore) saveValidatorsInfo( return err } + store.logger.Debug("saving validator set", "height", height, "last_height_changed", lastHeightChanged, "validators", valSet) return batch.Set(validatorsKey(height), bz) } diff --git a/internal/state/store_test.go b/internal/state/store_test.go index a696f5a8cc..bdc905c26d 100644 --- a/internal/state/store_test.go +++ b/internal/state/store_test.go @@ -6,10 +6,10 @@ import ( "os" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abci "github.com/dashpay/tenderdash/abci/types" "github.com/dashpay/tenderdash/config" @@ -31,10 +31,18 @@ const ( // mockBlockStoreForProposerSelector creates a mock block store that returns proposers based on the height. // It assumes every block ends in round 0 and the proposer is the next validator in the validator set. func mockBlockStoreForProposerSelector(t *testing.T, startHeight, endHeight int64, vals *types.ValidatorSet) selectproposer.BlockStore { - vals = vals.Copy() - valsHash := vals.Hash() blockStore := mocks.NewBlockStore(t) blockStore.On("Base").Return(startHeight).Maybe() + configureBlockMetaWithValidators(t, blockStore, startHeight, endHeight, vals) + + return blockStore +} + +// configureBlockMetaWithValidators configures the block store to return proposers based on the height. +func configureBlockMetaWithValidators(_ *testing.T, blockStore *mocks.BlockStore, startHeight, endHeight int64, vals *types.ValidatorSet) { + vals = vals.Copy() + valsHash := vals.Hash() + for h := startHeight; h <= endHeight; h++ { blockStore.On("LoadBlockMeta", h). Return(&types.BlockMeta{ @@ -47,8 +55,6 @@ func mockBlockStoreForProposerSelector(t *testing.T, startHeight, endHeight int6 }).Maybe() vals.IncProposerIndex(1) } - - return blockStore } func TestStoreBootstrap(t *testing.T) { @@ -141,9 +147,9 @@ func TestStoreLoadValidators(t *testing.T) { // check that a request will go back to the last checkpoint _, err = stateStore.LoadValidators(valSetCheckpointInterval+1, blockStore) require.Error(t, err) - require.Equal(t, fmt.Sprintf("couldn't find validators at height %d (height %d was originally requested): "+ + require.ErrorContains(t, err, fmt.Sprintf("couldn't find validators at height %d (height %d was originally requested): "+ "value retrieved from db is empty", - valSetCheckpointInterval, valSetCheckpointInterval+1), err.Error()) + valSetCheckpointInterval, valSetCheckpointInterval+1)) // now save a validator set at that checkpoint err = stateStore.Save(makeRandomStateFromValidatorSet(vals, valSetCheckpointInterval, 1, blockStore)) @@ -167,6 +173,101 @@ func TestStoreLoadValidators(t *testing.T) { require.Equal(t, expected, valsAtCheckpoint) } +// Given a set of blocks in the block store and two validator sets that rotate, +// When we load the validators during quorum rotation, +// Then we receive the correct validators for each height. +func TestStoreLoadValidatorsOnRotation(t *testing.T) { + const startHeight = int64(1) + + testCases := []struct { + rotations int64 + nVals int + nValSets int64 + consensusVersion int32 + }{ + {1, 3, 3, 0}, + {1, 3, 3, 1}, + {2, 3, 2, 0}, + {2, 3, 2, 1}, + {3, 2, 4, 0}, + {3, 2, 4, 1}, + } + + for _, tc := range testCases { + t.Run(fmt.Sprintf("rotations=%d,nVals=%d,nValSets=%d,ver=%d", + tc.rotations, tc.nVals, tc.nValSets, tc.consensusVersion), func(t *testing.T) { + rotations := tc.rotations + nVals := tc.nVals + nValSets := tc.nValSets + uncommittedHeight := startHeight + rotations*int64(nVals) + + stateDB := dbm.NewMemDB() + stateStore := sm.NewStore(stateDB, log.NewTestingLoggerWithLevel(t, log.LogLevelDebug)) + + validators := make([]*types.ValidatorSet, nValSets) + for i := int64(0); i < nValSets; i++ { + validators[i], _ = types.RandValidatorSet(nVals) + t.Logf("Validator set %d: %v", i, validators[i].Hash()) + } + + blockStore := mocks.NewBlockStore(t) + blockStore.On("Base").Return(startHeight).Maybe() + + // configure block store and state store to return correct validators and block meta + for i := int64(0); i < rotations; i++ { + nextQuorumHeight := startHeight + (i+1)*int64(nVals) + + err := stateStore.SaveValidatorSets(startHeight+i*int64(nVals), nextQuorumHeight-1, validators[i%nValSets]) + require.NoError(t, err) + + vals := validators[i%nValSets].Copy() + // reset proposer + require.NoError(t, vals.SetProposer(vals.GetByIndex(0).ProTxHash)) + valsHash := vals.Hash() + nextValsHash := valsHash // we only change it in last block + + // configure block store to return correct validator sets and proposers + for h := startHeight + i*int64(nVals); h < nextQuorumHeight; h++ { + if h == nextQuorumHeight-1 { + nextValsHash = validators[(i+1)%nValSets].Hash() + } + blockStore.On("LoadBlockMeta", h). + Return(&types.BlockMeta{ + Header: types.Header{ + Height: h, + ProposerProTxHash: vals.Proposer().ProTxHash, + ValidatorsHash: valsHash, + NextValidatorsHash: nextValsHash, + }, + }).Maybe() + vals.IncProposerIndex(1) + + // set consensus version + state := makeRandomStateFromValidatorSet(vals, h+1, startHeight+i*int64(nVals), blockStore) + state.LastHeightConsensusParamsChanged = h + 1 + state.ConsensusParams.Version.ConsensusVersion = tc.consensusVersion + require.NoError(t, stateStore.Save(state)) + } + + assert.LessOrEqual(t, nextQuorumHeight, uncommittedHeight, "we should not save block at height {}", uncommittedHeight) + } + + // now, we are at height 10, and we should rotate to next validators + // we don't have the last block yet, but we already have validator set for the next height + blockStore.On("LoadBlockMeta", uncommittedHeight).Return(nil).Maybe() + + expectedValidators := validators[rotations%nValSets] + err := stateStore.SaveValidatorSets(uncommittedHeight, uncommittedHeight, expectedValidators) + require.NoError(t, err) + + // We should get correct validator set from the store + readVals, err := stateStore.LoadValidators(uncommittedHeight, blockStore) + require.NoError(t, err) + assert.Equal(t, expectedValidators, readVals) + }) + } +} + // This benchmarks the speed of loading validators from different heights if there is no validator set change. // NOTE: This isn't too indicative of validator retrieval speed as the db is always (regardless of height) only // performing two operations: 1) retrieve validator info at height x, which has a last validator set change of 1 diff --git a/internal/state/validation_test.go b/internal/state/validation_test.go index a8497cc6db..2f179982b7 100644 --- a/internal/state/validation_test.go +++ b/internal/state/validation_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" abci "github.com/dashpay/tenderdash/abci/types" 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/internal/statesync/reactor_test.go b/internal/statesync/reactor_test.go index 40b06dad4c..eff91961c4 100644 --- a/internal/statesync/reactor_test.go +++ b/internal/statesync/reactor_test.go @@ -10,11 +10,11 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/fortytw2/leaktest" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" clientmocks "github.com/dashpay/tenderdash/abci/client/mocks" abci "github.com/dashpay/tenderdash/abci/types" diff --git a/internal/statesync/stateprovider.go b/internal/statesync/stateprovider.go index 1fe8b93a86..b10324acc5 100644 --- a/internal/statesync/stateprovider.go +++ b/internal/statesync/stateprovider.go @@ -10,7 +10,7 @@ import ( sync "github.com/sasha-s/go-deadlock" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" dashcore "github.com/dashpay/tenderdash/dash/core" "github.com/dashpay/tenderdash/internal/p2p" diff --git a/internal/store/store.go b/internal/store/store.go index 02faa0e519..e5d52e665a 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -6,9 +6,9 @@ import ( "fmt" "strconv" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" tmproto "github.com/dashpay/tenderdash/proto/tendermint/types" "github.com/dashpay/tenderdash/types" diff --git a/internal/store/store_test.go b/internal/store/store_test.go index f7dbbaa844..a64e2b8e8f 100644 --- a/internal/store/store_test.go +++ b/internal/store/store_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/config" "github.com/dashpay/tenderdash/crypto" diff --git a/libs/store/mocks/store.go b/libs/store/mocks/store.go index 4a2b232fb5..bf43f9b904 100644 --- a/libs/store/mocks/store.go +++ b/libs/store/mocks/store.go @@ -12,7 +12,15 @@ type Store[K comparable, V any] struct { mock.Mock } -// All provides a mock function with given fields: +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 no 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.Run(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) @@ -53,7 +116,9 @@ func (_m *Store[K, V]) Get(key K) (V, bool) { if rf, ok := ret.Get(0).(func(K) V); ok { r0 = rf(key) } else { - r0 = ret.Get(0).(V) + if ret.Get(0) != nil { + r0 = ret.Get(0).(V) + } } if rf, ok := ret.Get(1).(func(K) bool); ok { @@ -65,6 +130,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) @@ -81,7 +174,9 @@ func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { if rf, ok := ret.Get(0).(func(K) V); ok { r0 = rf(key) } else { - r0 = ret.Get(0).(V) + if ret.Get(0) != nil { + r0 = ret.Get(0).(V) + } } if rf, ok := ret.Get(1).(func(K) bool); ok { @@ -93,7 +188,35 @@ func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { return r0, r1 } -// IsZero provides a mock function with given fields: +// 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 no fields func (_m *Store[K, V]) IsZero() bool { ret := _m.Called() @@ -111,7 +234,34 @@ func (_m *Store[K, V]) IsZero() bool { return r0 } -// Len provides a mock function with given fields: +// 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 no fields func (_m *Store[K, V]) Len() int { ret := _m.Called() @@ -129,11 +279,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.Run(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 +360,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 +401,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.Run(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/client_benchmark_test.go b/light/client_benchmark_test.go index 09bf34ac06..63681c06fb 100644 --- a/light/client_benchmark_test.go +++ b/light/client_benchmark_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" dashcore "github.com/dashpay/tenderdash/dash/core" "github.com/dashpay/tenderdash/libs/log" diff --git a/light/client_test.go b/light/client_test.go index f0a74e3919..8dbecbe852 100644 --- a/light/client_test.go +++ b/light/client_test.go @@ -9,10 +9,10 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" dashcore "github.com/dashpay/tenderdash/dash/core" "github.com/dashpay/tenderdash/libs/log" diff --git a/light/example_test.go b/light/example_test.go index 55e9a33164..55b93fedae 100644 --- a/light/example_test.go +++ b/light/example_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/abci/example/kvstore" dashcore "github.com/dashpay/tenderdash/dash/core" diff --git a/light/light_test.go b/light/light_test.go index e54a220a1f..2403670bfd 100644 --- a/light/light_test.go +++ b/light/light_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/dashd-go/btcjson" diff --git a/light/provider/mocks/provider.go b/light/provider/mocks/provider.go index 24cd675bf9..08e6a15f5e 100644 --- a/light/provider/mocks/provider.go +++ b/light/provider/mocks/provider.go @@ -15,7 +15,15 @@ type Provider struct { mock.Mock } -// ID provides a mock function with given fields: +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 no 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..0856f41f81 --- /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 no 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/light/store/db/db.go b/light/store/db/db.go index 30b3a50026..63e3f89d1b 100644 --- a/light/store/db/db.go +++ b/light/store/db/db.go @@ -6,8 +6,8 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/light/store" tmproto "github.com/dashpay/tenderdash/proto/tendermint/types" diff --git a/light/store/db/db_test.go b/light/store/db/db_test.go index 16be663975..dbed75004b 100644 --- a/light/store/db/db_test.go +++ b/light/store/db/db_test.go @@ -7,9 +7,9 @@ import ( sync "github.com/sasha-s/go-deadlock" + dbm "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/crypto" tmrand "github.com/dashpay/tenderdash/libs/rand" diff --git a/node/node.go b/node/node.go index 7daa8eee4b..f69b7d196f 100644 --- a/node/node.go +++ b/node/node.go @@ -136,7 +136,7 @@ func makeNode( } closers = append(closers, dbCloser) - stateStore := sm.NewStore(stateDB) + stateStore := sm.NewStore(stateDB, logger.With("module", "state_store")) genDoc, err := genesisDocProvider() if err != nil { diff --git a/node/node_test.go b/node/node_test.go index 7f8671a349..35d63cbb57 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/fortytw2/leaktest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" "github.com/dashpay/tenderdash/abci/example/kvstore" diff --git a/node/setup.go b/node/setup.go index 8d3dbf2bef..168023faa2 100644 --- a/node/setup.go +++ b/node/setup.go @@ -7,10 +7,10 @@ import ( "strings" "time" + dbm "github.com/cometbft/cometbft-db" "github.com/dashpay/dashd-go/btcjson" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" - dbm "github.com/tendermint/tm-db" abciclient "github.com/dashpay/tenderdash/abci/client" "github.com/dashpay/tenderdash/config" 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..91f48561fc --- /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 no 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/scripts/keymigrate/migrate.go b/scripts/keymigrate/migrate.go index b5b56e8392..10a83f291e 100644 --- a/scripts/keymigrate/migrate.go +++ b/scripts/keymigrate/migrate.go @@ -16,9 +16,9 @@ import ( "runtime" "strconv" + dbm "github.com/cometbft/cometbft-db" "github.com/creachadair/taskgroup" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" ) type ( diff --git a/scripts/mockery_generate.sh b/scripts/mockery_generate.sh index 022f8c1367..a24786250c 100755 --- a/scripts/mockery_generate.sh +++ b/scripts/mockery_generate.sh @@ -6,11 +6,12 @@ # 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.50.0 if ! mockery --version 2>/dev/null | grep $VERSION; then - echo "Please install mockery $VERSION" + echo "Please install mockery $VERSION, example for Linux x86_64:" + echo "wget https://github.com/vektra/mockery/releases/download/${VERSION}/mockery_${VERSION#v}_Linux_x86_64.tar.gz" exit 1 fi -mockery --disable-version-string --case underscore --name "$@" +mockery diff --git a/scripts/proto-gen.sh b/scripts/proto-gen.sh deleted file mode 100755 index 06fa07dd95..0000000000 --- a/scripts/proto-gen.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# Update the generated code for protocol buffers in the Tendermint repository. -# This must be run from inside a Tendermint working directory. -# -set -euo pipefail - -# Work from the root of the repository. -cd "$(git rev-parse --show-toplevel)" - -# Run inside Docker to install the correct versions of the required tools -# without polluting the local system. -docker run --rm -i -v "$PWD":/w --workdir=/w golang:1.18-alpine sh <<"EOF" -apk add git make - -go install github.com/bufbuild/buf/cmd/buf -go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest -make proto-gen -EOF diff --git a/scripts/scmigrate/migrate.go b/scripts/scmigrate/migrate.go index 643dce671f..ac707dd4f9 100644 --- a/scripts/scmigrate/migrate.go +++ b/scripts/scmigrate/migrate.go @@ -13,9 +13,9 @@ import ( "fmt" "sort" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" "github.com/google/orderedcode" - dbm "github.com/tendermint/tm-db" tmproto "github.com/dashpay/tenderdash/proto/tendermint/types" "github.com/dashpay/tenderdash/types" diff --git a/scripts/scmigrate/migrate_test.go b/scripts/scmigrate/migrate_test.go index 3527e5d7af..5f57c6173a 100644 --- a/scripts/scmigrate/migrate_test.go +++ b/scripts/scmigrate/migrate_test.go @@ -6,8 +6,8 @@ import ( "math/rand" "testing" + dbm "github.com/cometbft/cometbft-db" "github.com/gogo/protobuf/proto" - dbm "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/types" ) diff --git a/test/e2e/Makefile b/test/e2e/Makefile index aade8c220e..5f5ca11d5f 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -26,7 +26,7 @@ docker: -f docker/Dockerfile ../.. node: - GOTRACEBACK=crash $(GO) build -gcflags="all=-N -l" -o build/node -tags badgerdb,boltdb,cleveldb,deadlock ./node + GOTRACEBACK=crash $(GO) build -gcflags="all=-N -l" -o build/node -tags deadlock ./node e2e/app/compile: docker run --rm -it --entrypoint "/src/tenderdash/test/e2e/entrypoint.sh" -w "/src/tenderdash/test/e2e" -v $(ROOT_PATH)/test/e2e:/src/tenderdash/test/e2e tenderdash/e2e-node diff --git a/test/e2e/README.md b/test/e2e/README.md index 3ffb0f67f9..7ef0486a25 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -217,7 +217,7 @@ To analyze core dumps: 1. Examine [Dockerfile](docker/Dockerfile) to ensure `ENV TENDERMINT_BUILD_OPTIONS` contains `nostrip` option AND `GOTRACEBACK` is set to `crash`, for example: ```docker - ENV TENDERMINT_BUILD_OPTIONS badgerdb,boltdb,cleveldb,rocksdb,nostrip + ENV TENDERMINT_BUILD_OPTIONS nostrip ENV GOTRACEBACK=crash ``` @@ -255,9 +255,9 @@ Docker does not enable IPv6 by default. To do so, enter the following in It is also possible to run a simple benchmark on a testnet. This is done through the `benchmark` command. This manages the entire process: setting up the environment, starting the test net, waiting for a considerable amount of blocks to be used (currently 100), and then returning the following metrics from the sample of the blockchain: -- Average time to produce a block -- Standard deviation of producing a block -- Minimum and maximum time to produce a block +* Average time to produce a block +* Standard deviation of producing a block +* Minimum and maximum time to produce a block ## Running Individual Nodes diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index b9abd895ae..8f610d1bb0 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -11,8 +11,8 @@ import ( "strings" "time" + db "github.com/cometbft/cometbft-db" sync "github.com/sasha-s/go-deadlock" - db "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/abci/example/code" "github.com/dashpay/tenderdash/abci/example/kvstore" diff --git a/test/e2e/docker/Dockerfile b/test/e2e/docker/Dockerfile index 6bc47707fe..2ab51e21af 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.23 +ARG GOLANG_VERSION=1.23.2 ################################# # STAGE 1: install dependencies # ################################# diff --git a/test/e2e/generator/generate.go b/test/e2e/generator/generate.go index 2fbc995cd3..1d65fee0f5 100644 --- a/test/e2e/generator/generate.go +++ b/test/e2e/generator/generate.go @@ -36,9 +36,6 @@ var ( // The following specify randomly chosen values for testnet nodes. nodeDatabases = weightedChoice{ "goleveldb": 35, - "badgerdb": 35, - "boltdb": 15, - "cleveldb": 5, } ABCIProtocols = weightedChoice{ "tcp": 20, diff --git a/test/e2e/networks/ci.toml b/test/e2e/networks/ci.toml index 34627da571..eefce82dc6 100644 --- a/test/e2e/networks/ci.toml +++ b/test/e2e/networks/ci.toml @@ -3,7 +3,7 @@ evidence = 5 initial_height = 1000 -initial_state = {initial01 = "a", initial02 = "b", initial03 = "c"} +initial_state = { initial01 = "a", initial02 = "b", initial03 = "c" } queue_type = "simple-priority" abci_protocol = "builtin" initial_core_chain_locked_height = 3400 @@ -41,7 +41,7 @@ block_sync = "v0" perturb = ["disconnect"] [node.validator02] -database = "cleveldb" +database = "goleveldb" persist_interval = 0 perturb = ["restart"] privval_protocol = "tcp" @@ -49,7 +49,7 @@ seeds = ["seed01"] block_sync = "v0" [node.validator03] -database = "badgerdb" +database = "goleveldb" seeds = ["seed01"] persist_interval = 3 perturb = ["kill"] @@ -59,7 +59,7 @@ retain_blocks = 10 [node.validator04] snapshot_interval = 5 -database = "badgerdb" +database = "goleveldb" persistent_peers = ["validator01"] perturb = ["pause"] block_sync = "v0" @@ -67,16 +67,16 @@ privval_protocol = "tcp" [node.validator05] block_sync = "v0" -database = "badgerdb" +database = "goleveldb" state_sync = "p2p" -start_at = 1005 # Becomes part of the validator set at 1010 +start_at = 1005 # Becomes part of the validator set at 1010 perturb = ["pause", "disconnect", "restart"] [node.full01] mode = "full" start_at = 1010 block_sync = "v0" -database = "boltdb" +database = "goleveldb" persistent_peers = ["validator01", "validator02", "validator03", "validator04"] perturb = ["restart"] retain_blocks = 10 diff --git a/test/e2e/networks/dashcore.toml b/test/e2e/networks/dashcore.toml index aa70916364..f07e2c02ef 100644 --- a/test/e2e/networks/dashcore.toml +++ b/test/e2e/networks/dashcore.toml @@ -56,7 +56,7 @@ privval_protocol = "dashcore" [node.validator02] seeds = ["seed01"] -database = "boltdb" +database = "goleveldb" abci_protocol = "tcp" privval_protocol = "dashcore" persist_interval = 0 @@ -64,7 +64,7 @@ perturb = ["restart"] [node.validator03] seeds = ["seed01"] -database = "badgerdb" +database = "goleveldb" # FIXME: should be grpc, disabled due to https://github.com/tendermint/tendermint/issues/5439 #abci_protocol = "grpc" privval_protocol = "dashcore" @@ -74,7 +74,7 @@ perturb = ["kill"] [node.validator04] persistent_peers = ["validator01"] -database = "badgerdb" +database = "goleveldb" abci_protocol = "builtin" privval_protocol = "dashcore" perturb = ["pause"] @@ -82,7 +82,7 @@ perturb = ["pause"] [node.validator05] start_at = 1005 # Becomes part of the validator set at 1010 seeds = ["seed01"] -database = "cleveldb" +database = "goleveldb" block_sync = "v0" state_sync = "p2p" privval_protocol = "dashcore" diff --git a/test/e2e/networks/island.toml b/test/e2e/networks/island.toml index 53fcc57b4a..3546dfbb96 100644 --- a/test/e2e/networks/island.toml +++ b/test/e2e/networks/island.toml @@ -1,5 +1,5 @@ initial_height = 1000 -initial_state = {items={ initial01 = "a", initial02 = "b", initial03 = "c" }} +initial_state = { items = { initial01 = "a", initial02 = "b", initial03 = "c" } } initial_core_chain_locked_height = 3400 [chainlock_updates] @@ -42,40 +42,40 @@ perturb = ["disconnect"] privval_protocol = "dashcore" [node.validator02] -database = "boltdb" +database = "goleveldb" abci_protocol = "tcp" privval_protocol = "dashcore" persist_interval = 0 perturb = ["restart"] [node.validator03] -database = "badgerdb" +database = "goleveldb" privval_protocol = "dashcore" persist_interval = 3 retain_blocks = 3 perturb = ["kill"] [node.validator04] -database = "badgerdb" +database = "goleveldb" abci_protocol = "builtin" privval_protocol = "dashcore" perturb = ["pause"] [node.validator05] start_at = 1005 -database = "cleveldb" +database = "goleveldb" fast_sync = "v0" privval_protocol = "dashcore" perturb = ["kill", "pause", "disconnect", "restart"] [node.validator06] -database = "cleveldb" +database = "goleveldb" fast_sync = "v0" privval_protocol = "dashcore" [node.validator07] start_at = 1005 -database = "cleveldb" +database = "goleveldb" fast_sync = "v0" privval_protocol = "dashcore" perturb = ["pause"] diff --git a/test/e2e/networks/rotate.toml b/test/e2e/networks/rotate.toml index 84a6c2d150..2e725ec190 100644 --- a/test/e2e/networks/rotate.toml +++ b/test/e2e/networks/rotate.toml @@ -120,7 +120,7 @@ privval_protocol = "dashcore" [node.validator02] seeds = ["seed01"] -database = "boltdb" +database = "goleveldb" abci_protocol = "tcp" privval_protocol = "dashcore" persist_interval = 0 @@ -128,7 +128,7 @@ perturb = ["restart"] [node.validator03] seeds = ["seed01"] -database = "badgerdb" +database = "goleveldb" privval_protocol = "dashcore" persist_interval = 3 retain_blocks = 10 @@ -136,14 +136,14 @@ perturb = ["kill"] [node.validator04] persistent_peers = ["validator01"] -database = "cleveldb" +database = "goleveldb" abci_protocol = "builtin" privval_protocol = "dashcore" perturb = ["pause"] [node.validator05] seeds = ["seed01"] -database = "cleveldb" +database = "goleveldb" privval_protocol = "dashcore" perturb = ["disconnect"] diff --git a/test/e2e/pkg/manifest.go b/test/e2e/pkg/manifest.go index d5a6531216..e44b714f5e 100644 --- a/test/e2e/pkg/manifest.go +++ b/test/e2e/pkg/manifest.go @@ -132,8 +132,8 @@ type ManifestNode struct { // this relates to the providers the light client is connected to. PersistentPeers []string `toml:"persistent_peers"` - // Database specifies the database backend: "goleveldb", "cleveldb", - // "rocksdb", "boltdb", or "badgerdb". Defaults to goleveldb. + // Database specifies the database backend; only "goleveldb" is supported. + // Defaults to "goleveldb". Database string `toml:"database"` // PrivvalProtocol specifies the protocol used to sign consensus messages: diff --git a/test/e2e/pkg/testnet.go b/test/e2e/pkg/testnet.go index afa6f7a1f3..a92b7816bd 100644 --- a/test/e2e/pkg/testnet.go +++ b/test/e2e/pkg/testnet.go @@ -536,7 +536,7 @@ func (n Node) Validate(testnet Testnet) error { return fmt.Errorf("unsupported p2p queue type: %s", n.QueueType) } switch n.Database { - case "goleveldb", "cleveldb", "boltdb", "badgerdb", "memdb": + case "goleveldb", "memdb": default: return fmt.Errorf("invalid database setting %q", n.Database) } diff --git a/test/e2e/tests/app_test.go b/test/e2e/tests/app_test.go index 2f63bd01a2..4ba8d7722d 100644 --- a/test/e2e/tests/app_test.go +++ b/test/e2e/tests/app_test.go @@ -11,9 +11,9 @@ import ( "testing" "time" + db "github.com/cometbft/cometbft-db" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - db "github.com/tendermint/tm-db" "github.com/dashpay/tenderdash/abci/example/code" "github.com/dashpay/tenderdash/abci/example/kvstore" diff --git a/test/fuzz/README.md b/test/fuzz/README.md index c0d1414924..33921291b2 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.23. +Go 1.23.2. Inputs: 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 94c9663489..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 crypto.QuorumHash) *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, crypto.QuorumHash) *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) (crypto.QuorumHash, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetFirstQuorumHash") - } - - var r0 crypto.QuorumHash - var r1 error - 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) crypto.QuorumHash); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.QuorumHash) - } - } - - 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 crypto.QuorumHash) (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, crypto.QuorumHash) (int64, error)); ok { - return rf(ctx, quorumHash) - } - 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, crypto.QuorumHash) 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 crypto.QuorumHash) (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, crypto.QuorumHash) (crypto.PrivKey, error)); ok { - return rf(ctx, quorumHash) - } - if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) 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, crypto.QuorumHash) 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) (crypto.ProTxHash, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetProTxHash") - } - - var r0 crypto.ProTxHash - var r1 error - 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) crypto.ProTxHash); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.ProTxHash) - } - } - - 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 crypto.QuorumHash) (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, crypto.QuorumHash) (crypto.PubKey, error)); ok { - return rf(ctx, quorumHash) - } - if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) 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, crypto.QuorumHash) 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 crypto.QuorumHash) (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, crypto.QuorumHash) (crypto.PubKey, error)); ok { - return rf(ctx, quorumHash) - } - if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) 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, crypto.QuorumHash) 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 crypto.QuorumHash, 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, 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, crypto.QuorumHash, *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, crypto.QuorumHash, *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 crypto.QuorumHash, 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, crypto.QuorumHash, *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 crypto.QuorumHash, 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..f875b0c42e --- /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 crypto.QuorumHash) *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, crypto.QuorumHash) *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 crypto.QuorumHash +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 crypto.QuorumHash)) *PrivValidator_ExtractIntoValidator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(crypto.QuorumHash)) + }) + 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, crypto.QuorumHash) *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) (crypto.QuorumHash, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetFirstQuorumHash") + } + + var r0 crypto.QuorumHash + var r1 error + 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) crypto.QuorumHash); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(crypto.QuorumHash) + } + } + + 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 crypto.QuorumHash, _a1 error) *PrivValidator_GetFirstQuorumHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_GetFirstQuorumHash_Call) RunAndReturn(run func(context.Context) (crypto.QuorumHash, 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 crypto.QuorumHash) (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, crypto.QuorumHash) (int64, error)); ok { + return rf(ctx, quorumHash) + } + 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, crypto.QuorumHash) 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 crypto.QuorumHash +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 crypto.QuorumHash)) *PrivValidator_GetHeight_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(crypto.QuorumHash)) + }) + 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, crypto.QuorumHash) (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 crypto.QuorumHash) (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, crypto.QuorumHash) (crypto.PrivKey, error)); ok { + return rf(ctx, quorumHash) + } + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) 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, crypto.QuorumHash) 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 crypto.QuorumHash +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 crypto.QuorumHash)) *PrivValidator_GetPrivateKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(crypto.QuorumHash)) + }) + 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, crypto.QuorumHash) (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) (crypto.ProTxHash, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetProTxHash") + } + + var r0 crypto.ProTxHash + var r1 error + 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) crypto.ProTxHash); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(crypto.ProTxHash) + } + } + + 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 crypto.ProTxHash, _a1 error) *PrivValidator_GetProTxHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrivValidator_GetProTxHash_Call) RunAndReturn(run func(context.Context) (crypto.ProTxHash, 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 crypto.QuorumHash) (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, crypto.QuorumHash) (crypto.PubKey, error)); ok { + return rf(ctx, quorumHash) + } + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) 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, crypto.QuorumHash) 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 crypto.QuorumHash +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 crypto.QuorumHash)) *PrivValidator_GetPubKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(crypto.QuorumHash)) + }) + 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, crypto.QuorumHash) (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 crypto.QuorumHash) (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, crypto.QuorumHash) (crypto.PubKey, error)); ok { + return rf(ctx, quorumHash) + } + if rf, ok := ret.Get(0).(func(context.Context, crypto.QuorumHash) 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, crypto.QuorumHash) 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 crypto.QuorumHash +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 crypto.QuorumHash)) *PrivValidator_GetThresholdPublicKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(crypto.QuorumHash)) + }) + 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, crypto.QuorumHash) (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 crypto.QuorumHash, 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, 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, crypto.QuorumHash, *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, crypto.QuorumHash, *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 crypto.QuorumHash +// - 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 crypto.QuorumHash, 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].(crypto.QuorumHash), 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, crypto.QuorumHash, *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 crypto.QuorumHash, 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, crypto.QuorumHash, *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 crypto.QuorumHash +// - 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 crypto.QuorumHash, 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].(crypto.QuorumHash), 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, crypto.QuorumHash, *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 crypto.QuorumHash, 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 crypto.QuorumHash +// - 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 crypto.QuorumHash, 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].(crypto.QuorumHash), 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, crypto.QuorumHash, crypto.PubKey, int64)) *PrivValidator_UpdatePrivateKey_Call { + _c.Run(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 +} diff --git a/version/version.go b/version/version.go index 1de4be5fbb..6d8435e82e 100644 --- a/version/version.go +++ b/version/version.go @@ -9,7 +9,7 @@ var ( const ( // TMVersionDefault is the used as the fallback version for Tenderdash // when not using git describe. It is formatted with semantic versioning. - TMVersionDefault = "1.3.1" + TMVersionDefault = "1.3.2" // ABCISemVer is the semantic version of the ABCI library ABCISemVer = "1.2.0"