From dc8f027c591deb9b7d5dc601566f07d0f29384a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Tue, 4 Jun 2024 15:36:31 -0700 Subject: [PATCH 1/5] update to Go 1.22 --- .github/workflows/cd.yml | 7 ++++-- .github/workflows/ci.yml | 4 ++-- .github/workflows/flaky-test-monitor.yml | 2 +- .github/workflows/tools.yml | 5 ++++- cmd/Dockerfile | 4 ++-- cmd/testclient/go.mod | 2 +- crypto/go.mod | 2 +- go.mod | 2 +- go.sum | 16 +++++++++++++ insecure/go.mod | 2 +- insecure/go.sum | 22 ++++++++++++++++++ integration/benchmark/cmd/manual/Dockerfile | 2 +- integration/go.mod | 2 +- integration/go.sum | 25 +++++++++++++++++++++ integration/localnet/client/Dockerfile | 2 +- 15 files changed, 84 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3efb672e568..b708d0b973c 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -2,10 +2,13 @@ name: CD on: push: - tags: + tags: - '*' - "!daily-*" +env: + GO_VERSION: "1.22" + jobs: docker-push: name: Push to container registry @@ -15,7 +18,7 @@ jobs: uses: actions/setup-go@v4 timeout-minutes: 10 # fail fast. sometimes this step takes an extremely long time with: - go-version: "1.20" + go-version: ${{ env.GO_VERSION }} - name: Checkout repo uses: actions/checkout@v2 # Provide Google Service Account credentials to Github Action, allowing interaction with the Google Container Registry diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e46705b6f4a..be29269b9e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ on: - master env: - GO_VERSION: "1.20" + GO_VERSION: "1.22" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} @@ -54,7 +54,7 @@ jobs: working-directory: ${{ matrix.dir }} # https://github.com/golangci/golangci-lint-action/issues/244 skip-cache: true - + tidy: name: Tidy diff --git a/.github/workflows/flaky-test-monitor.yml b/.github/workflows/flaky-test-monitor.yml index 146408c67ee..e9d55f75164 100644 --- a/.github/workflows/flaky-test-monitor.yml +++ b/.github/workflows/flaky-test-monitor.yml @@ -13,7 +13,7 @@ env: BIGQUERY_DATASET: production_src_flow_test_metrics BIGQUERY_TABLE: skipped_tests BIGQUERY_TABLE2: test_results - GO_VERSION: "1.20" + GO_VERSION: "1.22" SKIPPED_TESTS_FILE: skipped-tests RESULTS_FILE: test-results COMMIT_SHA: ${{ github.sha }} diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 91555d0336b..b94d76dd3d6 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -13,6 +13,9 @@ on: required: false type: boolean +env: + GO_VERSION: "1.22" + jobs: build-publish: name: Build boot tools @@ -31,7 +34,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: ${{ env.GO_VERSION }} - name: Checkout repo uses: actions/checkout@v3 with: diff --git a/cmd/Dockerfile b/cmd/Dockerfile index 5a746b3bd70..d0f5cc5e74f 100644 --- a/cmd/Dockerfile +++ b/cmd/Dockerfile @@ -3,7 +3,7 @@ #################################### ## (1) Setup the build environment -FROM golang:1.20-bullseye AS build-setup +FROM golang:1.22-bullseye AS build-setup RUN apt-get update RUN apt-get -y install zip apt-utils gcc-aarch64-linux-gnu @@ -85,7 +85,7 @@ RUN --mount=type=ssh \ RUN chmod a+x /app/app ## (4) Add the statically linked debug binary to a distroless image configured for debugging -FROM golang:1.20-bullseye as debug +FROM golang:1.22-bullseye as debug RUN go install github.com/go-delve/delve/cmd/dlv@latest diff --git a/cmd/testclient/go.mod b/cmd/testclient/go.mod index 3871be24e82..9da44bb5ee1 100644 --- a/cmd/testclient/go.mod +++ b/cmd/testclient/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/cmd/testclient -go 1.20 +go 1.22 require ( github.com/onflow/flow-go-sdk v0.4.1 diff --git a/crypto/go.mod b/crypto/go.mod index 6b81958273c..e9602fbe202 100644 --- a/crypto/go.mod +++ b/crypto/go.mod @@ -1,4 +1,4 @@ // Deprecated: The latest supported version is v0.25.0. The module then migrated to github.com/onflow/crypto. Use the new module github.com/onflow/crypto instead. module github.com/onflow/flow-go/crypto -go 1.20 +go 1.22 diff --git a/go.mod b/go.mod index c193d88e54d..504ee5c5ae6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go -go 1.20 +go 1.22 require ( cloud.google.com/go/compute/metadata v0.2.3 diff --git a/go.sum b/go.sum index 3874c9dfe80..d664967adfa 100644 --- a/go.sum +++ b/go.sum @@ -1179,6 +1179,7 @@ github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= @@ -1331,6 +1332,7 @@ github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6Ni github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= 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/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= @@ -1360,6 +1362,7 @@ github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiD github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= 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= @@ -1393,6 +1396,7 @@ github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/ github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ= github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -1402,6 +1406,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= 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-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/latin-modern v0.3.0/go.mod h1:ysEQXnuT/sCDOAONxC7ImeEDVINbltClhasMAqEtRK0= @@ -1446,6 +1451,7 @@ github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhO github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -1468,10 +1474,13 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4 github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk= +github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -1663,6 +1672,7 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -1791,6 +1801,7 @@ github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46U github.com/ipfs/go-ds-badger2 v0.1.3 h1:Zo9JicXJ1DmXTN4KOw7oPXkspZ0AWHcAFCP1tQKnegg= github.com/ipfs/go-ds-badger2 v0.1.3/go.mod h1:TPhhljfrgewjbtuL/tczP8dNrBYwwk+SdPYbms/NO9w= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= +github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= @@ -1959,6 +1970,7 @@ github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvN github.com/libp2p/go-libp2p-routing-helpers v0.7.3 h1:u1LGzAMVRK9Nqq5aYDVOiq/HaB93U9WWczBzGyAC5ZY= github.com/libp2p/go-libp2p-routing-helpers v0.7.3/go.mod h1:cN4mJAD/7zfPKXBcs9ze31JGYAZgzdABEm+q/hkswb8= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= +github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= @@ -2203,6 +2215,7 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= @@ -2503,6 +2516,7 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -2526,6 +2540,7 @@ github.com/vmihailenco/msgpack/v4 v4.3.11/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+ github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= +github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= @@ -2619,6 +2634,7 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= 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.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= diff --git a/insecure/go.mod b/insecure/go.mod index 469414ee0bb..32c34443ab4 100644 --- a/insecure/go.mod +++ b/insecure/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/insecure -go 1.20 +go 1.22 require ( github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 diff --git a/insecure/go.sum b/insecure/go.sum index f160586c933..944bfc6ff2c 100644 --- a/insecure/go.sum +++ b/insecure/go.sum @@ -671,6 +671,7 @@ cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPi cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= cloud.google.com/go/profiler v0.3.0 h1:R6y/xAeifaUXxd2x6w+jIwKxoKl8Cv5HJvcvASTPWJo= +cloud.google.com/go/profiler v0.3.0/go.mod h1:9wYk9eY4iZHsev8TQb61kh3wiOiSyz/xOYixWPzweCU= 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= @@ -980,6 +981,7 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= +github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc h1:DCHzPQOcU/7gwDTWbFQZc5qHMPS1g0xTO56k8NXsv9M= github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc/go.mod h1:LJM5a3zcIJ/8TmZwlUczvROEJT8ntOdhdG9jjcR1B0I= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= @@ -1176,6 +1178,7 @@ github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= @@ -1328,6 +1331,7 @@ github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6Ni github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= 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/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= @@ -1355,6 +1359,7 @@ github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiD github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= 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= @@ -1388,6 +1393,7 @@ github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/ github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= @@ -1395,6 +1401,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= 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-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/latin-modern v0.3.0/go.mod h1:ysEQXnuT/sCDOAONxC7ImeEDVINbltClhasMAqEtRK0= @@ -1439,6 +1446,7 @@ github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhO github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -1461,10 +1469,13 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4 github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk= +github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -1654,6 +1665,7 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -1783,6 +1795,7 @@ github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46U github.com/ipfs/go-ds-badger2 v0.1.3 h1:Zo9JicXJ1DmXTN4KOw7oPXkspZ0AWHcAFCP1tQKnegg= github.com/ipfs/go-ds-badger2 v0.1.3/go.mod h1:TPhhljfrgewjbtuL/tczP8dNrBYwwk+SdPYbms/NO9w= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= +github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= @@ -1951,6 +1964,7 @@ github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvN github.com/libp2p/go-libp2p-routing-helpers v0.7.3 h1:u1LGzAMVRK9Nqq5aYDVOiq/HaB93U9WWczBzGyAC5ZY= github.com/libp2p/go-libp2p-routing-helpers v0.7.3/go.mod h1:cN4mJAD/7zfPKXBcs9ze31JGYAZgzdABEm+q/hkswb8= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= +github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= @@ -2133,6 +2147,7 @@ github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 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/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -2185,6 +2200,7 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= @@ -2482,6 +2498,7 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -2505,6 +2522,7 @@ github.com/vmihailenco/msgpack/v4 v4.3.11/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+ github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= +github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= @@ -2600,6 +2618,7 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= 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.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -3459,6 +3478,7 @@ google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cba google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240125205218-1f4bbc51befe h1:weYsP+dNijSQVoLAb5bpUos3ciBpNU/NEVlHFKrk8pg= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:SCz6T5xjNXM4QFPRwxHcfChp7V+9DcXR3ay2TkHR8Tg= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= @@ -3604,6 +3624,7 @@ gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -3673,6 +3694,7 @@ nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/integration/benchmark/cmd/manual/Dockerfile b/integration/benchmark/cmd/manual/Dockerfile index 49989db4c68..928b25766de 100644 --- a/integration/benchmark/cmd/manual/Dockerfile +++ b/integration/benchmark/cmd/manual/Dockerfile @@ -1,7 +1,7 @@ # syntax = docker/dockerfile:experimental # NOTE: Must be run in the context of the repo's root directory -FROM golang:1.20-buster AS build-setup +FROM golang:1.22-buster AS build-setup RUN apt-get update RUN apt-get -y install zip diff --git a/integration/go.mod b/integration/go.mod index 3a39fb7bd3e..f56a4e21f4f 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/integration -go 1.20 +go 1.22 require ( cloud.google.com/go/bigquery v1.59.1 diff --git a/integration/go.sum b/integration/go.sum index 0d21eeb7b61..f56c9bb207d 100644 --- a/integration/go.sum +++ b/integration/go.sum @@ -306,6 +306,7 @@ cloud.google.com/go/datacatalog v1.17.1/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/U cloud.google.com/go/datacatalog v1.18.0/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= cloud.google.com/go/datacatalog v1.19.3 h1:A0vKYCQdxQuV4Pi0LL9p39Vwvg4jH5yYveMv50gU5Tw= +cloud.google.com/go/datacatalog v1.19.3/go.mod h1:ra8V3UAsciBpJKQ+z9Whkxzxv7jmQg1hfODr3N3YPJ4= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= @@ -552,6 +553,7 @@ cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPk cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= +cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= @@ -675,6 +677,7 @@ cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPi cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= cloud.google.com/go/profiler v0.3.0 h1:R6y/xAeifaUXxd2x6w+jIwKxoKl8Cv5HJvcvASTPWJo= +cloud.google.com/go/profiler v0.3.0/go.mod h1:9wYk9eY4iZHsev8TQb61kh3wiOiSyz/xOYixWPzweCU= 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= @@ -988,6 +991,7 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= +github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc h1:DCHzPQOcU/7gwDTWbFQZc5qHMPS1g0xTO56k8NXsv9M= @@ -1020,6 +1024,7 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= @@ -1030,6 +1035,7 @@ github.com/apache/arrow/go/v14 v14.0.2/go.mod h1:u3fgh3EdgN/YQ8cVQRguVW3R+seMybF github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2 v1.9.0/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= @@ -1177,6 +1183,7 @@ github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= @@ -1324,6 +1331,7 @@ github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0 github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4= github.com/elastic/gosigar v0.14.2/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -1347,6 +1355,7 @@ github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6Ni github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= 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/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= @@ -1373,6 +1382,7 @@ github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzP github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= 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= @@ -1405,12 +1415,14 @@ github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= 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-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/latin-modern v0.3.0/go.mod h1:ysEQXnuT/sCDOAONxC7ImeEDVINbltClhasMAqEtRK0= @@ -1423,6 +1435,7 @@ github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmS github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -1460,6 +1473,7 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= @@ -1668,6 +1682,7 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= @@ -1772,6 +1787,7 @@ github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46U github.com/ipfs/go-ds-badger2 v0.1.3 h1:Zo9JicXJ1DmXTN4KOw7oPXkspZ0AWHcAFCP1tQKnegg= github.com/ipfs/go-ds-badger2 v0.1.3/go.mod h1:TPhhljfrgewjbtuL/tczP8dNrBYwwk+SdPYbms/NO9w= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= +github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= @@ -1946,6 +1962,7 @@ github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvN github.com/libp2p/go-libp2p-routing-helpers v0.7.3 h1:u1LGzAMVRK9Nqq5aYDVOiq/HaB93U9WWczBzGyAC5ZY= github.com/libp2p/go-libp2p-routing-helpers v0.7.3/go.mod h1:cN4mJAD/7zfPKXBcs9ze31JGYAZgzdABEm+q/hkswb8= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= +github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= @@ -2123,6 +2140,7 @@ github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 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/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= @@ -2167,11 +2185,13 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -2480,6 +2500,7 @@ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgq github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= +github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= @@ -2575,6 +2596,7 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= 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.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -3421,6 +3443,7 @@ google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cba google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240125205218-1f4bbc51befe h1:weYsP+dNijSQVoLAb5bpUos3ciBpNU/NEVlHFKrk8pg= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:SCz6T5xjNXM4QFPRwxHcfChp7V+9DcXR3ay2TkHR8Tg= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= @@ -3560,6 +3583,7 @@ gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= @@ -3638,6 +3662,7 @@ modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/integration/localnet/client/Dockerfile b/integration/localnet/client/Dockerfile index 4908e287624..4711da33a71 100644 --- a/integration/localnet/client/Dockerfile +++ b/integration/localnet/client/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20 +FROM golang:1.22 COPY flow-localnet.json /go From a0a28ac91b8c59691660d3adfccbc030fa00af5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Tue, 4 Jun 2024 15:43:34 -0700 Subject: [PATCH 2/5] run Go generate on all packages --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be29269b9e9..e43b3089606 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: go-version: ${{ env.GO_VERSION }} cache: true - name: Run go generate - run: go generate + run: go generate ./... working-directory: ${{ matrix.dir }} - name: Run golangci-lint uses: golangci/golangci-lint-action@v3 From 598f39a70f2c04387ecd3b6bc8fee588fc710c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Tue, 4 Jun 2024 15:49:09 -0700 Subject: [PATCH 3/5] go mod tidy --- cmd/testclient/go.sum | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/testclient/go.sum b/cmd/testclient/go.sum index d3e0cc04f9d..2db914dd65b 100644 --- a/cmd/testclient/go.sum +++ b/cmd/testclient/go.sum @@ -80,6 +80,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -95,9 +96,11 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB 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/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 h1:bqDmpDG49ZRnB5PcgP0RXtQvnMSgIF14M7CBd2shtXs= @@ -155,6 +158,7 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/robertkrimen/otto v0.0.0-20170205013659-6a77b7cbc37d/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -172,6 +176,7 @@ github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUW github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= From 4e815905f47cf4ac623e04d26982b6f89d0ee72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Tue, 4 Jun 2024 16:18:57 -0700 Subject: [PATCH 4/5] update mockery --- Makefile | 14 +- access/mock/api.go | 179 +++++++++++- .../mock/get_state_commitment_func.go | 15 +- .../ledger/reporters/mock/report_writer.go | 11 +- .../reporters/mock/report_writer_factory.go | 15 +- consensus/hotstuff/mocks/block_producer.go | 15 +- .../hotstuff/mocks/block_signer_decoder.go | 15 +- .../hotstuff/mocks/communicator_consumer.go | 11 +- consensus/hotstuff/mocks/consumer.go | 11 +- consensus/hotstuff/mocks/dkg.go | 27 +- consensus/hotstuff/mocks/dynamic_committee.go | 47 ++- consensus/hotstuff/mocks/event_handler.go | 39 ++- consensus/hotstuff/mocks/event_loop.go | 19 +- .../hotstuff/mocks/finalization_consumer.go | 11 +- consensus/hotstuff/mocks/follower_consumer.go | 11 +- consensus/hotstuff/mocks/forks.go | 39 ++- consensus/hotstuff/mocks/on_qc_created.go | 11 +- consensus/hotstuff/mocks/pace_maker.go | 39 ++- consensus/hotstuff/mocks/packer.go | 19 +- .../hotstuff/mocks/participant_consumer.go | 11 +- consensus/hotstuff/mocks/persister.go | 27 +- .../mocks/proposal_duration_provider.go | 15 +- .../mocks/proposal_violation_consumer.go | 11 +- .../hotstuff/mocks/random_beacon_inspector.go | 27 +- .../mocks/random_beacon_reconstructor.go | 27 +- consensus/hotstuff/mocks/replicas.go | 39 ++- consensus/hotstuff/mocks/safety_rules.go | 19 +- consensus/hotstuff/mocks/signer.go | 23 +- .../mocks/timeout_aggregation_consumer.go | 11 +- .../timeout_aggregation_violation_consumer.go | 11 +- .../hotstuff/mocks/timeout_aggregator.go | 19 +- consensus/hotstuff/mocks/timeout_collector.go | 19 +- .../mocks/timeout_collector_consumer.go | 11 +- .../mocks/timeout_collector_factory.go | 15 +- .../hotstuff/mocks/timeout_collectors.go | 15 +- consensus/hotstuff/mocks/timeout_processor.go | 15 +- .../mocks/timeout_processor_factory.go | 15 +- .../mocks/timeout_signature_aggregator.go | 27 +- consensus/hotstuff/mocks/validator.go | 27 +- consensus/hotstuff/mocks/verifier.go | 23 +- .../mocks/verifying_vote_processor.go | 23 +- .../mocks/vote_aggregation_consumer.go | 11 +- .../vote_aggregation_violation_consumer.go | 11 +- consensus/hotstuff/mocks/vote_aggregator.go | 23 +- consensus/hotstuff/mocks/vote_collector.go | 27 +- .../hotstuff/mocks/vote_collector_consumer.go | 11 +- consensus/hotstuff/mocks/vote_collectors.go | 23 +- consensus/hotstuff/mocks/vote_consumer.go | 11 +- consensus/hotstuff/mocks/vote_processor.go | 19 +- .../hotstuff/mocks/vote_processor_factory.go | 15 +- .../mocks/weighted_signature_aggregator.go | 27 +- consensus/hotstuff/mocks/workerpool.go | 11 +- consensus/hotstuff/mocks/workers.go | 11 +- engine/access/mock/access_api_client.go | 179 +++++++++++- engine/access/mock/access_api_server.go | 179 +++++++++++- engine/access/mock/execution_api_client.go | 63 +++- engine/access/mock/execution_api_server.go | 63 +++- .../access/rpc/backend/mock/communicator.go | 15 +- .../rpc/connection/mock/connection_factory.go | 23 +- engine/access/state_stream/mock/api.go | 63 +++- .../access/subscription/mock/block_tracker.go | 31 +- .../mock/execution_data_tracker.go | 31 +- .../epochmgr/mock/epoch_components_factory.go | 15 +- engine/collection/mock/cluster_events.go | 11 +- engine/collection/mock/compliance.go | 19 +- engine/collection/mock/engine_events.go | 11 +- engine/collection/rpc/mock/backend.go | 15 +- .../follower/cache/mock/on_entity_ejected.go | 11 +- .../common/follower/mock/compliance_core.go | 23 +- .../approvals/mock/assignment_collector.go | 51 +++- .../mock/assignment_collector_state.go | 47 ++- engine/consensus/mock/compliance.go | 19 +- engine/consensus/mock/matching_core.go | 19 +- engine/consensus/mock/sealing_core.go | 23 +- engine/consensus/mock/sealing_observation.go | 11 +- engine/consensus/mock/sealing_tracker.go | 15 +- .../computer/mock/block_computer.go | 15 +- .../mock/transaction_write_behind_logger.go | 11 +- .../computer/mock/view_committer.go | 15 +- .../computation/mock/computation_manager.go | 23 +- .../query/mock/entropy_provider_per_block.go | 15 +- .../computation/query/mock/executor.go | 19 +- .../execution/mock/executed_finalized_wal.go | 23 +- .../mock/extendable_storage_snapshot.go | 23 +- engine/execution/mock/finalized_reader.go | 15 +- .../mock/in_memory_register_store.go | 35 ++- engine/execution/mock/register_store.go | 31 +- .../execution/mock/register_store_notifier.go | 11 +- engine/execution/mock/script_executor.go | 23 +- engine/execution/mock/wal_reader.go | 15 +- .../provider/mock/provider_engine.go | 27 +- .../execution/state/mock/execution_state.go | 51 +++- .../state/mock/finalized_execution_state.go | 15 +- .../state/mock/read_only_execution_state.go | 39 ++- .../state/mock/register_updates_holder.go | 19 +- .../state/mock/script_execution_state.go | 27 +- engine/protocol/mock/api.go | 55 +++- .../fetcher/mock/assigned_chunk_processor.go | 19 +- .../fetcher/mock/chunk_data_pack_handler.go | 11 +- .../fetcher/mock/chunk_data_pack_requester.go | 19 +- fvm/environment/mock/account_creator.go | 15 +- fvm/environment/mock/account_info.go | 31 +- fvm/environment/mock/account_key_reader.go | 19 +- fvm/environment/mock/account_key_updater.go | 19 +- .../mock/account_local_id_generator.go | 15 +- fvm/environment/mock/accounts.go | 79 ++++- fvm/environment/mock/address_generator.go | 27 +- fvm/environment/mock/block_info.go | 19 +- fvm/environment/mock/blocks.go | 15 +- .../mock/bootstrap_account_creator.go | 15 +- .../mock/contract_function_invoker.go | 15 +- fvm/environment/mock/contract_updater.go | 23 +- .../mock/contract_updater_stubs.go | 23 +- fvm/environment/mock/crypto_library.go | 35 ++- fvm/environment/mock/entropy_provider.go | 15 +- fvm/environment/mock/environment.go | 271 +++++++++++++++++- fvm/environment/mock/event_emitter.go | 27 +- fvm/environment/mock/event_encoder.go | 15 +- fvm/environment/mock/meter.go | 47 ++- fvm/environment/mock/metrics_reporter.go | 11 +- fvm/environment/mock/random_generator.go | 15 +- .../mock/random_source_history_provider.go | 15 +- fvm/environment/mock/transaction_info.go | 35 ++- fvm/environment/mock/uuid_generator.go | 15 +- fvm/environment/mock/value_store.go | 27 +- fvm/mock/bootstrap_procedure_option.go | 15 +- fvm/mock/option.go | 15 +- fvm/mock/procedure.go | 35 ++- fvm/mock/procedure_executor.go | 23 +- fvm/mock/vm.go | 23 +- fvm/storage/snapshot/mock/storage_snapshot.go | 15 +- insecure/mock/attack_orchestrator.go | 19 +- insecure/mock/corrupt_conduit_factory.go | 31 +- ...orrupt_network__connect_attacker_client.go | 39 ++- ...orrupt_network__connect_attacker_server.go | 35 ++- ...etwork__process_attacker_message_client.go | 43 ++- ...etwork__process_attacker_message_server.go | 39 ++- insecure/mock/corrupt_network_client.go | 19 +- insecure/mock/corrupt_network_server.go | 19 +- insecure/mock/corrupted_node_connection.go | 19 +- insecure/mock/corrupted_node_connector.go | 15 +- insecure/mock/egress_controller.go | 19 +- insecure/mock/ingress_controller.go | 15 +- insecure/mock/orchestrator_network.go | 27 +- integration/benchmark/mock/client.go | 135 ++++++++- ledger/mock/ledger.go | 43 ++- ledger/mock/migration.go | 15 +- ledger/mock/reporter.go | 19 +- model/fingerprint/mock/fingerprinter.go | 15 +- module/component/mock/component.go | 19 +- module/component/mock/component_factory.go | 15 +- .../mock/component_manager_builder.go | 19 +- module/component/mock/component_worker.go | 11 +- module/component/mock/ready_func.go | 11 +- module/execution/mock/script_executor.go | 19 +- .../execution_data/mock/downloader.go | 23 +- .../mock/execution_data_store.go | 19 +- .../executiondatasync/tracker/mock/storage.go | 31 +- module/forest/mock/vertex.go | 23 +- .../mempool/consensus/mock/exec_fork_actor.go | 11 +- module/mempool/mock/assignments.go | 35 ++- module/mempool/mock/back_data.go | 55 +++- module/mempool/mock/block_filter.go | 15 +- module/mempool/mock/blocks.go | 39 ++- module/mempool/mock/chunk_data_packs.go | 35 ++- .../chunk_request_history_updater_func.go | 15 +- module/mempool/mock/chunk_requests.go | 43 ++- module/mempool/mock/chunk_statuses.go | 31 +- module/mempool/mock/collections.go | 35 ++- module/mempool/mock/dns_cache.go | 55 +++- module/mempool/mock/execution_data.go | 35 ++- module/mempool/mock/execution_tree.go | 39 ++- module/mempool/mock/guarantees.go | 35 ++- module/mempool/mock/identifier_map.go | 39 ++- .../mempool/mock/incorporated_result_seals.go | 39 ++- module/mempool/mock/on_ejection.go | 11 +- module/mempool/mock/pending_receipts.go | 27 +- module/mempool/mock/receipt_filter.go | 15 +- module/mempool/mock/results.go | 35 ++- module/mempool/mock/transaction_timings.go | 31 +- module/mempool/mock/transactions.go | 35 ++- module/mock/access_metrics.go | 11 +- module/mock/alsp_metrics.go | 11 +- module/mock/backend_scripts_metrics.go | 11 +- module/mock/bitswap_metrics.go | 11 +- module/mock/block_requester.go | 11 +- module/mock/builder.go | 15 +- module/mock/cache_metrics.go | 11 +- module/mock/chain_sync_metrics.go | 11 +- module/mock/chunk_assigner.go | 15 +- module/mock/chunk_verifier.go | 15 +- module/mock/cleaner_metrics.go | 11 +- module/mock/cluster_root_qc_voter.go | 15 +- module/mock/collection_executed_metric.go | 11 +- module/mock/collection_metrics.go | 11 +- module/mock/compliance_metrics.go | 11 +- module/mock/consensus_metrics.go | 11 +- module/mock/cruise_ctl_metrics.go | 11 +- module/mock/dht_metrics.go | 11 +- module/mock/dkg_broker.go | 31 +- module/mock/dkg_contract_client.go | 23 +- module/mock/dkg_controller.go | 43 ++- module/mock/dkg_controller_factory.go | 15 +- module/mock/engine_metrics.go | 11 +- module/mock/entries_func.go | 15 +- module/mock/epoch_lookup.go | 15 +- .../mock/execution_data_provider_metrics.go | 11 +- module/mock/execution_data_pruner_metrics.go | 11 +- .../mock/execution_data_requester_metrics.go | 11 +- .../execution_data_requester_v2_metrics.go | 11 +- module/mock/execution_metrics.go | 11 +- .../mock/execution_state_indexer_metrics.go | 11 +- module/mock/finalized_header_cache.go | 15 +- module/mock/finalizer.go | 15 +- module/mock/gossip_sub_metrics.go | 11 +- .../mock/gossip_sub_rpc_inspector_metrics.go | 11 +- ...ip_sub_rpc_validation_inspector_metrics.go | 11 +- module/mock/gossip_sub_scoring_metrics.go | 11 +- .../gossip_sub_scoring_registry_metrics.go | 11 +- module/mock/grpc_connection_pool_metrics.go | 11 +- module/mock/hero_cache_metrics.go | 11 +- module/mock/hot_stuff.go | 19 +- module/mock/hot_stuff_follower.go | 19 +- module/mock/hotstuff_metrics.go | 11 +- module/mock/identifier_provider.go | 15 +- module/mock/identity_provider.go | 23 +- module/mock/job.go | 15 +- module/mock/job_consumer.go | 27 +- module/mock/job_queue.go | 15 +- module/mock/jobs.go | 19 +- module/mock/ledger_metrics.go | 11 +- module/mock/lib_p2_p_connection_metrics.go | 11 +- module/mock/lib_p2_p_metrics.go | 11 +- module/mock/local.go | 31 +- .../mock/local_gossip_sub_router_metrics.go | 11 +- module/mock/machine_account_metrics.go | 11 +- module/mock/mempool_metrics.go | 15 +- module/mock/network_core_metrics.go | 11 +- module/mock/network_inbound_queue_metrics.go | 11 +- module/mock/network_metrics.go | 11 +- module/mock/network_security_metrics.go | 11 +- module/mock/new_job_listener.go | 11 +- module/mock/pending_block_buffer.go | 27 +- module/mock/pending_cluster_block_buffer.go | 27 +- module/mock/ping_metrics.go | 11 +- module/mock/processing_notifier.go | 11 +- module/mock/provider_metrics.go | 11 +- module/mock/qc_contract_client.go | 19 +- module/mock/random_beacon_key_store.go | 15 +- .../mock/rate_limited_blockstore_metrics.go | 11 +- module/mock/ready_done_aware.go | 19 +- module/mock/receipt_validator.go | 19 +- module/mock/requester.go | 11 +- module/mock/resolver_metrics.go | 11 +- module/mock/rest_metrics.go | 11 +- module/mock/runtime_metrics.go | 11 +- module/mock/sdk_client_wrapper.go | 39 ++- module/mock/seal_validator.go | 15 +- module/mock/sealing_configs_getter.go | 31 +- module/mock/sealing_configs_setter.go | 35 ++- module/mock/startable.go | 11 +- module/mock/sync_core.go | 23 +- module/mock/tracer.go | 47 ++- module/mock/transaction_metrics.go | 11 +- module/mock/unicast_manager_metrics.go | 11 +- module/mock/verification_metrics.go | 11 +- module/mock/wal_metrics.go | 11 +- .../mock/execution_data_requester.go | 23 +- .../mock/index_reporter.go | 19 +- network/alsp/mock/misbehavior_report_opt.go | 15 +- network/alsp/mock/spam_record_cache.go | 31 +- network/mocknetwork/basic_resolver.go | 19 +- network/mocknetwork/blob_getter.go | 19 +- network/mocknetwork/blob_service.go | 47 ++- network/mocknetwork/blob_service_option.go | 11 +- network/mocknetwork/codec.go | 27 +- network/mocknetwork/compressor.go | 19 +- network/mocknetwork/conduit.go | 27 +- network/mocknetwork/conduit_adapter.go | 27 +- network/mocknetwork/conduit_factory.go | 19 +- network/mocknetwork/connection.go | 19 +- network/mocknetwork/connector.go | 11 +- network/mocknetwork/connector_factory.go | 15 +- network/mocknetwork/connector_host.go | 35 ++- network/mocknetwork/decoder.go | 15 +- .../disallow_list_notification_consumer.go | 11 +- network/mocknetwork/encoder.go | 15 +- network/mocknetwork/engine.go | 27 +- network/mocknetwork/engine_registry.go | 31 +- network/mocknetwork/incoming_message_scope.go | 47 ++- network/mocknetwork/message_processor.go | 15 +- network/mocknetwork/message_queue.go | 23 +- network/mocknetwork/message_validator.go | 15 +- network/mocknetwork/misbehavior_report.go | 23 +- .../misbehavior_report_consumer.go | 11 +- .../mocknetwork/misbehavior_report_manager.go | 19 +- network/mocknetwork/misbehavior_reporter.go | 11 +- network/mocknetwork/outgoing_message_scope.go | 31 +- network/mocknetwork/ping_info_provider.go | 23 +- network/mocknetwork/ping_service.go | 15 +- network/mocknetwork/subscription_manager.go | 27 +- network/mocknetwork/topology.go | 15 +- network/mocknetwork/underlay.go | 27 +- network/mocknetwork/violations_consumer.go | 11 +- network/mocknetwork/write_close_flusher.go | 23 +- network/p2p/mock/basic_rate_limiter.go | 23 +- .../collection_cluster_changes_consumer.go | 11 +- network/p2p/mock/connection_gater.go | 31 +- network/p2p/mock/connector.go | 11 +- network/p2p/mock/connector_factory.go | 15 +- network/p2p/mock/connector_host.go | 35 ++- network/p2p/mock/core_p2_p.go | 23 +- network/p2p/mock/disallow_list_cache.go | 23 +- .../disallow_list_notification_consumer.go | 11 +- network/p2p/mock/disallow_list_oracle.go | 15 +- .../mock/gossip_sub_adapter_config_func.go | 15 +- ...ip_sub_application_specific_score_cache.go | 19 +- network/p2p/mock/gossip_sub_builder.go | 15 +- network/p2p/mock/gossip_sub_factory_func.go | 15 +- .../gossip_sub_inv_ctrl_msg_notif_consumer.go | 11 +- network/p2p/mock/gossip_sub_rpc_inspector.go | 27 +- .../gossip_sub_rpc_inspector_factory_func.go | 15 +- .../p2p/mock/gossip_sub_spam_record_cache.go | 23 +- network/p2p/mock/id_translator.go | 19 +- network/p2p/mock/lib_p2_p_node.go | 107 ++++++- network/p2p/mock/node_builder.go | 55 +++- network/p2p/mock/node_constructor.go | 15 +- network/p2p/mock/peer_connections.go | 15 +- network/p2p/mock/peer_filter.go | 15 +- network/p2p/mock/peer_management.go | 63 +++- network/p2p/mock/peer_manager.go | 19 +- network/p2p/mock/peer_manager_factory_func.go | 15 +- network/p2p/mock/peer_score.go | 15 +- network/p2p/mock/peer_score_exposer.go | 31 +- network/p2p/mock/peer_score_tracer.go | 43 ++- network/p2p/mock/peer_updater.go | 11 +- network/p2p/mock/peers_provider.go | 15 +- network/p2p/mock/protocol_peer_cache.go | 15 +- network/p2p/mock/pub_sub.go | 27 +- network/p2p/mock/pub_sub_adapter.go | 47 ++- network/p2p/mock/pub_sub_adapter_config.go | 11 +- network/p2p/mock/pub_sub_tracer.go | 35 ++- network/p2p/mock/rate_limiter.go | 27 +- network/p2p/mock/rate_limiter_consumer.go | 11 +- network/p2p/mock/rate_limiter_opt.go | 11 +- network/p2p/mock/routable.go | 23 +- network/p2p/mock/rpc_control_tracking.go | 19 +- network/p2p/mock/score_option_builder.go | 27 +- network/p2p/mock/stream_factory.go | 15 +- network/p2p/mock/subscription.go | 19 +- network/p2p/mock/subscription_filter.go | 19 +- network/p2p/mock/subscription_provider.go | 23 +- network/p2p/mock/subscription_validator.go | 23 +- network/p2p/mock/subscriptions.go | 15 +- network/p2p/mock/topic.go | 27 +- network/p2p/mock/topic_provider.go | 19 +- network/p2p/mock/topic_validator_func.go | 15 +- network/p2p/mock/unicast_management.go | 19 +- network/p2p/mock/unicast_manager.go | 19 +- .../mock/unicast_rate_limiter_distributor.go | 11 +- network/p2p/mock/update_function.go | 15 +- state/cluster/mock/mutable_state.go | 27 +- state/cluster/mock/params.go | 15 +- state/cluster/mock/snapshot.go | 23 +- state/cluster/mock/state.go | 23 +- state/protocol/events/mock/heights.go | 11 +- .../protocol/events/mock/on_view_callback.go | 11 +- state/protocol/events/mock/views.go | 11 +- state/protocol/mock/block_timer.go | 19 +- state/protocol/mock/cluster.go | 35 ++- state/protocol/mock/consumer.go | 11 +- state/protocol/mock/dkg.go | 27 +- state/protocol/mock/epoch.go | 75 ++++- state/protocol/mock/epoch_protocol_state.go | 55 +++- state/protocol/mock/epoch_query.go | 23 +- state/protocol/mock/follower_state.go | 39 ++- state/protocol/mock/global_params.go | 31 +- state/protocol/mock/instance_params.go | 27 +- state/protocol/mock/kv_store_reader.go | 31 +- state/protocol/mock/mutable_protocol_state.go | 27 +- state/protocol/mock/params.go | 47 ++- state/protocol/mock/participant_state.go | 43 ++- state/protocol/mock/protocol_state.go | 23 +- state/protocol/mock/snapshot.go | 71 ++++- state/protocol/mock/state.go | 31 +- state/protocol/mock/versioned_encodable.go | 15 +- .../epochs/mock/state_machine.go | 39 ++- .../mock/state_machine_factory_method.go | 15 +- .../key_value_store_state_machine_factory.go | 15 +- .../protocol_state/mock/kv_store_api.go | 35 ++- .../protocol_state/mock/kv_store_mutator.go | 31 +- .../mock/orthogonal_store_state_machine.go | 27 +- .../protocol_state/mock/protocol_kv_store.go | 27 +- storage/mock/batch_storage.go | 19 +- storage/mock/blocks.go | 35 ++- storage/mock/chunk_data_packs.go | 31 +- storage/mock/chunks_queue.go | 23 +- storage/mock/cluster_blocks.go | 23 +- storage/mock/cluster_payloads.go | 19 +- storage/mock/collections.go | 39 ++- storage/mock/commits.go | 27 +- .../mock/computation_result_upload_status.go | 27 +- storage/mock/consumer_progress.go | 23 +- storage/mock/deferred_db_update.go | 15 +- storage/mock/dkg_state.go | 35 ++- storage/mock/epoch_commits.go | 19 +- storage/mock/epoch_protocol_state_entries.go | 27 +- storage/mock/epoch_setups.go | 19 +- storage/mock/events.go | 39 ++- storage/mock/execution_receipts.go | 27 +- storage/mock/execution_results.go | 47 ++- storage/mock/guarantees.go | 19 +- storage/mock/headers.go | 35 ++- storage/mock/height_index.go | 23 +- storage/mock/index.go | 19 +- storage/mock/ledger.go | 31 +- storage/mock/ledger_verifier.go | 15 +- storage/mock/light_transaction_results.go | 27 +- storage/mock/my_execution_receipts.go | 27 +- storage/mock/payloads.go | 19 +- storage/mock/protocol_kv_store.go | 27 +- storage/mock/quorum_certificates.go | 19 +- storage/mock/register_index.go | 27 +- storage/mock/result_approvals.go | 27 +- storage/mock/safe_beacon_keys.go | 15 +- storage/mock/seals.go | 27 +- storage/mock/service_events.go | 23 +- storage/mock/transaction.go | 15 +- storage/mock/transaction_results.go | 27 +- storage/mock/transactions.go | 19 +- storage/mock/version_beacons.go | 15 +- 431 files changed, 7813 insertions(+), 2587 deletions(-) diff --git a/Makefile b/Makefile index 8b6f9d3d514..4329c0227cf 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ unittest-main: .PHONY: install-mock-generators install-mock-generators: cd ${GOPATH}; \ - go install github.com/vektra/mockery/v2@v2.21.4; \ + go install github.com/vektra/mockery/v2@v2.43.2; \ go install github.com/golang/mock/mockgen@v1.6.0; .PHONY: install-tools @@ -654,7 +654,7 @@ docker-push-collection-without-adx: docker-push-collection-without-netgo-without-adx: docker push "$(CONTAINER_REGISTRY)/collection:$(IMAGE_TAG_NO_NETGO_NO_ADX)" -.PHONY: docker-push-collection-arm +.PHONY: docker-push-collection-arm docker-push-collection-arm: docker push "$(CONTAINER_REGISTRY)/collection:$(IMAGE_TAG_ARM)" @@ -674,7 +674,7 @@ docker-push-consensus-without-adx: docker-push-consensus-without-netgo-without-adx: docker push "$(CONTAINER_REGISTRY)/consensus:$(IMAGE_TAG_NO_NETGO_NO_ADX)" -.PHONY: docker-push-consensus-arm +.PHONY: docker-push-consensus-arm docker-push-consensus-arm: docker push "$(CONTAINER_REGISTRY)/consensus:$(IMAGE_TAG_ARM)" @@ -698,7 +698,7 @@ docker-push-execution-without-adx: docker-push-execution-without-netgo-without-adx: docker push "$(CONTAINER_REGISTRY)/execution:$(IMAGE_TAG_NO_NETGO_NO_ADX)" -.PHONY: docker-push-execution-arm +.PHONY: docker-push-execution-arm docker-push-execution-arm: docker push "$(CONTAINER_REGISTRY)/execution:$(IMAGE_TAG_ARM)" @@ -722,7 +722,7 @@ docker-push-verification-corrupt: docker-push-verification-without-netgo-without-adx: docker push "$(CONTAINER_REGISTRY)/verification:$(IMAGE_TAG_NO_NETGO_NO_ADX)" -.PHONY: docker-push-verification-arm +.PHONY: docker-push-verification-arm docker-push-verification-arm: docker push "$(CONTAINER_REGISTRY)/verification:$(IMAGE_TAG_ARM)" @@ -746,7 +746,7 @@ docker-push-access-corrupt: docker-push-access-without-netgo-without-adx: docker push "$(CONTAINER_REGISTRY)/access:$(IMAGE_TAG_NO_NETGO_NO_ADX)" -.PHONY: docker-push-access-arm +.PHONY: docker-push-access-arm docker-push-access-arm: docker push "$(CONTAINER_REGISTRY)/access:$(IMAGE_TAG_ARM)" @@ -767,7 +767,7 @@ docker-push-observer-without-adx: docker-push-observer-without-netgo-without-adx: docker push "$(CONTAINER_REGISTRY)/observer:$(IMAGE_TAG_NO_NETGO_NO_ADX)" -.PHONY: docker-push-observer-arm +.PHONY: docker-push-observer-arm docker-push-observer-arm: docker push "$(CONTAINER_REGISTRY)/observer:$(IMAGE_TAG_ARM)" diff --git a/access/mock/api.go b/access/mock/api.go index 64724b47b2b..1d06ab9bbdd 100644 --- a/access/mock/api.go +++ b/access/mock/api.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -25,6 +25,10 @@ type API struct { func (_m *API) ExecuteScriptAtBlockHeight(ctx context.Context, blockHeight uint64, script []byte, arguments [][]byte) ([]byte, error) { ret := _m.Called(ctx, blockHeight, script, arguments) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockHeight") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64, []byte, [][]byte) ([]byte, error)); ok { @@ -51,6 +55,10 @@ func (_m *API) ExecuteScriptAtBlockHeight(ctx context.Context, blockHeight uint6 func (_m *API) ExecuteScriptAtBlockID(ctx context.Context, blockID flow.Identifier, script []byte, arguments [][]byte) ([]byte, error) { ret := _m.Called(ctx, blockID, script, arguments) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockID") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, [][]byte) ([]byte, error)); ok { @@ -77,6 +85,10 @@ func (_m *API) ExecuteScriptAtBlockID(ctx context.Context, blockID flow.Identifi func (_m *API) ExecuteScriptAtLatestBlock(ctx context.Context, script []byte, arguments [][]byte) ([]byte, error) { ret := _m.Called(ctx, script, arguments) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtLatestBlock") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte) ([]byte, error)); ok { @@ -103,6 +115,10 @@ func (_m *API) ExecuteScriptAtLatestBlock(ctx context.Context, script []byte, ar func (_m *API) GetAccount(ctx context.Context, address flow.Address) (*flow.Account, error) { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { @@ -129,6 +145,10 @@ func (_m *API) GetAccount(ctx context.Context, address flow.Address) (*flow.Acco func (_m *API) GetAccountAtBlockHeight(ctx context.Context, address flow.Address, height uint64) (*flow.Account, error) { ret := _m.Called(ctx, address, height) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtBlockHeight") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address, uint64) (*flow.Account, error)); ok { @@ -155,6 +175,10 @@ func (_m *API) GetAccountAtBlockHeight(ctx context.Context, address flow.Address func (_m *API) GetAccountAtLatestBlock(ctx context.Context, address flow.Address) (*flow.Account, error) { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtLatestBlock") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { @@ -181,6 +205,10 @@ func (_m *API) GetAccountAtLatestBlock(ctx context.Context, address flow.Address func (_m *API) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Block, flow.BlockStatus, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for GetBlockByHeight") + } + var r0 *flow.Block var r1 flow.BlockStatus var r2 error @@ -214,6 +242,10 @@ func (_m *API) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Block func (_m *API) GetBlockByID(ctx context.Context, id flow.Identifier) (*flow.Block, flow.BlockStatus, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockByID") + } + var r0 *flow.Block var r1 flow.BlockStatus var r2 error @@ -247,6 +279,10 @@ func (_m *API) GetBlockByID(ctx context.Context, id flow.Identifier) (*flow.Bloc func (_m *API) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow.Header, flow.BlockStatus, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByHeight") + } + var r0 *flow.Header var r1 flow.BlockStatus var r2 error @@ -280,6 +316,10 @@ func (_m *API) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow func (_m *API) GetBlockHeaderByID(ctx context.Context, id flow.Identifier) (*flow.Header, flow.BlockStatus, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByID") + } + var r0 *flow.Header var r1 flow.BlockStatus var r2 error @@ -313,6 +353,10 @@ func (_m *API) GetBlockHeaderByID(ctx context.Context, id flow.Identifier) (*flo func (_m *API) GetCollectionByID(ctx context.Context, id flow.Identifier) (*flow.LightCollection, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetCollectionByID") + } + var r0 *flow.LightCollection var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.LightCollection, error)); ok { @@ -339,6 +383,10 @@ func (_m *API) GetCollectionByID(ctx context.Context, id flow.Identifier) (*flow func (_m *API) GetEventsForBlockIDs(ctx context.Context, eventType string, blockIDs []flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion) ([]flow.BlockEvents, error) { ret := _m.Called(ctx, eventType, blockIDs, requiredEventEncodingVersion) + if len(ret) == 0 { + panic("no return value specified for GetEventsForBlockIDs") + } + var r0 []flow.BlockEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, []flow.Identifier, entities.EventEncodingVersion) ([]flow.BlockEvents, error)); ok { @@ -365,6 +413,10 @@ func (_m *API) GetEventsForBlockIDs(ctx context.Context, eventType string, block func (_m *API) GetEventsForHeightRange(ctx context.Context, eventType string, startHeight uint64, endHeight uint64, requiredEventEncodingVersion entities.EventEncodingVersion) ([]flow.BlockEvents, error) { ret := _m.Called(ctx, eventType, startHeight, endHeight, requiredEventEncodingVersion) + if len(ret) == 0 { + panic("no return value specified for GetEventsForHeightRange") + } + var r0 []flow.BlockEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, uint64, uint64, entities.EventEncodingVersion) ([]flow.BlockEvents, error)); ok { @@ -391,6 +443,10 @@ func (_m *API) GetEventsForHeightRange(ctx context.Context, eventType string, st func (_m *API) GetExecutionResultByID(ctx context.Context, id flow.Identifier) (*flow.ExecutionResult, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultByID") + } + var r0 *flow.ExecutionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.ExecutionResult, error)); ok { @@ -417,6 +473,10 @@ func (_m *API) GetExecutionResultByID(ctx context.Context, id flow.Identifier) ( func (_m *API) GetExecutionResultForBlockID(ctx context.Context, blockID flow.Identifier) (*flow.ExecutionResult, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultForBlockID") + } + var r0 *flow.ExecutionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.ExecutionResult, error)); ok { @@ -443,6 +503,10 @@ func (_m *API) GetExecutionResultForBlockID(ctx context.Context, blockID flow.Id func (_m *API) GetFullCollectionByID(ctx context.Context, id flow.Identifier) (*flow.Collection, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetFullCollectionByID") + } + var r0 *flow.Collection var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Collection, error)); ok { @@ -469,6 +533,10 @@ func (_m *API) GetFullCollectionByID(ctx context.Context, id flow.Identifier) (* func (_m *API) GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Block, flow.BlockStatus, error) { ret := _m.Called(ctx, isSealed) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlock") + } + var r0 *flow.Block var r1 flow.BlockStatus var r2 error @@ -502,6 +570,10 @@ func (_m *API) GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Block, func (_m *API) GetLatestBlockHeader(ctx context.Context, isSealed bool) (*flow.Header, flow.BlockStatus, error) { ret := _m.Called(ctx, isSealed) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + var r0 *flow.Header var r1 flow.BlockStatus var r2 error @@ -535,6 +607,10 @@ func (_m *API) GetLatestBlockHeader(ctx context.Context, isSealed bool) (*flow.H func (_m *API) GetLatestProtocolStateSnapshot(ctx context.Context) ([]byte, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetLatestProtocolStateSnapshot") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]byte, error)); ok { @@ -561,6 +637,10 @@ func (_m *API) GetLatestProtocolStateSnapshot(ctx context.Context) ([]byte, erro func (_m *API) GetNetworkParameters(ctx context.Context) access.NetworkParameters { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNetworkParameters") + } + var r0 access.NetworkParameters if rf, ok := ret.Get(0).(func(context.Context) access.NetworkParameters); ok { r0 = rf(ctx) @@ -575,6 +655,10 @@ func (_m *API) GetNetworkParameters(ctx context.Context) access.NetworkParameter func (_m *API) GetNodeVersionInfo(ctx context.Context) (*access.NodeVersionInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNodeVersionInfo") + } + var r0 *access.NodeVersionInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*access.NodeVersionInfo, error)); ok { @@ -601,6 +685,10 @@ func (_m *API) GetNodeVersionInfo(ctx context.Context) (*access.NodeVersionInfo, func (_m *API) GetProtocolStateSnapshotByBlockID(ctx context.Context, blockID flow.Identifier) ([]byte, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateSnapshotByBlockID") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) ([]byte, error)); ok { @@ -627,6 +715,10 @@ func (_m *API) GetProtocolStateSnapshotByBlockID(ctx context.Context, blockID fl func (_m *API) GetProtocolStateSnapshotByHeight(ctx context.Context, blockHeight uint64) ([]byte, error) { ret := _m.Called(ctx, blockHeight) + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateSnapshotByHeight") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) ([]byte, error)); ok { @@ -653,6 +745,10 @@ func (_m *API) GetProtocolStateSnapshotByHeight(ctx context.Context, blockHeight func (_m *API) GetSystemTransaction(ctx context.Context, blockID flow.Identifier) (*flow.TransactionBody, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetSystemTransaction") + } + var r0 *flow.TransactionBody var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.TransactionBody, error)); ok { @@ -679,6 +775,10 @@ func (_m *API) GetSystemTransaction(ctx context.Context, blockID flow.Identifier func (_m *API) GetSystemTransactionResult(ctx context.Context, blockID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion) (*access.TransactionResult, error) { ret := _m.Called(ctx, blockID, requiredEventEncodingVersion) + if len(ret) == 0 { + panic("no return value specified for GetSystemTransactionResult") + } + var r0 *access.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, entities.EventEncodingVersion) (*access.TransactionResult, error)); ok { @@ -705,6 +805,10 @@ func (_m *API) GetSystemTransactionResult(ctx context.Context, blockID flow.Iden func (_m *API) GetTransaction(ctx context.Context, id flow.Identifier) (*flow.TransactionBody, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetTransaction") + } + var r0 *flow.TransactionBody var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.TransactionBody, error)); ok { @@ -731,6 +835,10 @@ func (_m *API) GetTransaction(ctx context.Context, id flow.Identifier) (*flow.Tr func (_m *API) GetTransactionResult(ctx context.Context, id flow.Identifier, blockID flow.Identifier, collectionID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion) (*access.TransactionResult, error) { ret := _m.Called(ctx, id, blockID, collectionID, requiredEventEncodingVersion) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResult") + } + var r0 *access.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.Identifier, flow.Identifier, entities.EventEncodingVersion) (*access.TransactionResult, error)); ok { @@ -757,6 +865,10 @@ func (_m *API) GetTransactionResult(ctx context.Context, id flow.Identifier, blo func (_m *API) GetTransactionResultByIndex(ctx context.Context, blockID flow.Identifier, index uint32, requiredEventEncodingVersion entities.EventEncodingVersion) (*access.TransactionResult, error) { ret := _m.Called(ctx, blockID, index, requiredEventEncodingVersion) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultByIndex") + } + var r0 *access.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, uint32, entities.EventEncodingVersion) (*access.TransactionResult, error)); ok { @@ -783,6 +895,10 @@ func (_m *API) GetTransactionResultByIndex(ctx context.Context, blockID flow.Ide func (_m *API) GetTransactionResultsByBlockID(ctx context.Context, blockID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion) ([]*access.TransactionResult, error) { ret := _m.Called(ctx, blockID, requiredEventEncodingVersion) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultsByBlockID") + } + var r0 []*access.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, entities.EventEncodingVersion) ([]*access.TransactionResult, error)); ok { @@ -809,6 +925,10 @@ func (_m *API) GetTransactionResultsByBlockID(ctx context.Context, blockID flow. func (_m *API) GetTransactionsByBlockID(ctx context.Context, blockID flow.Identifier) ([]*flow.TransactionBody, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetTransactionsByBlockID") + } + var r0 []*flow.TransactionBody var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) ([]*flow.TransactionBody, error)); ok { @@ -835,6 +955,10 @@ func (_m *API) GetTransactionsByBlockID(ctx context.Context, blockID flow.Identi func (_m *API) Ping(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -849,6 +973,10 @@ func (_m *API) Ping(ctx context.Context) error { func (_m *API) SendTransaction(ctx context.Context, tx *flow.TransactionBody) error { ret := _m.Called(ctx, tx) + if len(ret) == 0 { + panic("no return value specified for SendTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *flow.TransactionBody) error); ok { r0 = rf(ctx, tx) @@ -863,6 +991,10 @@ func (_m *API) SendTransaction(ctx context.Context, tx *flow.TransactionBody) er func (_m *API) SubscribeBlockDigestsFromLatest(ctx context.Context, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromLatest") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, blockStatus) @@ -879,6 +1011,10 @@ func (_m *API) SubscribeBlockDigestsFromLatest(ctx context.Context, blockStatus func (_m *API) SubscribeBlockDigestsFromStartBlockID(ctx context.Context, startBlockID flow.Identifier, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, startBlockID, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromStartBlockID") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, startBlockID, blockStatus) @@ -895,6 +1031,10 @@ func (_m *API) SubscribeBlockDigestsFromStartBlockID(ctx context.Context, startB func (_m *API) SubscribeBlockDigestsFromStartHeight(ctx context.Context, startHeight uint64, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, startHeight, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromStartHeight") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, uint64, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, startHeight, blockStatus) @@ -911,6 +1051,10 @@ func (_m *API) SubscribeBlockDigestsFromStartHeight(ctx context.Context, startHe func (_m *API) SubscribeBlockHeadersFromLatest(ctx context.Context, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromLatest") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, blockStatus) @@ -927,6 +1071,10 @@ func (_m *API) SubscribeBlockHeadersFromLatest(ctx context.Context, blockStatus func (_m *API) SubscribeBlockHeadersFromStartBlockID(ctx context.Context, startBlockID flow.Identifier, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, startBlockID, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromStartBlockID") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, startBlockID, blockStatus) @@ -943,6 +1091,10 @@ func (_m *API) SubscribeBlockHeadersFromStartBlockID(ctx context.Context, startB func (_m *API) SubscribeBlockHeadersFromStartHeight(ctx context.Context, startHeight uint64, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, startHeight, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromStartHeight") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, uint64, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, startHeight, blockStatus) @@ -959,6 +1111,10 @@ func (_m *API) SubscribeBlockHeadersFromStartHeight(ctx context.Context, startHe func (_m *API) SubscribeBlocksFromLatest(ctx context.Context, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromLatest") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, blockStatus) @@ -975,6 +1131,10 @@ func (_m *API) SubscribeBlocksFromLatest(ctx context.Context, blockStatus flow.B func (_m *API) SubscribeBlocksFromStartBlockID(ctx context.Context, startBlockID flow.Identifier, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, startBlockID, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromStartBlockID") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, startBlockID, blockStatus) @@ -991,6 +1151,10 @@ func (_m *API) SubscribeBlocksFromStartBlockID(ctx context.Context, startBlockID func (_m *API) SubscribeBlocksFromStartHeight(ctx context.Context, startHeight uint64, blockStatus flow.BlockStatus) subscription.Subscription { ret := _m.Called(ctx, startHeight, blockStatus) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromStartHeight") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, uint64, flow.BlockStatus) subscription.Subscription); ok { r0 = rf(ctx, startHeight, blockStatus) @@ -1007,6 +1171,10 @@ func (_m *API) SubscribeBlocksFromStartHeight(ctx context.Context, startHeight u func (_m *API) SubscribeTransactionStatuses(ctx context.Context, tx *flow.TransactionBody, requiredEventEncodingVersion entities.EventEncodingVersion) subscription.Subscription { ret := _m.Called(ctx, tx, requiredEventEncodingVersion) + if len(ret) == 0 { + panic("no return value specified for SubscribeTransactionStatuses") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, *flow.TransactionBody, entities.EventEncodingVersion) subscription.Subscription); ok { r0 = rf(ctx, tx, requiredEventEncodingVersion) @@ -1019,13 +1187,12 @@ func (_m *API) SubscribeTransactionStatuses(ctx context.Context, tx *flow.Transa return r0 } -type mockConstructorTestingTNewAPI interface { +// NewAPI creates a new instance of API. 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 NewAPI(t interface { mock.TestingT Cleanup(func()) -} - -// NewAPI creates a new instance of API. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAPI(t mockConstructorTestingTNewAPI) *API { +}) *API { mock := &API{} mock.Mock.Test(t) diff --git a/cmd/util/ledger/reporters/mock/get_state_commitment_func.go b/cmd/util/ledger/reporters/mock/get_state_commitment_func.go index a282b847b4c..64aedea89a1 100644 --- a/cmd/util/ledger/reporters/mock/get_state_commitment_func.go +++ b/cmd/util/ledger/reporters/mock/get_state_commitment_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type GetStateCommitmentFunc struct { func (_m *GetStateCommitmentFunc) Execute() flow.StateCommitment { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 flow.StateCommitment if rf, ok := ret.Get(0).(func() flow.StateCommitment); ok { r0 = rf() @@ -28,13 +32,12 @@ func (_m *GetStateCommitmentFunc) Execute() flow.StateCommitment { return r0 } -type mockConstructorTestingTNewGetStateCommitmentFunc interface { +// NewGetStateCommitmentFunc creates a new instance of GetStateCommitmentFunc. 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 NewGetStateCommitmentFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewGetStateCommitmentFunc creates a new instance of GetStateCommitmentFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGetStateCommitmentFunc(t mockConstructorTestingTNewGetStateCommitmentFunc) *GetStateCommitmentFunc { +}) *GetStateCommitmentFunc { mock := &GetStateCommitmentFunc{} mock.Mock.Test(t) diff --git a/cmd/util/ledger/reporters/mock/report_writer.go b/cmd/util/ledger/reporters/mock/report_writer.go index 036cfcf1b9b..cd48e8fd1be 100644 --- a/cmd/util/ledger/reporters/mock/report_writer.go +++ b/cmd/util/ledger/reporters/mock/report_writer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,13 +19,12 @@ func (_m *ReportWriter) Write(dataPoint interface{}) { _m.Called(dataPoint) } -type mockConstructorTestingTNewReportWriter interface { +// NewReportWriter creates a new instance of ReportWriter. 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 NewReportWriter(t interface { mock.TestingT Cleanup(func()) -} - -// NewReportWriter creates a new instance of ReportWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReportWriter(t mockConstructorTestingTNewReportWriter) *ReportWriter { +}) *ReportWriter { mock := &ReportWriter{} mock.Mock.Test(t) diff --git a/cmd/util/ledger/reporters/mock/report_writer_factory.go b/cmd/util/ledger/reporters/mock/report_writer_factory.go index 5cda1ee46ae..4ed0eb04ec4 100644 --- a/cmd/util/ledger/reporters/mock/report_writer_factory.go +++ b/cmd/util/ledger/reporters/mock/report_writer_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type ReportWriterFactory struct { func (_m *ReportWriterFactory) ReportWriter(dataNamespace string) reporters.ReportWriter { ret := _m.Called(dataNamespace) + if len(ret) == 0 { + panic("no return value specified for ReportWriter") + } + var r0 reporters.ReportWriter if rf, ok := ret.Get(0).(func(string) reporters.ReportWriter); ok { r0 = rf(dataNamespace) @@ -28,13 +32,12 @@ func (_m *ReportWriterFactory) ReportWriter(dataNamespace string) reporters.Repo return r0 } -type mockConstructorTestingTNewReportWriterFactory interface { +// NewReportWriterFactory creates a new instance of ReportWriterFactory. 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 NewReportWriterFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewReportWriterFactory creates a new instance of ReportWriterFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReportWriterFactory(t mockConstructorTestingTNewReportWriterFactory) *ReportWriterFactory { +}) *ReportWriterFactory { mock := &ReportWriterFactory{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/block_producer.go b/consensus/hotstuff/mocks/block_producer.go index b4060a723e7..fd2bb81336d 100644 --- a/consensus/hotstuff/mocks/block_producer.go +++ b/consensus/hotstuff/mocks/block_producer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,10 @@ type BlockProducer struct { func (_m *BlockProducer) MakeBlockProposal(view uint64, qc *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) (*flow.Header, error) { ret := _m.Called(view, qc, lastViewTC) + if len(ret) == 0 { + panic("no return value specified for MakeBlockProposal") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func(uint64, *flow.QuorumCertificate, *flow.TimeoutCertificate) (*flow.Header, error)); ok { @@ -39,13 +43,12 @@ func (_m *BlockProducer) MakeBlockProposal(view uint64, qc *flow.QuorumCertifica return r0, r1 } -type mockConstructorTestingTNewBlockProducer interface { +// NewBlockProducer creates a new instance of BlockProducer. 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 NewBlockProducer(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockProducer creates a new instance of BlockProducer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockProducer(t mockConstructorTestingTNewBlockProducer) *BlockProducer { +}) *BlockProducer { mock := &BlockProducer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/block_signer_decoder.go b/consensus/hotstuff/mocks/block_signer_decoder.go index e2a570264e8..00e79b81d39 100644 --- a/consensus/hotstuff/mocks/block_signer_decoder.go +++ b/consensus/hotstuff/mocks/block_signer_decoder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,10 @@ type BlockSignerDecoder struct { func (_m *BlockSignerDecoder) DecodeSignerIDs(header *flow.Header) (flow.IdentifierList, error) { ret := _m.Called(header) + if len(ret) == 0 { + panic("no return value specified for DecodeSignerIDs") + } + var r0 flow.IdentifierList var r1 error if rf, ok := ret.Get(0).(func(*flow.Header) (flow.IdentifierList, error)); ok { @@ -39,13 +43,12 @@ func (_m *BlockSignerDecoder) DecodeSignerIDs(header *flow.Header) (flow.Identif return r0, r1 } -type mockConstructorTestingTNewBlockSignerDecoder interface { +// NewBlockSignerDecoder creates a new instance of BlockSignerDecoder. 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 NewBlockSignerDecoder(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockSignerDecoder creates a new instance of BlockSignerDecoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockSignerDecoder(t mockConstructorTestingTNewBlockSignerDecoder) *BlockSignerDecoder { +}) *BlockSignerDecoder { mock := &BlockSignerDecoder{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/communicator_consumer.go b/consensus/hotstuff/mocks/communicator_consumer.go index e0a8f079200..8d543b1658e 100644 --- a/consensus/hotstuff/mocks/communicator_consumer.go +++ b/consensus/hotstuff/mocks/communicator_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -32,13 +32,12 @@ func (_m *CommunicatorConsumer) OnOwnVote(blockID flow.Identifier, view uint64, _m.Called(blockID, view, sigData, recipientID) } -type mockConstructorTestingTNewCommunicatorConsumer interface { +// NewCommunicatorConsumer creates a new instance of CommunicatorConsumer. 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 NewCommunicatorConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewCommunicatorConsumer creates a new instance of CommunicatorConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCommunicatorConsumer(t mockConstructorTestingTNewCommunicatorConsumer) *CommunicatorConsumer { +}) *CommunicatorConsumer { mock := &CommunicatorConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/consumer.go b/consensus/hotstuff/mocks/consumer.go index cdd1ebe72cd..cd2363a1b93 100644 --- a/consensus/hotstuff/mocks/consumer.go +++ b/consensus/hotstuff/mocks/consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -113,13 +113,12 @@ func (_m *Consumer) OnViewChange(oldView uint64, newView uint64) { _m.Called(oldView, newView) } -type mockConstructorTestingTNewConsumer interface { +// NewConsumer creates a new instance of Consumer. 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 NewConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewConsumer creates a new instance of Consumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConsumer(t mockConstructorTestingTNewConsumer) *Consumer { +}) *Consumer { mock := &Consumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/dkg.go b/consensus/hotstuff/mocks/dkg.go index 462f963d7a9..2bc8a58029f 100644 --- a/consensus/hotstuff/mocks/dkg.go +++ b/consensus/hotstuff/mocks/dkg.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type DKG struct { func (_m *DKG) GroupKey() crypto.PublicKey { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GroupKey") + } + var r0 crypto.PublicKey if rf, ok := ret.Get(0).(func() crypto.PublicKey); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *DKG) GroupKey() crypto.PublicKey { func (_m *DKG) Index(nodeID flow.Identifier) (uint, error) { ret := _m.Called(nodeID) + if len(ret) == 0 { + panic("no return value specified for Index") + } + var r0 uint var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (uint, error)); ok { @@ -58,6 +66,10 @@ func (_m *DKG) Index(nodeID flow.Identifier) (uint, error) { func (_m *DKG) KeyShare(nodeID flow.Identifier) (crypto.PublicKey, error) { ret := _m.Called(nodeID) + if len(ret) == 0 { + panic("no return value specified for KeyShare") + } + var r0 crypto.PublicKey var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (crypto.PublicKey, error)); ok { @@ -84,6 +96,10 @@ func (_m *DKG) KeyShare(nodeID flow.Identifier) (crypto.PublicKey, error) { func (_m *DKG) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -94,13 +110,12 @@ func (_m *DKG) Size() uint { return r0 } -type mockConstructorTestingTNewDKG interface { +// NewDKG creates a new instance of DKG. 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 NewDKG(t interface { mock.TestingT Cleanup(func()) -} - -// NewDKG creates a new instance of DKG. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDKG(t mockConstructorTestingTNewDKG) *DKG { +}) *DKG { mock := &DKG{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/dynamic_committee.go b/consensus/hotstuff/mocks/dynamic_committee.go index e2869b3955d..40131108a0e 100644 --- a/consensus/hotstuff/mocks/dynamic_committee.go +++ b/consensus/hotstuff/mocks/dynamic_committee.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type DynamicCommittee struct { func (_m *DynamicCommittee) DKG(view uint64) (hotstuff.DKG, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for DKG") + } + var r0 hotstuff.DKG var r1 error if rf, ok := ret.Get(0).(func(uint64) (hotstuff.DKG, error)); ok { @@ -44,6 +48,10 @@ func (_m *DynamicCommittee) DKG(view uint64) (hotstuff.DKG, error) { func (_m *DynamicCommittee) IdentitiesByBlock(blockID flow.Identifier) (flow.GenericIdentityList[flow.Identity], error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for IdentitiesByBlock") + } + var r0 flow.GenericIdentityList[flow.Identity] var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.GenericIdentityList[flow.Identity], error)); ok { @@ -70,6 +78,10 @@ func (_m *DynamicCommittee) IdentitiesByBlock(blockID flow.Identifier) (flow.Gen func (_m *DynamicCommittee) IdentitiesByEpoch(view uint64) (flow.GenericIdentityList[flow.IdentitySkeleton], error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for IdentitiesByEpoch") + } + var r0 flow.GenericIdentityList[flow.IdentitySkeleton] var r1 error if rf, ok := ret.Get(0).(func(uint64) (flow.GenericIdentityList[flow.IdentitySkeleton], error)); ok { @@ -96,6 +108,10 @@ func (_m *DynamicCommittee) IdentitiesByEpoch(view uint64) (flow.GenericIdentity func (_m *DynamicCommittee) IdentityByBlock(blockID flow.Identifier, participantID flow.Identifier) (*flow.Identity, error) { ret := _m.Called(blockID, participantID) + if len(ret) == 0 { + panic("no return value specified for IdentityByBlock") + } + var r0 *flow.Identity var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) (*flow.Identity, error)); ok { @@ -122,6 +138,10 @@ func (_m *DynamicCommittee) IdentityByBlock(blockID flow.Identifier, participant func (_m *DynamicCommittee) IdentityByEpoch(view uint64, participantID flow.Identifier) (*flow.IdentitySkeleton, error) { ret := _m.Called(view, participantID) + if len(ret) == 0 { + panic("no return value specified for IdentityByEpoch") + } + var r0 *flow.IdentitySkeleton var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (*flow.IdentitySkeleton, error)); ok { @@ -148,6 +168,10 @@ func (_m *DynamicCommittee) IdentityByEpoch(view uint64, participantID flow.Iden func (_m *DynamicCommittee) LeaderForView(view uint64) (flow.Identifier, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for LeaderForView") + } + var r0 flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(uint64) (flow.Identifier, error)); ok { @@ -174,6 +198,10 @@ func (_m *DynamicCommittee) LeaderForView(view uint64) (flow.Identifier, error) func (_m *DynamicCommittee) QuorumThresholdForView(view uint64) (uint64, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for QuorumThresholdForView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(uint64) (uint64, error)); ok { @@ -198,6 +226,10 @@ func (_m *DynamicCommittee) QuorumThresholdForView(view uint64) (uint64, error) func (_m *DynamicCommittee) Self() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Self") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -214,6 +246,10 @@ func (_m *DynamicCommittee) Self() flow.Identifier { func (_m *DynamicCommittee) TimeoutThresholdForView(view uint64) (uint64, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for TimeoutThresholdForView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(uint64) (uint64, error)); ok { @@ -234,13 +270,12 @@ func (_m *DynamicCommittee) TimeoutThresholdForView(view uint64) (uint64, error) return r0, r1 } -type mockConstructorTestingTNewDynamicCommittee interface { +// NewDynamicCommittee creates a new instance of DynamicCommittee. 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 NewDynamicCommittee(t interface { mock.TestingT Cleanup(func()) -} - -// NewDynamicCommittee creates a new instance of DynamicCommittee. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDynamicCommittee(t mockConstructorTestingTNewDynamicCommittee) *DynamicCommittee { +}) *DynamicCommittee { mock := &DynamicCommittee{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/event_handler.go b/consensus/hotstuff/mocks/event_handler.go index 8cfdbbb4317..a74897fd303 100644 --- a/consensus/hotstuff/mocks/event_handler.go +++ b/consensus/hotstuff/mocks/event_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -24,6 +24,10 @@ type EventHandler struct { func (_m *EventHandler) OnLocalTimeout() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnLocalTimeout") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -38,6 +42,10 @@ func (_m *EventHandler) OnLocalTimeout() error { func (_m *EventHandler) OnPartialTcCreated(partialTC *hotstuff.PartialTcCreated) error { ret := _m.Called(partialTC) + if len(ret) == 0 { + panic("no return value specified for OnPartialTcCreated") + } + var r0 error if rf, ok := ret.Get(0).(func(*hotstuff.PartialTcCreated) error); ok { r0 = rf(partialTC) @@ -52,6 +60,10 @@ func (_m *EventHandler) OnPartialTcCreated(partialTC *hotstuff.PartialTcCreated) func (_m *EventHandler) OnReceiveProposal(proposal *model.Proposal) error { ret := _m.Called(proposal) + if len(ret) == 0 { + panic("no return value specified for OnReceiveProposal") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.Proposal) error); ok { r0 = rf(proposal) @@ -66,6 +78,10 @@ func (_m *EventHandler) OnReceiveProposal(proposal *model.Proposal) error { func (_m *EventHandler) OnReceiveQc(qc *flow.QuorumCertificate) error { ret := _m.Called(qc) + if len(ret) == 0 { + panic("no return value specified for OnReceiveQc") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.QuorumCertificate) error); ok { r0 = rf(qc) @@ -80,6 +96,10 @@ func (_m *EventHandler) OnReceiveQc(qc *flow.QuorumCertificate) error { func (_m *EventHandler) OnReceiveTc(tc *flow.TimeoutCertificate) error { ret := _m.Called(tc) + if len(ret) == 0 { + panic("no return value specified for OnReceiveTc") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.TimeoutCertificate) error); ok { r0 = rf(tc) @@ -94,6 +114,10 @@ func (_m *EventHandler) OnReceiveTc(tc *flow.TimeoutCertificate) error { func (_m *EventHandler) Start(ctx context.Context) error { ret := _m.Called(ctx) + 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(ctx) @@ -108,6 +132,10 @@ func (_m *EventHandler) Start(ctx context.Context) error { func (_m *EventHandler) TimeoutChannel() <-chan time.Time { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TimeoutChannel") + } + var r0 <-chan time.Time if rf, ok := ret.Get(0).(func() <-chan time.Time); ok { r0 = rf() @@ -120,13 +148,12 @@ func (_m *EventHandler) TimeoutChannel() <-chan time.Time { return r0 } -type mockConstructorTestingTNewEventHandler interface { +// NewEventHandler creates a new instance of EventHandler. 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 NewEventHandler(t interface { mock.TestingT Cleanup(func()) -} - -// NewEventHandler creates a new instance of EventHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEventHandler(t mockConstructorTestingTNewEventHandler) *EventHandler { +}) *EventHandler { mock := &EventHandler{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/event_loop.go b/consensus/hotstuff/mocks/event_loop.go index a1425da0629..1d3943eb3c4 100644 --- a/consensus/hotstuff/mocks/event_loop.go +++ b/consensus/hotstuff/mocks/event_loop.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -21,6 +21,10 @@ type EventLoop struct { func (_m *EventLoop) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -72,6 +76,10 @@ func (_m *EventLoop) OnVoteProcessed(vote *model.Vote) { func (_m *EventLoop) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -94,13 +102,12 @@ func (_m *EventLoop) SubmitProposal(proposal *model.Proposal) { _m.Called(proposal) } -type mockConstructorTestingTNewEventLoop interface { +// NewEventLoop creates a new instance of EventLoop. 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 NewEventLoop(t interface { mock.TestingT Cleanup(func()) -} - -// NewEventLoop creates a new instance of EventLoop. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEventLoop(t mockConstructorTestingTNewEventLoop) *EventLoop { +}) *EventLoop { mock := &EventLoop{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/finalization_consumer.go b/consensus/hotstuff/mocks/finalization_consumer.go index 7780a5e1c79..e252d819484 100644 --- a/consensus/hotstuff/mocks/finalization_consumer.go +++ b/consensus/hotstuff/mocks/finalization_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -22,13 +22,12 @@ func (_m *FinalizationConsumer) OnFinalizedBlock(_a0 *model.Block) { _m.Called(_a0) } -type mockConstructorTestingTNewFinalizationConsumer interface { +// NewFinalizationConsumer creates a new instance of FinalizationConsumer. 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 NewFinalizationConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewFinalizationConsumer creates a new instance of FinalizationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFinalizationConsumer(t mockConstructorTestingTNewFinalizationConsumer) *FinalizationConsumer { +}) *FinalizationConsumer { mock := &FinalizationConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/follower_consumer.go b/consensus/hotstuff/mocks/follower_consumer.go index 4906eefacb7..0fe2306c2ab 100644 --- a/consensus/hotstuff/mocks/follower_consumer.go +++ b/consensus/hotstuff/mocks/follower_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -35,13 +35,12 @@ func (_m *FollowerConsumer) OnInvalidBlockDetected(err flow.Slashable[model.Inva _m.Called(err) } -type mockConstructorTestingTNewFollowerConsumer interface { +// NewFollowerConsumer creates a new instance of FollowerConsumer. 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 NewFollowerConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewFollowerConsumer creates a new instance of FollowerConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFollowerConsumer(t mockConstructorTestingTNewFollowerConsumer) *FollowerConsumer { +}) *FollowerConsumer { mock := &FollowerConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/forks.go b/consensus/hotstuff/mocks/forks.go index c14ece84bc5..832d56d9435 100644 --- a/consensus/hotstuff/mocks/forks.go +++ b/consensus/hotstuff/mocks/forks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -20,6 +20,10 @@ type Forks struct { func (_m *Forks) AddCertifiedBlock(certifiedBlock *model.CertifiedBlock) error { ret := _m.Called(certifiedBlock) + if len(ret) == 0 { + panic("no return value specified for AddCertifiedBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.CertifiedBlock) error); ok { r0 = rf(certifiedBlock) @@ -34,6 +38,10 @@ func (_m *Forks) AddCertifiedBlock(certifiedBlock *model.CertifiedBlock) error { func (_m *Forks) AddValidatedBlock(proposal *model.Block) error { ret := _m.Called(proposal) + if len(ret) == 0 { + panic("no return value specified for AddValidatedBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.Block) error); ok { r0 = rf(proposal) @@ -48,6 +56,10 @@ func (_m *Forks) AddValidatedBlock(proposal *model.Block) error { func (_m *Forks) FinalityProof() (*hotstuff.FinalityProof, bool) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FinalityProof") + } + var r0 *hotstuff.FinalityProof var r1 bool if rf, ok := ret.Get(0).(func() (*hotstuff.FinalityProof, bool)); ok { @@ -74,6 +86,10 @@ func (_m *Forks) FinalityProof() (*hotstuff.FinalityProof, bool) { func (_m *Forks) FinalizedBlock() *model.Block { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FinalizedBlock") + } + var r0 *model.Block if rf, ok := ret.Get(0).(func() *model.Block); ok { r0 = rf() @@ -90,6 +106,10 @@ func (_m *Forks) FinalizedBlock() *model.Block { func (_m *Forks) FinalizedView() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FinalizedView") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -104,6 +124,10 @@ func (_m *Forks) FinalizedView() uint64 { func (_m *Forks) GetBlock(blockID flow.Identifier) (*model.Block, bool) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for GetBlock") + } + var r0 *model.Block var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*model.Block, bool)); ok { @@ -130,6 +154,10 @@ func (_m *Forks) GetBlock(blockID flow.Identifier) (*model.Block, bool) { func (_m *Forks) GetBlocksForView(view uint64) []*model.Block { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for GetBlocksForView") + } + var r0 []*model.Block if rf, ok := ret.Get(0).(func(uint64) []*model.Block); ok { r0 = rf(view) @@ -142,13 +170,12 @@ func (_m *Forks) GetBlocksForView(view uint64) []*model.Block { return r0 } -type mockConstructorTestingTNewForks interface { +// NewForks creates a new instance of Forks. 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 NewForks(t interface { mock.TestingT Cleanup(func()) -} - -// NewForks creates a new instance of Forks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewForks(t mockConstructorTestingTNewForks) *Forks { +}) *Forks { mock := &Forks{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/on_qc_created.go b/consensus/hotstuff/mocks/on_qc_created.go index 90c370cb8fd..43bed6500c2 100644 --- a/consensus/hotstuff/mocks/on_qc_created.go +++ b/consensus/hotstuff/mocks/on_qc_created.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,13 +18,12 @@ func (_m *OnQCCreated) Execute(_a0 *flow.QuorumCertificate) { _m.Called(_a0) } -type mockConstructorTestingTNewOnQCCreated interface { +// NewOnQCCreated creates a new instance of OnQCCreated. 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 NewOnQCCreated(t interface { mock.TestingT Cleanup(func()) -} - -// NewOnQCCreated creates a new instance of OnQCCreated. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOnQCCreated(t mockConstructorTestingTNewOnQCCreated) *OnQCCreated { +}) *OnQCCreated { mock := &OnQCCreated{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/pace_maker.go b/consensus/hotstuff/mocks/pace_maker.go index 236726efc9f..31c8bd3ee89 100644 --- a/consensus/hotstuff/mocks/pace_maker.go +++ b/consensus/hotstuff/mocks/pace_maker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -23,6 +23,10 @@ type PaceMaker struct { func (_m *PaceMaker) CurView() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CurView") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -37,6 +41,10 @@ func (_m *PaceMaker) CurView() uint64 { func (_m *PaceMaker) LastViewTC() *flow.TimeoutCertificate { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LastViewTC") + } + var r0 *flow.TimeoutCertificate if rf, ok := ret.Get(0).(func() *flow.TimeoutCertificate); ok { r0 = rf() @@ -53,6 +61,10 @@ func (_m *PaceMaker) LastViewTC() *flow.TimeoutCertificate { func (_m *PaceMaker) NewestQC() *flow.QuorumCertificate { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NewestQC") + } + var r0 *flow.QuorumCertificate if rf, ok := ret.Get(0).(func() *flow.QuorumCertificate); ok { r0 = rf() @@ -69,6 +81,10 @@ func (_m *PaceMaker) NewestQC() *flow.QuorumCertificate { func (_m *PaceMaker) ProcessQC(qc *flow.QuorumCertificate) (*model.NewViewEvent, error) { ret := _m.Called(qc) + if len(ret) == 0 { + panic("no return value specified for ProcessQC") + } + var r0 *model.NewViewEvent var r1 error if rf, ok := ret.Get(0).(func(*flow.QuorumCertificate) (*model.NewViewEvent, error)); ok { @@ -95,6 +111,10 @@ func (_m *PaceMaker) ProcessQC(qc *flow.QuorumCertificate) (*model.NewViewEvent, func (_m *PaceMaker) ProcessTC(tc *flow.TimeoutCertificate) (*model.NewViewEvent, error) { ret := _m.Called(tc) + if len(ret) == 0 { + panic("no return value specified for ProcessTC") + } + var r0 *model.NewViewEvent var r1 error if rf, ok := ret.Get(0).(func(*flow.TimeoutCertificate) (*model.NewViewEvent, error)); ok { @@ -126,6 +146,10 @@ func (_m *PaceMaker) Start(ctx context.Context) { func (_m *PaceMaker) TargetPublicationTime(proposalView uint64, timeViewEntered time.Time, parentBlockId flow.Identifier) time.Time { ret := _m.Called(proposalView, timeViewEntered, parentBlockId) + if len(ret) == 0 { + panic("no return value specified for TargetPublicationTime") + } + var r0 time.Time if rf, ok := ret.Get(0).(func(uint64, time.Time, flow.Identifier) time.Time); ok { r0 = rf(proposalView, timeViewEntered, parentBlockId) @@ -140,6 +164,10 @@ func (_m *PaceMaker) TargetPublicationTime(proposalView uint64, timeViewEntered func (_m *PaceMaker) TimeoutChannel() <-chan time.Time { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TimeoutChannel") + } + var r0 <-chan time.Time if rf, ok := ret.Get(0).(func() <-chan time.Time); ok { r0 = rf() @@ -152,13 +180,12 @@ func (_m *PaceMaker) TimeoutChannel() <-chan time.Time { return r0 } -type mockConstructorTestingTNewPaceMaker interface { +// NewPaceMaker creates a new instance of PaceMaker. 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 NewPaceMaker(t interface { mock.TestingT Cleanup(func()) -} - -// NewPaceMaker creates a new instance of PaceMaker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPaceMaker(t mockConstructorTestingTNewPaceMaker) *PaceMaker { +}) *PaceMaker { mock := &PaceMaker{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/packer.go b/consensus/hotstuff/mocks/packer.go index da10b25b3b9..87da2c0071b 100644 --- a/consensus/hotstuff/mocks/packer.go +++ b/consensus/hotstuff/mocks/packer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type Packer struct { func (_m *Packer) Pack(view uint64, sig *hotstuff.BlockSignatureData) ([]byte, []byte, error) { ret := _m.Called(view, sig) + if len(ret) == 0 { + panic("no return value specified for Pack") + } + var r0 []byte var r1 []byte var r2 error @@ -53,6 +57,10 @@ func (_m *Packer) Pack(view uint64, sig *hotstuff.BlockSignatureData) ([]byte, [ func (_m *Packer) Unpack(signerIdentities flow.GenericIdentityList[flow.IdentitySkeleton], sigData []byte) (*hotstuff.BlockSignatureData, error) { ret := _m.Called(signerIdentities, sigData) + if len(ret) == 0 { + panic("no return value specified for Unpack") + } + var r0 *hotstuff.BlockSignatureData var r1 error if rf, ok := ret.Get(0).(func(flow.GenericIdentityList[flow.IdentitySkeleton], []byte) (*hotstuff.BlockSignatureData, error)); ok { @@ -75,13 +83,12 @@ func (_m *Packer) Unpack(signerIdentities flow.GenericIdentityList[flow.Identity return r0, r1 } -type mockConstructorTestingTNewPacker interface { +// NewPacker creates a new instance of Packer. 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 NewPacker(t interface { mock.TestingT Cleanup(func()) -} - -// NewPacker creates a new instance of Packer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPacker(t mockConstructorTestingTNewPacker) *Packer { +}) *Packer { mock := &Packer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/participant_consumer.go b/consensus/hotstuff/mocks/participant_consumer.go index 2d2b4141093..883380232b4 100644 --- a/consensus/hotstuff/mocks/participant_consumer.go +++ b/consensus/hotstuff/mocks/participant_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -76,13 +76,12 @@ func (_m *ParticipantConsumer) OnViewChange(oldView uint64, newView uint64) { _m.Called(oldView, newView) } -type mockConstructorTestingTNewParticipantConsumer interface { +// NewParticipantConsumer creates a new instance of ParticipantConsumer. 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 NewParticipantConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewParticipantConsumer creates a new instance of ParticipantConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewParticipantConsumer(t mockConstructorTestingTNewParticipantConsumer) *ParticipantConsumer { +}) *ParticipantConsumer { mock := &ParticipantConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/persister.go b/consensus/hotstuff/mocks/persister.go index 668fbc6a2c3..c46cdf77925 100644 --- a/consensus/hotstuff/mocks/persister.go +++ b/consensus/hotstuff/mocks/persister.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type Persister struct { func (_m *Persister) GetLivenessData() (*hotstuff.LivenessData, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetLivenessData") + } + var r0 *hotstuff.LivenessData var r1 error if rf, ok := ret.Get(0).(func() (*hotstuff.LivenessData, error)); ok { @@ -42,6 +46,10 @@ func (_m *Persister) GetLivenessData() (*hotstuff.LivenessData, error) { func (_m *Persister) GetSafetyData() (*hotstuff.SafetyData, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetSafetyData") + } + var r0 *hotstuff.SafetyData var r1 error if rf, ok := ret.Get(0).(func() (*hotstuff.SafetyData, error)); ok { @@ -68,6 +76,10 @@ func (_m *Persister) GetSafetyData() (*hotstuff.SafetyData, error) { func (_m *Persister) PutLivenessData(livenessData *hotstuff.LivenessData) error { ret := _m.Called(livenessData) + if len(ret) == 0 { + panic("no return value specified for PutLivenessData") + } + var r0 error if rf, ok := ret.Get(0).(func(*hotstuff.LivenessData) error); ok { r0 = rf(livenessData) @@ -82,6 +94,10 @@ func (_m *Persister) PutLivenessData(livenessData *hotstuff.LivenessData) error func (_m *Persister) PutSafetyData(safetyData *hotstuff.SafetyData) error { ret := _m.Called(safetyData) + if len(ret) == 0 { + panic("no return value specified for PutSafetyData") + } + var r0 error if rf, ok := ret.Get(0).(func(*hotstuff.SafetyData) error); ok { r0 = rf(safetyData) @@ -92,13 +108,12 @@ func (_m *Persister) PutSafetyData(safetyData *hotstuff.SafetyData) error { return r0 } -type mockConstructorTestingTNewPersister interface { +// NewPersister creates a new instance of Persister. 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 NewPersister(t interface { mock.TestingT Cleanup(func()) -} - -// NewPersister creates a new instance of Persister. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPersister(t mockConstructorTestingTNewPersister) *Persister { +}) *Persister { mock := &Persister{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/proposal_duration_provider.go b/consensus/hotstuff/mocks/proposal_duration_provider.go index 2d45f75d409..f754fc609d0 100644 --- a/consensus/hotstuff/mocks/proposal_duration_provider.go +++ b/consensus/hotstuff/mocks/proposal_duration_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type ProposalDurationProvider struct { func (_m *ProposalDurationProvider) TargetPublicationTime(proposalView uint64, timeViewEntered time.Time, parentBlockId flow.Identifier) time.Time { ret := _m.Called(proposalView, timeViewEntered, parentBlockId) + if len(ret) == 0 { + panic("no return value specified for TargetPublicationTime") + } + var r0 time.Time if rf, ok := ret.Get(0).(func(uint64, time.Time, flow.Identifier) time.Time); ok { r0 = rf(proposalView, timeViewEntered, parentBlockId) @@ -29,13 +33,12 @@ func (_m *ProposalDurationProvider) TargetPublicationTime(proposalView uint64, t return r0 } -type mockConstructorTestingTNewProposalDurationProvider interface { +// NewProposalDurationProvider creates a new instance of ProposalDurationProvider. 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 NewProposalDurationProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewProposalDurationProvider creates a new instance of ProposalDurationProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProposalDurationProvider(t mockConstructorTestingTNewProposalDurationProvider) *ProposalDurationProvider { +}) *ProposalDurationProvider { mock := &ProposalDurationProvider{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/proposal_violation_consumer.go b/consensus/hotstuff/mocks/proposal_violation_consumer.go index bb8735a1ca1..f62a92dcae5 100644 --- a/consensus/hotstuff/mocks/proposal_violation_consumer.go +++ b/consensus/hotstuff/mocks/proposal_violation_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -25,13 +25,12 @@ func (_m *ProposalViolationConsumer) OnInvalidBlockDetected(err flow.Slashable[m _m.Called(err) } -type mockConstructorTestingTNewProposalViolationConsumer interface { +// NewProposalViolationConsumer creates a new instance of ProposalViolationConsumer. 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 NewProposalViolationConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewProposalViolationConsumer creates a new instance of ProposalViolationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProposalViolationConsumer(t mockConstructorTestingTNewProposalViolationConsumer) *ProposalViolationConsumer { +}) *ProposalViolationConsumer { mock := &ProposalViolationConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/random_beacon_inspector.go b/consensus/hotstuff/mocks/random_beacon_inspector.go index 547cbf69639..6636b11886f 100644 --- a/consensus/hotstuff/mocks/random_beacon_inspector.go +++ b/consensus/hotstuff/mocks/random_beacon_inspector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,10 @@ type RandomBeaconInspector struct { func (_m *RandomBeaconInspector) EnoughShares() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EnoughShares") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -31,6 +35,10 @@ func (_m *RandomBeaconInspector) EnoughShares() bool { func (_m *RandomBeaconInspector) Reconstruct() (crypto.Signature, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Reconstruct") + } + var r0 crypto.Signature var r1 error if rf, ok := ret.Get(0).(func() (crypto.Signature, error)); ok { @@ -57,6 +65,10 @@ func (_m *RandomBeaconInspector) Reconstruct() (crypto.Signature, error) { func (_m *RandomBeaconInspector) TrustedAdd(signerIndex int, share crypto.Signature) (bool, error) { ret := _m.Called(signerIndex, share) + if len(ret) == 0 { + panic("no return value specified for TrustedAdd") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(int, crypto.Signature) (bool, error)); ok { @@ -81,6 +93,10 @@ func (_m *RandomBeaconInspector) TrustedAdd(signerIndex int, share crypto.Signat func (_m *RandomBeaconInspector) Verify(signerIndex int, share crypto.Signature) error { ret := _m.Called(signerIndex, share) + if len(ret) == 0 { + panic("no return value specified for Verify") + } + var r0 error if rf, ok := ret.Get(0).(func(int, crypto.Signature) error); ok { r0 = rf(signerIndex, share) @@ -91,13 +107,12 @@ func (_m *RandomBeaconInspector) Verify(signerIndex int, share crypto.Signature) return r0 } -type mockConstructorTestingTNewRandomBeaconInspector interface { +// NewRandomBeaconInspector creates a new instance of RandomBeaconInspector. 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 NewRandomBeaconInspector(t interface { mock.TestingT Cleanup(func()) -} - -// NewRandomBeaconInspector creates a new instance of RandomBeaconInspector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRandomBeaconInspector(t mockConstructorTestingTNewRandomBeaconInspector) *RandomBeaconInspector { +}) *RandomBeaconInspector { mock := &RandomBeaconInspector{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/random_beacon_reconstructor.go b/consensus/hotstuff/mocks/random_beacon_reconstructor.go index 120a28b393d..7e02f176af5 100644 --- a/consensus/hotstuff/mocks/random_beacon_reconstructor.go +++ b/consensus/hotstuff/mocks/random_beacon_reconstructor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type RandomBeaconReconstructor struct { func (_m *RandomBeaconReconstructor) EnoughShares() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EnoughShares") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *RandomBeaconReconstructor) EnoughShares() bool { func (_m *RandomBeaconReconstructor) Reconstruct() (crypto.Signature, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Reconstruct") + } + var r0 crypto.Signature var r1 error if rf, ok := ret.Get(0).(func() (crypto.Signature, error)); ok { @@ -58,6 +66,10 @@ func (_m *RandomBeaconReconstructor) Reconstruct() (crypto.Signature, error) { func (_m *RandomBeaconReconstructor) TrustedAdd(signerID flow.Identifier, sig crypto.Signature) (bool, error) { ret := _m.Called(signerID, sig) + if len(ret) == 0 { + panic("no return value specified for TrustedAdd") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) (bool, error)); ok { @@ -82,6 +94,10 @@ func (_m *RandomBeaconReconstructor) TrustedAdd(signerID flow.Identifier, sig cr func (_m *RandomBeaconReconstructor) Verify(signerID flow.Identifier, sig crypto.Signature) error { ret := _m.Called(signerID, sig) + if len(ret) == 0 { + panic("no return value specified for Verify") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) error); ok { r0 = rf(signerID, sig) @@ -92,13 +108,12 @@ func (_m *RandomBeaconReconstructor) Verify(signerID flow.Identifier, sig crypto return r0 } -type mockConstructorTestingTNewRandomBeaconReconstructor interface { +// NewRandomBeaconReconstructor creates a new instance of RandomBeaconReconstructor. 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 NewRandomBeaconReconstructor(t interface { mock.TestingT Cleanup(func()) -} - -// NewRandomBeaconReconstructor creates a new instance of RandomBeaconReconstructor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRandomBeaconReconstructor(t mockConstructorTestingTNewRandomBeaconReconstructor) *RandomBeaconReconstructor { +}) *RandomBeaconReconstructor { mock := &RandomBeaconReconstructor{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/replicas.go b/consensus/hotstuff/mocks/replicas.go index 8ddba461152..27dd09b2a7d 100644 --- a/consensus/hotstuff/mocks/replicas.go +++ b/consensus/hotstuff/mocks/replicas.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type Replicas struct { func (_m *Replicas) DKG(view uint64) (hotstuff.DKG, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for DKG") + } + var r0 hotstuff.DKG var r1 error if rf, ok := ret.Get(0).(func(uint64) (hotstuff.DKG, error)); ok { @@ -44,6 +48,10 @@ func (_m *Replicas) DKG(view uint64) (hotstuff.DKG, error) { func (_m *Replicas) IdentitiesByEpoch(view uint64) (flow.GenericIdentityList[flow.IdentitySkeleton], error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for IdentitiesByEpoch") + } + var r0 flow.GenericIdentityList[flow.IdentitySkeleton] var r1 error if rf, ok := ret.Get(0).(func(uint64) (flow.GenericIdentityList[flow.IdentitySkeleton], error)); ok { @@ -70,6 +78,10 @@ func (_m *Replicas) IdentitiesByEpoch(view uint64) (flow.GenericIdentityList[flo func (_m *Replicas) IdentityByEpoch(view uint64, participantID flow.Identifier) (*flow.IdentitySkeleton, error) { ret := _m.Called(view, participantID) + if len(ret) == 0 { + panic("no return value specified for IdentityByEpoch") + } + var r0 *flow.IdentitySkeleton var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (*flow.IdentitySkeleton, error)); ok { @@ -96,6 +108,10 @@ func (_m *Replicas) IdentityByEpoch(view uint64, participantID flow.Identifier) func (_m *Replicas) LeaderForView(view uint64) (flow.Identifier, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for LeaderForView") + } + var r0 flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(uint64) (flow.Identifier, error)); ok { @@ -122,6 +138,10 @@ func (_m *Replicas) LeaderForView(view uint64) (flow.Identifier, error) { func (_m *Replicas) QuorumThresholdForView(view uint64) (uint64, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for QuorumThresholdForView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(uint64) (uint64, error)); ok { @@ -146,6 +166,10 @@ func (_m *Replicas) QuorumThresholdForView(view uint64) (uint64, error) { func (_m *Replicas) Self() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Self") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -162,6 +186,10 @@ func (_m *Replicas) Self() flow.Identifier { func (_m *Replicas) TimeoutThresholdForView(view uint64) (uint64, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for TimeoutThresholdForView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(uint64) (uint64, error)); ok { @@ -182,13 +210,12 @@ func (_m *Replicas) TimeoutThresholdForView(view uint64) (uint64, error) { return r0, r1 } -type mockConstructorTestingTNewReplicas interface { +// NewReplicas creates a new instance of Replicas. 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 NewReplicas(t interface { mock.TestingT Cleanup(func()) -} - -// NewReplicas creates a new instance of Replicas. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReplicas(t mockConstructorTestingTNewReplicas) *Replicas { +}) *Replicas { mock := &Replicas{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/safety_rules.go b/consensus/hotstuff/mocks/safety_rules.go index dccb0b91ddc..1fac041ba94 100644 --- a/consensus/hotstuff/mocks/safety_rules.go +++ b/consensus/hotstuff/mocks/safety_rules.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type SafetyRules struct { func (_m *SafetyRules) ProduceTimeout(curView uint64, newestQC *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) (*model.TimeoutObject, error) { ret := _m.Called(curView, newestQC, lastViewTC) + if len(ret) == 0 { + panic("no return value specified for ProduceTimeout") + } + var r0 *model.TimeoutObject var r1 error if rf, ok := ret.Get(0).(func(uint64, *flow.QuorumCertificate, *flow.TimeoutCertificate) (*model.TimeoutObject, error)); ok { @@ -45,6 +49,10 @@ func (_m *SafetyRules) ProduceTimeout(curView uint64, newestQC *flow.QuorumCerti func (_m *SafetyRules) ProduceVote(proposal *model.Proposal, curView uint64) (*model.Vote, error) { ret := _m.Called(proposal, curView) + if len(ret) == 0 { + panic("no return value specified for ProduceVote") + } + var r0 *model.Vote var r1 error if rf, ok := ret.Get(0).(func(*model.Proposal, uint64) (*model.Vote, error)); ok { @@ -67,13 +75,12 @@ func (_m *SafetyRules) ProduceVote(proposal *model.Proposal, curView uint64) (*m return r0, r1 } -type mockConstructorTestingTNewSafetyRules interface { +// NewSafetyRules creates a new instance of SafetyRules. 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 NewSafetyRules(t interface { mock.TestingT Cleanup(func()) -} - -// NewSafetyRules creates a new instance of SafetyRules. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSafetyRules(t mockConstructorTestingTNewSafetyRules) *SafetyRules { +}) *SafetyRules { mock := &SafetyRules{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/signer.go b/consensus/hotstuff/mocks/signer.go index 49dc412d29e..d2b006eb47a 100644 --- a/consensus/hotstuff/mocks/signer.go +++ b/consensus/hotstuff/mocks/signer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type Signer struct { func (_m *Signer) CreateProposal(block *model.Block) (*model.Proposal, error) { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for CreateProposal") + } + var r0 *model.Proposal var r1 error if rf, ok := ret.Get(0).(func(*model.Block) (*model.Proposal, error)); ok { @@ -45,6 +49,10 @@ func (_m *Signer) CreateProposal(block *model.Block) (*model.Proposal, error) { func (_m *Signer) CreateTimeout(curView uint64, newestQC *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) (*model.TimeoutObject, error) { ret := _m.Called(curView, newestQC, lastViewTC) + if len(ret) == 0 { + panic("no return value specified for CreateTimeout") + } + var r0 *model.TimeoutObject var r1 error if rf, ok := ret.Get(0).(func(uint64, *flow.QuorumCertificate, *flow.TimeoutCertificate) (*model.TimeoutObject, error)); ok { @@ -71,6 +79,10 @@ func (_m *Signer) CreateTimeout(curView uint64, newestQC *flow.QuorumCertificate func (_m *Signer) CreateVote(block *model.Block) (*model.Vote, error) { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for CreateVote") + } + var r0 *model.Vote var r1 error if rf, ok := ret.Get(0).(func(*model.Block) (*model.Vote, error)); ok { @@ -93,13 +105,12 @@ func (_m *Signer) CreateVote(block *model.Block) (*model.Vote, error) { return r0, r1 } -type mockConstructorTestingTNewSigner interface { +// NewSigner creates a new instance of Signer. 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 NewSigner(t interface { mock.TestingT Cleanup(func()) -} - -// NewSigner creates a new instance of Signer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSigner(t mockConstructorTestingTNewSigner) *Signer { +}) *Signer { mock := &Signer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_aggregation_consumer.go b/consensus/hotstuff/mocks/timeout_aggregation_consumer.go index c123201f956..6f1133dd49e 100644 --- a/consensus/hotstuff/mocks/timeout_aggregation_consumer.go +++ b/consensus/hotstuff/mocks/timeout_aggregation_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -50,13 +50,12 @@ func (_m *TimeoutAggregationConsumer) OnTimeoutProcessed(timeout *model.TimeoutO _m.Called(timeout) } -type mockConstructorTestingTNewTimeoutAggregationConsumer interface { +// NewTimeoutAggregationConsumer creates a new instance of TimeoutAggregationConsumer. 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 NewTimeoutAggregationConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutAggregationConsumer creates a new instance of TimeoutAggregationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutAggregationConsumer(t mockConstructorTestingTNewTimeoutAggregationConsumer) *TimeoutAggregationConsumer { +}) *TimeoutAggregationConsumer { mock := &TimeoutAggregationConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_aggregation_violation_consumer.go b/consensus/hotstuff/mocks/timeout_aggregation_violation_consumer.go index 552f8650f9f..2d266d75040 100644 --- a/consensus/hotstuff/mocks/timeout_aggregation_violation_consumer.go +++ b/consensus/hotstuff/mocks/timeout_aggregation_violation_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -22,13 +22,12 @@ func (_m *TimeoutAggregationViolationConsumer) OnInvalidTimeoutDetected(err mode _m.Called(err) } -type mockConstructorTestingTNewTimeoutAggregationViolationConsumer interface { +// NewTimeoutAggregationViolationConsumer creates a new instance of TimeoutAggregationViolationConsumer. 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 NewTimeoutAggregationViolationConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutAggregationViolationConsumer creates a new instance of TimeoutAggregationViolationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutAggregationViolationConsumer(t mockConstructorTestingTNewTimeoutAggregationViolationConsumer) *TimeoutAggregationViolationConsumer { +}) *TimeoutAggregationViolationConsumer { mock := &TimeoutAggregationViolationConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_aggregator.go b/consensus/hotstuff/mocks/timeout_aggregator.go index 38d26732c6b..5a4092148dc 100644 --- a/consensus/hotstuff/mocks/timeout_aggregator.go +++ b/consensus/hotstuff/mocks/timeout_aggregator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -23,6 +23,10 @@ func (_m *TimeoutAggregator) AddTimeout(timeoutObject *model.TimeoutObject) { func (_m *TimeoutAggregator) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -44,6 +48,10 @@ func (_m *TimeoutAggregator) PruneUpToView(lowestRetainedView uint64) { func (_m *TimeoutAggregator) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -61,13 +69,12 @@ func (_m *TimeoutAggregator) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewTimeoutAggregator interface { +// NewTimeoutAggregator creates a new instance of TimeoutAggregator. 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 NewTimeoutAggregator(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutAggregator creates a new instance of TimeoutAggregator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutAggregator(t mockConstructorTestingTNewTimeoutAggregator) *TimeoutAggregator { +}) *TimeoutAggregator { mock := &TimeoutAggregator{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_collector.go b/consensus/hotstuff/mocks/timeout_collector.go index 260ad174450..96bf67a0827 100644 --- a/consensus/hotstuff/mocks/timeout_collector.go +++ b/consensus/hotstuff/mocks/timeout_collector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type TimeoutCollector struct { func (_m *TimeoutCollector) AddTimeout(timeoutObject *model.TimeoutObject) error { ret := _m.Called(timeoutObject) + if len(ret) == 0 { + panic("no return value specified for AddTimeout") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.TimeoutObject) error); ok { r0 = rf(timeoutObject) @@ -30,6 +34,10 @@ func (_m *TimeoutCollector) AddTimeout(timeoutObject *model.TimeoutObject) error func (_m *TimeoutCollector) View() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for View") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -40,13 +48,12 @@ func (_m *TimeoutCollector) View() uint64 { return r0 } -type mockConstructorTestingTNewTimeoutCollector interface { +// NewTimeoutCollector creates a new instance of TimeoutCollector. 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 NewTimeoutCollector(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutCollector creates a new instance of TimeoutCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutCollector(t mockConstructorTestingTNewTimeoutCollector) *TimeoutCollector { +}) *TimeoutCollector { mock := &TimeoutCollector{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_collector_consumer.go b/consensus/hotstuff/mocks/timeout_collector_consumer.go index 629f33f9a14..2624b964824 100644 --- a/consensus/hotstuff/mocks/timeout_collector_consumer.go +++ b/consensus/hotstuff/mocks/timeout_collector_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -40,13 +40,12 @@ func (_m *TimeoutCollectorConsumer) OnTimeoutProcessed(timeout *model.TimeoutObj _m.Called(timeout) } -type mockConstructorTestingTNewTimeoutCollectorConsumer interface { +// NewTimeoutCollectorConsumer creates a new instance of TimeoutCollectorConsumer. 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 NewTimeoutCollectorConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutCollectorConsumer creates a new instance of TimeoutCollectorConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutCollectorConsumer(t mockConstructorTestingTNewTimeoutCollectorConsumer) *TimeoutCollectorConsumer { +}) *TimeoutCollectorConsumer { mock := &TimeoutCollectorConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_collector_factory.go b/consensus/hotstuff/mocks/timeout_collector_factory.go index fec262ab94e..e7723a81b59 100644 --- a/consensus/hotstuff/mocks/timeout_collector_factory.go +++ b/consensus/hotstuff/mocks/timeout_collector_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type TimeoutCollectorFactory struct { func (_m *TimeoutCollectorFactory) Create(view uint64) (hotstuff.TimeoutCollector, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 hotstuff.TimeoutCollector var r1 error if rf, ok := ret.Get(0).(func(uint64) (hotstuff.TimeoutCollector, error)); ok { @@ -38,13 +42,12 @@ func (_m *TimeoutCollectorFactory) Create(view uint64) (hotstuff.TimeoutCollecto return r0, r1 } -type mockConstructorTestingTNewTimeoutCollectorFactory interface { +// NewTimeoutCollectorFactory creates a new instance of TimeoutCollectorFactory. 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 NewTimeoutCollectorFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutCollectorFactory creates a new instance of TimeoutCollectorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutCollectorFactory(t mockConstructorTestingTNewTimeoutCollectorFactory) *TimeoutCollectorFactory { +}) *TimeoutCollectorFactory { mock := &TimeoutCollectorFactory{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_collectors.go b/consensus/hotstuff/mocks/timeout_collectors.go index 0a5a5c78731..f2abe45b699 100644 --- a/consensus/hotstuff/mocks/timeout_collectors.go +++ b/consensus/hotstuff/mocks/timeout_collectors.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type TimeoutCollectors struct { func (_m *TimeoutCollectors) GetOrCreateCollector(view uint64) (hotstuff.TimeoutCollector, bool, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for GetOrCreateCollector") + } + var r0 hotstuff.TimeoutCollector var r1 bool var r2 error @@ -50,13 +54,12 @@ func (_m *TimeoutCollectors) PruneUpToView(lowestRetainedView uint64) { _m.Called(lowestRetainedView) } -type mockConstructorTestingTNewTimeoutCollectors interface { +// NewTimeoutCollectors creates a new instance of TimeoutCollectors. 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 NewTimeoutCollectors(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutCollectors creates a new instance of TimeoutCollectors. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutCollectors(t mockConstructorTestingTNewTimeoutCollectors) *TimeoutCollectors { +}) *TimeoutCollectors { mock := &TimeoutCollectors{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_processor.go b/consensus/hotstuff/mocks/timeout_processor.go index bb601070560..b0e4a500384 100644 --- a/consensus/hotstuff/mocks/timeout_processor.go +++ b/consensus/hotstuff/mocks/timeout_processor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type TimeoutProcessor struct { func (_m *TimeoutProcessor) Process(timeout *model.TimeoutObject) error { ret := _m.Called(timeout) + if len(ret) == 0 { + panic("no return value specified for Process") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.TimeoutObject) error); ok { r0 = rf(timeout) @@ -26,13 +30,12 @@ func (_m *TimeoutProcessor) Process(timeout *model.TimeoutObject) error { return r0 } -type mockConstructorTestingTNewTimeoutProcessor interface { +// NewTimeoutProcessor creates a new instance of TimeoutProcessor. 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 NewTimeoutProcessor(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutProcessor creates a new instance of TimeoutProcessor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutProcessor(t mockConstructorTestingTNewTimeoutProcessor) *TimeoutProcessor { +}) *TimeoutProcessor { mock := &TimeoutProcessor{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_processor_factory.go b/consensus/hotstuff/mocks/timeout_processor_factory.go index 26c0952ba8a..8c9a3ff785f 100644 --- a/consensus/hotstuff/mocks/timeout_processor_factory.go +++ b/consensus/hotstuff/mocks/timeout_processor_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,10 @@ type TimeoutProcessorFactory struct { func (_m *TimeoutProcessorFactory) Create(view uint64) (hotstuff.TimeoutProcessor, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 hotstuff.TimeoutProcessor var r1 error if rf, ok := ret.Get(0).(func(uint64) (hotstuff.TimeoutProcessor, error)); ok { @@ -38,13 +42,12 @@ func (_m *TimeoutProcessorFactory) Create(view uint64) (hotstuff.TimeoutProcesso return r0, r1 } -type mockConstructorTestingTNewTimeoutProcessorFactory interface { +// NewTimeoutProcessorFactory creates a new instance of TimeoutProcessorFactory. 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 NewTimeoutProcessorFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutProcessorFactory creates a new instance of TimeoutProcessorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutProcessorFactory(t mockConstructorTestingTNewTimeoutProcessorFactory) *TimeoutProcessorFactory { +}) *TimeoutProcessorFactory { mock := &TimeoutProcessorFactory{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/timeout_signature_aggregator.go b/consensus/hotstuff/mocks/timeout_signature_aggregator.go index 640cac2d343..bb97b72a483 100644 --- a/consensus/hotstuff/mocks/timeout_signature_aggregator.go +++ b/consensus/hotstuff/mocks/timeout_signature_aggregator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -20,6 +20,10 @@ type TimeoutSignatureAggregator struct { func (_m *TimeoutSignatureAggregator) Aggregate() ([]hotstuff.TimeoutSignerInfo, crypto.Signature, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Aggregate") + } + var r0 []hotstuff.TimeoutSignerInfo var r1 crypto.Signature var r2 error @@ -55,6 +59,10 @@ func (_m *TimeoutSignatureAggregator) Aggregate() ([]hotstuff.TimeoutSignerInfo, func (_m *TimeoutSignatureAggregator) TotalWeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TotalWeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -69,6 +77,10 @@ func (_m *TimeoutSignatureAggregator) TotalWeight() uint64 { func (_m *TimeoutSignatureAggregator) VerifyAndAdd(signerID flow.Identifier, sig crypto.Signature, newestQCView uint64) (uint64, error) { ret := _m.Called(signerID, sig, newestQCView) + if len(ret) == 0 { + panic("no return value specified for VerifyAndAdd") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature, uint64) (uint64, error)); ok { @@ -93,6 +105,10 @@ func (_m *TimeoutSignatureAggregator) VerifyAndAdd(signerID flow.Identifier, sig func (_m *TimeoutSignatureAggregator) View() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for View") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -103,13 +119,12 @@ func (_m *TimeoutSignatureAggregator) View() uint64 { return r0 } -type mockConstructorTestingTNewTimeoutSignatureAggregator interface { +// NewTimeoutSignatureAggregator creates a new instance of TimeoutSignatureAggregator. 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 NewTimeoutSignatureAggregator(t interface { mock.TestingT Cleanup(func()) -} - -// NewTimeoutSignatureAggregator creates a new instance of TimeoutSignatureAggregator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTimeoutSignatureAggregator(t mockConstructorTestingTNewTimeoutSignatureAggregator) *TimeoutSignatureAggregator { +}) *TimeoutSignatureAggregator { mock := &TimeoutSignatureAggregator{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/validator.go b/consensus/hotstuff/mocks/validator.go index d8cbf2fc265..9b97d23d762 100644 --- a/consensus/hotstuff/mocks/validator.go +++ b/consensus/hotstuff/mocks/validator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -19,6 +19,10 @@ type Validator struct { func (_m *Validator) ValidateProposal(proposal *model.Proposal) error { ret := _m.Called(proposal) + if len(ret) == 0 { + panic("no return value specified for ValidateProposal") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.Proposal) error); ok { r0 = rf(proposal) @@ -33,6 +37,10 @@ func (_m *Validator) ValidateProposal(proposal *model.Proposal) error { func (_m *Validator) ValidateQC(qc *flow.QuorumCertificate) error { ret := _m.Called(qc) + if len(ret) == 0 { + panic("no return value specified for ValidateQC") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.QuorumCertificate) error); ok { r0 = rf(qc) @@ -47,6 +55,10 @@ func (_m *Validator) ValidateQC(qc *flow.QuorumCertificate) error { func (_m *Validator) ValidateTC(tc *flow.TimeoutCertificate) error { ret := _m.Called(tc) + if len(ret) == 0 { + panic("no return value specified for ValidateTC") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.TimeoutCertificate) error); ok { r0 = rf(tc) @@ -61,6 +73,10 @@ func (_m *Validator) ValidateTC(tc *flow.TimeoutCertificate) error { func (_m *Validator) ValidateVote(vote *model.Vote) (*flow.IdentitySkeleton, error) { ret := _m.Called(vote) + if len(ret) == 0 { + panic("no return value specified for ValidateVote") + } + var r0 *flow.IdentitySkeleton var r1 error if rf, ok := ret.Get(0).(func(*model.Vote) (*flow.IdentitySkeleton, error)); ok { @@ -83,13 +99,12 @@ func (_m *Validator) ValidateVote(vote *model.Vote) (*flow.IdentitySkeleton, err return r0, r1 } -type mockConstructorTestingTNewValidator interface { +// NewValidator creates a new instance of Validator. 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 NewValidator(t interface { mock.TestingT Cleanup(func()) -} - -// NewValidator creates a new instance of Validator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewValidator(t mockConstructorTestingTNewValidator) *Validator { +}) *Validator { mock := &Validator{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/verifier.go b/consensus/hotstuff/mocks/verifier.go index 03cd04a934d..53c56f698f2 100644 --- a/consensus/hotstuff/mocks/verifier.go +++ b/consensus/hotstuff/mocks/verifier.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,10 @@ type Verifier struct { func (_m *Verifier) VerifyQC(signers flow.GenericIdentityList[flow.IdentitySkeleton], sigData []byte, view uint64, blockID flow.Identifier) error { ret := _m.Called(signers, sigData, view, blockID) + if len(ret) == 0 { + panic("no return value specified for VerifyQC") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.GenericIdentityList[flow.IdentitySkeleton], []byte, uint64, flow.Identifier) error); ok { r0 = rf(signers, sigData, view, blockID) @@ -31,6 +35,10 @@ func (_m *Verifier) VerifyQC(signers flow.GenericIdentityList[flow.IdentitySkele func (_m *Verifier) VerifyTC(signers flow.GenericIdentityList[flow.IdentitySkeleton], sigData []byte, view uint64, highQCViews []uint64) error { ret := _m.Called(signers, sigData, view, highQCViews) + if len(ret) == 0 { + panic("no return value specified for VerifyTC") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.GenericIdentityList[flow.IdentitySkeleton], []byte, uint64, []uint64) error); ok { r0 = rf(signers, sigData, view, highQCViews) @@ -45,6 +53,10 @@ func (_m *Verifier) VerifyTC(signers flow.GenericIdentityList[flow.IdentitySkele func (_m *Verifier) VerifyVote(voter *flow.IdentitySkeleton, sigData []byte, view uint64, blockID flow.Identifier) error { ret := _m.Called(voter, sigData, view, blockID) + if len(ret) == 0 { + panic("no return value specified for VerifyVote") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.IdentitySkeleton, []byte, uint64, flow.Identifier) error); ok { r0 = rf(voter, sigData, view, blockID) @@ -55,13 +67,12 @@ func (_m *Verifier) VerifyVote(voter *flow.IdentitySkeleton, sigData []byte, vie return r0 } -type mockConstructorTestingTNewVerifier interface { +// NewVerifier creates a new instance of Verifier. 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 NewVerifier(t interface { mock.TestingT Cleanup(func()) -} - -// NewVerifier creates a new instance of Verifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVerifier(t mockConstructorTestingTNewVerifier) *Verifier { +}) *Verifier { mock := &Verifier{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/verifying_vote_processor.go b/consensus/hotstuff/mocks/verifying_vote_processor.go index beaada561e3..34d4a3cac8a 100644 --- a/consensus/hotstuff/mocks/verifying_vote_processor.go +++ b/consensus/hotstuff/mocks/verifying_vote_processor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type VerifyingVoteProcessor struct { func (_m *VerifyingVoteProcessor) Block() *model.Block { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *model.Block if rf, ok := ret.Get(0).(func() *model.Block); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *VerifyingVoteProcessor) Block() *model.Block { func (_m *VerifyingVoteProcessor) Process(vote *model.Vote) error { ret := _m.Called(vote) + if len(ret) == 0 { + panic("no return value specified for Process") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.Vote) error); ok { r0 = rf(vote) @@ -48,6 +56,10 @@ func (_m *VerifyingVoteProcessor) Process(vote *model.Vote) error { func (_m *VerifyingVoteProcessor) Status() hotstuff.VoteCollectorStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 hotstuff.VoteCollectorStatus if rf, ok := ret.Get(0).(func() hotstuff.VoteCollectorStatus); ok { r0 = rf() @@ -58,13 +70,12 @@ func (_m *VerifyingVoteProcessor) Status() hotstuff.VoteCollectorStatus { return r0 } -type mockConstructorTestingTNewVerifyingVoteProcessor interface { +// NewVerifyingVoteProcessor creates a new instance of VerifyingVoteProcessor. 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 NewVerifyingVoteProcessor(t interface { mock.TestingT Cleanup(func()) -} - -// NewVerifyingVoteProcessor creates a new instance of VerifyingVoteProcessor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVerifyingVoteProcessor(t mockConstructorTestingTNewVerifyingVoteProcessor) *VerifyingVoteProcessor { +}) *VerifyingVoteProcessor { mock := &VerifyingVoteProcessor{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_aggregation_consumer.go b/consensus/hotstuff/mocks/vote_aggregation_consumer.go index 0ab7b7f53aa..23ceb89ee6a 100644 --- a/consensus/hotstuff/mocks/vote_aggregation_consumer.go +++ b/consensus/hotstuff/mocks/vote_aggregation_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -40,13 +40,12 @@ func (_m *VoteAggregationConsumer) OnVoteProcessed(vote *model.Vote) { _m.Called(vote) } -type mockConstructorTestingTNewVoteAggregationConsumer interface { +// NewVoteAggregationConsumer creates a new instance of VoteAggregationConsumer. 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 NewVoteAggregationConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteAggregationConsumer creates a new instance of VoteAggregationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteAggregationConsumer(t mockConstructorTestingTNewVoteAggregationConsumer) *VoteAggregationConsumer { +}) *VoteAggregationConsumer { mock := &VoteAggregationConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_aggregation_violation_consumer.go b/consensus/hotstuff/mocks/vote_aggregation_violation_consumer.go index c27e40c1513..acac87cdce9 100644 --- a/consensus/hotstuff/mocks/vote_aggregation_violation_consumer.go +++ b/consensus/hotstuff/mocks/vote_aggregation_violation_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -27,13 +27,12 @@ func (_m *VoteAggregationViolationConsumer) OnVoteForInvalidBlockDetected(vote * _m.Called(vote, invalidProposal) } -type mockConstructorTestingTNewVoteAggregationViolationConsumer interface { +// NewVoteAggregationViolationConsumer creates a new instance of VoteAggregationViolationConsumer. 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 NewVoteAggregationViolationConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteAggregationViolationConsumer creates a new instance of VoteAggregationViolationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteAggregationViolationConsumer(t mockConstructorTestingTNewVoteAggregationViolationConsumer) *VoteAggregationViolationConsumer { +}) *VoteAggregationViolationConsumer { mock := &VoteAggregationViolationConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_aggregator.go b/consensus/hotstuff/mocks/vote_aggregator.go index 78e0faee344..545990086ea 100644 --- a/consensus/hotstuff/mocks/vote_aggregator.go +++ b/consensus/hotstuff/mocks/vote_aggregator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *VoteAggregator) AddVote(vote *model.Vote) { func (_m *VoteAggregator) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -44,6 +48,10 @@ func (_m *VoteAggregator) Done() <-chan struct{} { func (_m *VoteAggregator) InvalidBlock(block *model.Proposal) error { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for InvalidBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.Proposal) error); ok { r0 = rf(block) @@ -63,6 +71,10 @@ func (_m *VoteAggregator) PruneUpToView(view uint64) { func (_m *VoteAggregator) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -80,13 +92,12 @@ func (_m *VoteAggregator) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewVoteAggregator interface { +// NewVoteAggregator creates a new instance of VoteAggregator. 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 NewVoteAggregator(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteAggregator creates a new instance of VoteAggregator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteAggregator(t mockConstructorTestingTNewVoteAggregator) *VoteAggregator { +}) *VoteAggregator { mock := &VoteAggregator{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_collector.go b/consensus/hotstuff/mocks/vote_collector.go index 9126f896081..5165640a838 100644 --- a/consensus/hotstuff/mocks/vote_collector.go +++ b/consensus/hotstuff/mocks/vote_collector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type VoteCollector struct { func (_m *VoteCollector) AddVote(vote *model.Vote) error { ret := _m.Called(vote) + if len(ret) == 0 { + panic("no return value specified for AddVote") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.Vote) error); ok { r0 = rf(vote) @@ -32,6 +36,10 @@ func (_m *VoteCollector) AddVote(vote *model.Vote) error { func (_m *VoteCollector) ProcessBlock(block *model.Proposal) error { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for ProcessBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.Proposal) error); ok { r0 = rf(block) @@ -51,6 +59,10 @@ func (_m *VoteCollector) RegisterVoteConsumer(consumer hotstuff.VoteConsumer) { func (_m *VoteCollector) Status() hotstuff.VoteCollectorStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 hotstuff.VoteCollectorStatus if rf, ok := ret.Get(0).(func() hotstuff.VoteCollectorStatus); ok { r0 = rf() @@ -65,6 +77,10 @@ func (_m *VoteCollector) Status() hotstuff.VoteCollectorStatus { func (_m *VoteCollector) View() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for View") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -75,13 +91,12 @@ func (_m *VoteCollector) View() uint64 { return r0 } -type mockConstructorTestingTNewVoteCollector interface { +// NewVoteCollector creates a new instance of VoteCollector. 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 NewVoteCollector(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteCollector creates a new instance of VoteCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteCollector(t mockConstructorTestingTNewVoteCollector) *VoteCollector { +}) *VoteCollector { mock := &VoteCollector{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_collector_consumer.go b/consensus/hotstuff/mocks/vote_collector_consumer.go index 5c5b064e975..934b2a66180 100644 --- a/consensus/hotstuff/mocks/vote_collector_consumer.go +++ b/consensus/hotstuff/mocks/vote_collector_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -25,13 +25,12 @@ func (_m *VoteCollectorConsumer) OnVoteProcessed(vote *model.Vote) { _m.Called(vote) } -type mockConstructorTestingTNewVoteCollectorConsumer interface { +// NewVoteCollectorConsumer creates a new instance of VoteCollectorConsumer. 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 NewVoteCollectorConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteCollectorConsumer creates a new instance of VoteCollectorConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteCollectorConsumer(t mockConstructorTestingTNewVoteCollectorConsumer) *VoteCollectorConsumer { +}) *VoteCollectorConsumer { mock := &VoteCollectorConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_collectors.go b/consensus/hotstuff/mocks/vote_collectors.go index 18ae2b9e18d..54f2d38d343 100644 --- a/consensus/hotstuff/mocks/vote_collectors.go +++ b/consensus/hotstuff/mocks/vote_collectors.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type VoteCollectors struct { func (_m *VoteCollectors) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *VoteCollectors) Done() <-chan struct{} { func (_m *VoteCollectors) GetOrCreateCollector(view uint64) (hotstuff.VoteCollector, bool, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for GetOrCreateCollector") + } + var r0 hotstuff.VoteCollector var r1 bool var r2 error @@ -72,6 +80,10 @@ func (_m *VoteCollectors) PruneUpToView(lowestRetainedView uint64) { func (_m *VoteCollectors) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -89,13 +101,12 @@ func (_m *VoteCollectors) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewVoteCollectors interface { +// NewVoteCollectors creates a new instance of VoteCollectors. 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 NewVoteCollectors(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteCollectors creates a new instance of VoteCollectors. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteCollectors(t mockConstructorTestingTNewVoteCollectors) *VoteCollectors { +}) *VoteCollectors { mock := &VoteCollectors{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_consumer.go b/consensus/hotstuff/mocks/vote_consumer.go index c4065533800..5a2f9d4f60a 100644 --- a/consensus/hotstuff/mocks/vote_consumer.go +++ b/consensus/hotstuff/mocks/vote_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,13 +17,12 @@ func (_m *VoteConsumer) Execute(vote *model.Vote) { _m.Called(vote) } -type mockConstructorTestingTNewVoteConsumer interface { +// NewVoteConsumer creates a new instance of VoteConsumer. 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 NewVoteConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteConsumer creates a new instance of VoteConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteConsumer(t mockConstructorTestingTNewVoteConsumer) *VoteConsumer { +}) *VoteConsumer { mock := &VoteConsumer{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_processor.go b/consensus/hotstuff/mocks/vote_processor.go index f69c48bd7be..50b093b7997 100644 --- a/consensus/hotstuff/mocks/vote_processor.go +++ b/consensus/hotstuff/mocks/vote_processor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type VoteProcessor struct { func (_m *VoteProcessor) Process(vote *model.Vote) error { ret := _m.Called(vote) + if len(ret) == 0 { + panic("no return value specified for Process") + } + var r0 error if rf, ok := ret.Get(0).(func(*model.Vote) error); ok { r0 = rf(vote) @@ -32,6 +36,10 @@ func (_m *VoteProcessor) Process(vote *model.Vote) error { func (_m *VoteProcessor) Status() hotstuff.VoteCollectorStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 hotstuff.VoteCollectorStatus if rf, ok := ret.Get(0).(func() hotstuff.VoteCollectorStatus); ok { r0 = rf() @@ -42,13 +50,12 @@ func (_m *VoteProcessor) Status() hotstuff.VoteCollectorStatus { return r0 } -type mockConstructorTestingTNewVoteProcessor interface { +// NewVoteProcessor creates a new instance of VoteProcessor. 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 NewVoteProcessor(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteProcessor creates a new instance of VoteProcessor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteProcessor(t mockConstructorTestingTNewVoteProcessor) *VoteProcessor { +}) *VoteProcessor { mock := &VoteProcessor{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/vote_processor_factory.go b/consensus/hotstuff/mocks/vote_processor_factory.go index 5b45997dbf5..cb87a8568c3 100644 --- a/consensus/hotstuff/mocks/vote_processor_factory.go +++ b/consensus/hotstuff/mocks/vote_processor_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -20,6 +20,10 @@ type VoteProcessorFactory struct { func (_m *VoteProcessorFactory) Create(log zerolog.Logger, proposal *model.Proposal) (hotstuff.VerifyingVoteProcessor, error) { ret := _m.Called(log, proposal) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 hotstuff.VerifyingVoteProcessor var r1 error if rf, ok := ret.Get(0).(func(zerolog.Logger, *model.Proposal) (hotstuff.VerifyingVoteProcessor, error)); ok { @@ -42,13 +46,12 @@ func (_m *VoteProcessorFactory) Create(log zerolog.Logger, proposal *model.Propo return r0, r1 } -type mockConstructorTestingTNewVoteProcessorFactory interface { +// NewVoteProcessorFactory creates a new instance of VoteProcessorFactory. 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 NewVoteProcessorFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewVoteProcessorFactory creates a new instance of VoteProcessorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVoteProcessorFactory(t mockConstructorTestingTNewVoteProcessorFactory) *VoteProcessorFactory { +}) *VoteProcessorFactory { mock := &VoteProcessorFactory{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/weighted_signature_aggregator.go b/consensus/hotstuff/mocks/weighted_signature_aggregator.go index 7b3bac6a023..ca06509b641 100644 --- a/consensus/hotstuff/mocks/weighted_signature_aggregator.go +++ b/consensus/hotstuff/mocks/weighted_signature_aggregator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,10 @@ type WeightedSignatureAggregator struct { func (_m *WeightedSignatureAggregator) Aggregate() (flow.IdentifierList, []byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Aggregate") + } + var r0 flow.IdentifierList var r1 []byte var r2 error @@ -53,6 +57,10 @@ func (_m *WeightedSignatureAggregator) Aggregate() (flow.IdentifierList, []byte, func (_m *WeightedSignatureAggregator) TotalWeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TotalWeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -67,6 +75,10 @@ func (_m *WeightedSignatureAggregator) TotalWeight() uint64 { func (_m *WeightedSignatureAggregator) TrustedAdd(signerID flow.Identifier, sig crypto.Signature) (uint64, error) { ret := _m.Called(signerID, sig) + if len(ret) == 0 { + panic("no return value specified for TrustedAdd") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) (uint64, error)); ok { @@ -91,6 +103,10 @@ func (_m *WeightedSignatureAggregator) TrustedAdd(signerID flow.Identifier, sig func (_m *WeightedSignatureAggregator) Verify(signerID flow.Identifier, sig crypto.Signature) error { ret := _m.Called(signerID, sig) + if len(ret) == 0 { + panic("no return value specified for Verify") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, crypto.Signature) error); ok { r0 = rf(signerID, sig) @@ -101,13 +117,12 @@ func (_m *WeightedSignatureAggregator) Verify(signerID flow.Identifier, sig cryp return r0 } -type mockConstructorTestingTNewWeightedSignatureAggregator interface { +// NewWeightedSignatureAggregator creates a new instance of WeightedSignatureAggregator. 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 NewWeightedSignatureAggregator(t interface { mock.TestingT Cleanup(func()) -} - -// NewWeightedSignatureAggregator creates a new instance of WeightedSignatureAggregator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWeightedSignatureAggregator(t mockConstructorTestingTNewWeightedSignatureAggregator) *WeightedSignatureAggregator { +}) *WeightedSignatureAggregator { mock := &WeightedSignatureAggregator{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/workerpool.go b/consensus/hotstuff/mocks/workerpool.go index faeeb74d433..50c265b6cb1 100644 --- a/consensus/hotstuff/mocks/workerpool.go +++ b/consensus/hotstuff/mocks/workerpool.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -19,13 +19,12 @@ func (_m *Workerpool) Submit(task func()) { _m.Called(task) } -type mockConstructorTestingTNewWorkerpool interface { +// NewWorkerpool creates a new instance of Workerpool. 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 NewWorkerpool(t interface { mock.TestingT Cleanup(func()) -} - -// NewWorkerpool creates a new instance of Workerpool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWorkerpool(t mockConstructorTestingTNewWorkerpool) *Workerpool { +}) *Workerpool { mock := &Workerpool{} mock.Mock.Test(t) diff --git a/consensus/hotstuff/mocks/workers.go b/consensus/hotstuff/mocks/workers.go index ef6e359df4c..e66c41a7f0a 100644 --- a/consensus/hotstuff/mocks/workers.go +++ b/consensus/hotstuff/mocks/workers.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,13 +14,12 @@ func (_m *Workers) Submit(task func()) { _m.Called(task) } -type mockConstructorTestingTNewWorkers interface { +// NewWorkers creates a new instance of Workers. 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 NewWorkers(t interface { mock.TestingT Cleanup(func()) -} - -// NewWorkers creates a new instance of Workers. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWorkers(t mockConstructorTestingTNewWorkers) *Workers { +}) *Workers { mock := &Workers{} mock.Mock.Test(t) diff --git a/engine/access/mock/access_api_client.go b/engine/access/mock/access_api_client.go index 9db3266e7b8..261365e0b4b 100644 --- a/engine/access/mock/access_api_client.go +++ b/engine/access/mock/access_api_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -28,6 +28,10 @@ func (_m *AccessAPIClient) ExecuteScriptAtBlockHeight(ctx context.Context, in *a _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockHeight") + } + var r0 *access.ExecuteScriptResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.ExecuteScriptAtBlockHeightRequest, ...grpc.CallOption) (*access.ExecuteScriptResponse, error)); ok { @@ -61,6 +65,10 @@ func (_m *AccessAPIClient) ExecuteScriptAtBlockID(ctx context.Context, in *acces _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockID") + } + var r0 *access.ExecuteScriptResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.ExecuteScriptAtBlockIDRequest, ...grpc.CallOption) (*access.ExecuteScriptResponse, error)); ok { @@ -94,6 +102,10 @@ func (_m *AccessAPIClient) ExecuteScriptAtLatestBlock(ctx context.Context, in *a _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtLatestBlock") + } + var r0 *access.ExecuteScriptResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.ExecuteScriptAtLatestBlockRequest, ...grpc.CallOption) (*access.ExecuteScriptResponse, error)); ok { @@ -127,6 +139,10 @@ func (_m *AccessAPIClient) GetAccount(ctx context.Context, in *access.GetAccount _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *access.GetAccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetAccountRequest, ...grpc.CallOption) (*access.GetAccountResponse, error)); ok { @@ -160,6 +176,10 @@ func (_m *AccessAPIClient) GetAccountAtBlockHeight(ctx context.Context, in *acce _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtBlockHeight") + } + var r0 *access.AccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetAccountAtBlockHeightRequest, ...grpc.CallOption) (*access.AccountResponse, error)); ok { @@ -193,6 +213,10 @@ func (_m *AccessAPIClient) GetAccountAtLatestBlock(ctx context.Context, in *acce _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtLatestBlock") + } + var r0 *access.AccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetAccountAtLatestBlockRequest, ...grpc.CallOption) (*access.AccountResponse, error)); ok { @@ -226,6 +250,10 @@ func (_m *AccessAPIClient) GetBlockByHeight(ctx context.Context, in *access.GetB _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetBlockByHeight") + } + var r0 *access.BlockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetBlockByHeightRequest, ...grpc.CallOption) (*access.BlockResponse, error)); ok { @@ -259,6 +287,10 @@ func (_m *AccessAPIClient) GetBlockByID(ctx context.Context, in *access.GetBlock _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetBlockByID") + } + var r0 *access.BlockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetBlockByIDRequest, ...grpc.CallOption) (*access.BlockResponse, error)); ok { @@ -292,6 +324,10 @@ func (_m *AccessAPIClient) GetBlockHeaderByHeight(ctx context.Context, in *acces _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByHeight") + } + var r0 *access.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetBlockHeaderByHeightRequest, ...grpc.CallOption) (*access.BlockHeaderResponse, error)); ok { @@ -325,6 +361,10 @@ func (_m *AccessAPIClient) GetBlockHeaderByID(ctx context.Context, in *access.Ge _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByID") + } + var r0 *access.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetBlockHeaderByIDRequest, ...grpc.CallOption) (*access.BlockHeaderResponse, error)); ok { @@ -358,6 +398,10 @@ func (_m *AccessAPIClient) GetCollectionByID(ctx context.Context, in *access.Get _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetCollectionByID") + } + var r0 *access.CollectionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetCollectionByIDRequest, ...grpc.CallOption) (*access.CollectionResponse, error)); ok { @@ -391,6 +435,10 @@ func (_m *AccessAPIClient) GetEventsForBlockIDs(ctx context.Context, in *access. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetEventsForBlockIDs") + } + var r0 *access.EventsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetEventsForBlockIDsRequest, ...grpc.CallOption) (*access.EventsResponse, error)); ok { @@ -424,6 +472,10 @@ func (_m *AccessAPIClient) GetEventsForHeightRange(ctx context.Context, in *acce _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetEventsForHeightRange") + } + var r0 *access.EventsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetEventsForHeightRangeRequest, ...grpc.CallOption) (*access.EventsResponse, error)); ok { @@ -457,6 +509,10 @@ func (_m *AccessAPIClient) GetExecutionResultByID(ctx context.Context, in *acces _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultByID") + } + var r0 *access.ExecutionResultByIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetExecutionResultByIDRequest, ...grpc.CallOption) (*access.ExecutionResultByIDResponse, error)); ok { @@ -490,6 +546,10 @@ func (_m *AccessAPIClient) GetExecutionResultForBlockID(ctx context.Context, in _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultForBlockID") + } + var r0 *access.ExecutionResultForBlockIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetExecutionResultForBlockIDRequest, ...grpc.CallOption) (*access.ExecutionResultForBlockIDResponse, error)); ok { @@ -523,6 +583,10 @@ func (_m *AccessAPIClient) GetFullCollectionByID(ctx context.Context, in *access _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetFullCollectionByID") + } + var r0 *access.FullCollectionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetFullCollectionByIDRequest, ...grpc.CallOption) (*access.FullCollectionResponse, error)); ok { @@ -556,6 +620,10 @@ func (_m *AccessAPIClient) GetLatestBlock(ctx context.Context, in *access.GetLat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlock") + } + var r0 *access.BlockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetLatestBlockRequest, ...grpc.CallOption) (*access.BlockResponse, error)); ok { @@ -589,6 +657,10 @@ func (_m *AccessAPIClient) GetLatestBlockHeader(ctx context.Context, in *access. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + var r0 *access.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetLatestBlockHeaderRequest, ...grpc.CallOption) (*access.BlockHeaderResponse, error)); ok { @@ -622,6 +694,10 @@ func (_m *AccessAPIClient) GetLatestProtocolStateSnapshot(ctx context.Context, i _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetLatestProtocolStateSnapshot") + } + var r0 *access.ProtocolStateSnapshotResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetLatestProtocolStateSnapshotRequest, ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error)); ok { @@ -655,6 +731,10 @@ func (_m *AccessAPIClient) GetNetworkParameters(ctx context.Context, in *access. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetNetworkParameters") + } + var r0 *access.GetNetworkParametersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetNetworkParametersRequest, ...grpc.CallOption) (*access.GetNetworkParametersResponse, error)); ok { @@ -688,6 +768,10 @@ func (_m *AccessAPIClient) GetNodeVersionInfo(ctx context.Context, in *access.Ge _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetNodeVersionInfo") + } + var r0 *access.GetNodeVersionInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetNodeVersionInfoRequest, ...grpc.CallOption) (*access.GetNodeVersionInfoResponse, error)); ok { @@ -721,6 +805,10 @@ func (_m *AccessAPIClient) GetProtocolStateSnapshotByBlockID(ctx context.Context _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateSnapshotByBlockID") + } + var r0 *access.ProtocolStateSnapshotResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetProtocolStateSnapshotByBlockIDRequest, ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error)); ok { @@ -754,6 +842,10 @@ func (_m *AccessAPIClient) GetProtocolStateSnapshotByHeight(ctx context.Context, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateSnapshotByHeight") + } + var r0 *access.ProtocolStateSnapshotResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetProtocolStateSnapshotByHeightRequest, ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error)); ok { @@ -787,6 +879,10 @@ func (_m *AccessAPIClient) GetSystemTransaction(ctx context.Context, in *access. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetSystemTransaction") + } + var r0 *access.TransactionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetSystemTransactionRequest, ...grpc.CallOption) (*access.TransactionResponse, error)); ok { @@ -820,6 +916,10 @@ func (_m *AccessAPIClient) GetSystemTransactionResult(ctx context.Context, in *a _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetSystemTransactionResult") + } + var r0 *access.TransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetSystemTransactionResultRequest, ...grpc.CallOption) (*access.TransactionResultResponse, error)); ok { @@ -853,6 +953,10 @@ func (_m *AccessAPIClient) GetTransaction(ctx context.Context, in *access.GetTra _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransaction") + } + var r0 *access.TransactionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionRequest, ...grpc.CallOption) (*access.TransactionResponse, error)); ok { @@ -886,6 +990,10 @@ func (_m *AccessAPIClient) GetTransactionResult(ctx context.Context, in *access. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResult") + } + var r0 *access.TransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionRequest, ...grpc.CallOption) (*access.TransactionResultResponse, error)); ok { @@ -919,6 +1027,10 @@ func (_m *AccessAPIClient) GetTransactionResultByIndex(ctx context.Context, in * _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultByIndex") + } + var r0 *access.TransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionByIndexRequest, ...grpc.CallOption) (*access.TransactionResultResponse, error)); ok { @@ -952,6 +1064,10 @@ func (_m *AccessAPIClient) GetTransactionResultsByBlockID(ctx context.Context, i _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultsByBlockID") + } + var r0 *access.TransactionResultsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionsByBlockIDRequest, ...grpc.CallOption) (*access.TransactionResultsResponse, error)); ok { @@ -985,6 +1101,10 @@ func (_m *AccessAPIClient) GetTransactionsByBlockID(ctx context.Context, in *acc _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionsByBlockID") + } + var r0 *access.TransactionsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionsByBlockIDRequest, ...grpc.CallOption) (*access.TransactionsResponse, error)); ok { @@ -1018,6 +1138,10 @@ func (_m *AccessAPIClient) Ping(ctx context.Context, in *access.PingRequest, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 *access.PingResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.PingRequest, ...grpc.CallOption) (*access.PingResponse, error)); ok { @@ -1051,6 +1175,10 @@ func (_m *AccessAPIClient) SendAndSubscribeTransactionStatuses(ctx context.Conte _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SendAndSubscribeTransactionStatuses") + } + var r0 access.AccessAPI_SendAndSubscribeTransactionStatusesClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SendAndSubscribeTransactionStatusesRequest, ...grpc.CallOption) (access.AccessAPI_SendAndSubscribeTransactionStatusesClient, error)); ok { @@ -1084,6 +1212,10 @@ func (_m *AccessAPIClient) SendTransaction(ctx context.Context, in *access.SendT _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SendTransaction") + } + var r0 *access.SendTransactionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SendTransactionRequest, ...grpc.CallOption) (*access.SendTransactionResponse, error)); ok { @@ -1117,6 +1249,10 @@ func (_m *AccessAPIClient) SubscribeBlockDigestsFromLatest(ctx context.Context, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromLatest") + } + var r0 access.AccessAPI_SubscribeBlockDigestsFromLatestClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlockDigestsFromLatestRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromLatestClient, error)); ok { @@ -1150,6 +1286,10 @@ func (_m *AccessAPIClient) SubscribeBlockDigestsFromStartBlockID(ctx context.Con _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromStartBlockID") + } + var r0 access.AccessAPI_SubscribeBlockDigestsFromStartBlockIDClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlockDigestsFromStartBlockIDRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromStartBlockIDClient, error)); ok { @@ -1183,6 +1323,10 @@ func (_m *AccessAPIClient) SubscribeBlockDigestsFromStartHeight(ctx context.Cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromStartHeight") + } + var r0 access.AccessAPI_SubscribeBlockDigestsFromStartHeightClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlockDigestsFromStartHeightRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromStartHeightClient, error)); ok { @@ -1216,6 +1360,10 @@ func (_m *AccessAPIClient) SubscribeBlockHeadersFromLatest(ctx context.Context, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromLatest") + } + var r0 access.AccessAPI_SubscribeBlockHeadersFromLatestClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlockHeadersFromLatestRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromLatestClient, error)); ok { @@ -1249,6 +1397,10 @@ func (_m *AccessAPIClient) SubscribeBlockHeadersFromStartBlockID(ctx context.Con _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromStartBlockID") + } + var r0 access.AccessAPI_SubscribeBlockHeadersFromStartBlockIDClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlockHeadersFromStartBlockIDRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromStartBlockIDClient, error)); ok { @@ -1282,6 +1434,10 @@ func (_m *AccessAPIClient) SubscribeBlockHeadersFromStartHeight(ctx context.Cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromStartHeight") + } + var r0 access.AccessAPI_SubscribeBlockHeadersFromStartHeightClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlockHeadersFromStartHeightRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromStartHeightClient, error)); ok { @@ -1315,6 +1471,10 @@ func (_m *AccessAPIClient) SubscribeBlocksFromLatest(ctx context.Context, in *ac _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromLatest") + } + var r0 access.AccessAPI_SubscribeBlocksFromLatestClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlocksFromLatestRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromLatestClient, error)); ok { @@ -1348,6 +1508,10 @@ func (_m *AccessAPIClient) SubscribeBlocksFromStartBlockID(ctx context.Context, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromStartBlockID") + } + var r0 access.AccessAPI_SubscribeBlocksFromStartBlockIDClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlocksFromStartBlockIDRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromStartBlockIDClient, error)); ok { @@ -1381,6 +1545,10 @@ func (_m *AccessAPIClient) SubscribeBlocksFromStartHeight(ctx context.Context, i _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromStartHeight") + } + var r0 access.AccessAPI_SubscribeBlocksFromStartHeightClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SubscribeBlocksFromStartHeightRequest, ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromStartHeightClient, error)); ok { @@ -1403,13 +1571,12 @@ func (_m *AccessAPIClient) SubscribeBlocksFromStartHeight(ctx context.Context, i return r0, r1 } -type mockConstructorTestingTNewAccessAPIClient interface { +// NewAccessAPIClient creates a new instance of AccessAPIClient. 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 NewAccessAPIClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccessAPIClient creates a new instance of AccessAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccessAPIClient(t mockConstructorTestingTNewAccessAPIClient) *AccessAPIClient { +}) *AccessAPIClient { mock := &AccessAPIClient{} mock.Mock.Test(t) diff --git a/engine/access/mock/access_api_server.go b/engine/access/mock/access_api_server.go index b5f6d02ce98..7c40fd22c54 100644 --- a/engine/access/mock/access_api_server.go +++ b/engine/access/mock/access_api_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type AccessAPIServer struct { func (_m *AccessAPIServer) ExecuteScriptAtBlockHeight(_a0 context.Context, _a1 *access.ExecuteScriptAtBlockHeightRequest) (*access.ExecuteScriptResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockHeight") + } + var r0 *access.ExecuteScriptResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.ExecuteScriptAtBlockHeightRequest) (*access.ExecuteScriptResponse, error)); ok { @@ -45,6 +49,10 @@ func (_m *AccessAPIServer) ExecuteScriptAtBlockHeight(_a0 context.Context, _a1 * func (_m *AccessAPIServer) ExecuteScriptAtBlockID(_a0 context.Context, _a1 *access.ExecuteScriptAtBlockIDRequest) (*access.ExecuteScriptResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockID") + } + var r0 *access.ExecuteScriptResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.ExecuteScriptAtBlockIDRequest) (*access.ExecuteScriptResponse, error)); ok { @@ -71,6 +79,10 @@ func (_m *AccessAPIServer) ExecuteScriptAtBlockID(_a0 context.Context, _a1 *acce func (_m *AccessAPIServer) ExecuteScriptAtLatestBlock(_a0 context.Context, _a1 *access.ExecuteScriptAtLatestBlockRequest) (*access.ExecuteScriptResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtLatestBlock") + } + var r0 *access.ExecuteScriptResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.ExecuteScriptAtLatestBlockRequest) (*access.ExecuteScriptResponse, error)); ok { @@ -97,6 +109,10 @@ func (_m *AccessAPIServer) ExecuteScriptAtLatestBlock(_a0 context.Context, _a1 * func (_m *AccessAPIServer) GetAccount(_a0 context.Context, _a1 *access.GetAccountRequest) (*access.GetAccountResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *access.GetAccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetAccountRequest) (*access.GetAccountResponse, error)); ok { @@ -123,6 +139,10 @@ func (_m *AccessAPIServer) GetAccount(_a0 context.Context, _a1 *access.GetAccoun func (_m *AccessAPIServer) GetAccountAtBlockHeight(_a0 context.Context, _a1 *access.GetAccountAtBlockHeightRequest) (*access.AccountResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtBlockHeight") + } + var r0 *access.AccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetAccountAtBlockHeightRequest) (*access.AccountResponse, error)); ok { @@ -149,6 +169,10 @@ func (_m *AccessAPIServer) GetAccountAtBlockHeight(_a0 context.Context, _a1 *acc func (_m *AccessAPIServer) GetAccountAtLatestBlock(_a0 context.Context, _a1 *access.GetAccountAtLatestBlockRequest) (*access.AccountResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtLatestBlock") + } + var r0 *access.AccountResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetAccountAtLatestBlockRequest) (*access.AccountResponse, error)); ok { @@ -175,6 +199,10 @@ func (_m *AccessAPIServer) GetAccountAtLatestBlock(_a0 context.Context, _a1 *acc func (_m *AccessAPIServer) GetBlockByHeight(_a0 context.Context, _a1 *access.GetBlockByHeightRequest) (*access.BlockResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetBlockByHeight") + } + var r0 *access.BlockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetBlockByHeightRequest) (*access.BlockResponse, error)); ok { @@ -201,6 +229,10 @@ func (_m *AccessAPIServer) GetBlockByHeight(_a0 context.Context, _a1 *access.Get func (_m *AccessAPIServer) GetBlockByID(_a0 context.Context, _a1 *access.GetBlockByIDRequest) (*access.BlockResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetBlockByID") + } + var r0 *access.BlockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetBlockByIDRequest) (*access.BlockResponse, error)); ok { @@ -227,6 +259,10 @@ func (_m *AccessAPIServer) GetBlockByID(_a0 context.Context, _a1 *access.GetBloc func (_m *AccessAPIServer) GetBlockHeaderByHeight(_a0 context.Context, _a1 *access.GetBlockHeaderByHeightRequest) (*access.BlockHeaderResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByHeight") + } + var r0 *access.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetBlockHeaderByHeightRequest) (*access.BlockHeaderResponse, error)); ok { @@ -253,6 +289,10 @@ func (_m *AccessAPIServer) GetBlockHeaderByHeight(_a0 context.Context, _a1 *acce func (_m *AccessAPIServer) GetBlockHeaderByID(_a0 context.Context, _a1 *access.GetBlockHeaderByIDRequest) (*access.BlockHeaderResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByID") + } + var r0 *access.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetBlockHeaderByIDRequest) (*access.BlockHeaderResponse, error)); ok { @@ -279,6 +319,10 @@ func (_m *AccessAPIServer) GetBlockHeaderByID(_a0 context.Context, _a1 *access.G func (_m *AccessAPIServer) GetCollectionByID(_a0 context.Context, _a1 *access.GetCollectionByIDRequest) (*access.CollectionResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetCollectionByID") + } + var r0 *access.CollectionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetCollectionByIDRequest) (*access.CollectionResponse, error)); ok { @@ -305,6 +349,10 @@ func (_m *AccessAPIServer) GetCollectionByID(_a0 context.Context, _a1 *access.Ge func (_m *AccessAPIServer) GetEventsForBlockIDs(_a0 context.Context, _a1 *access.GetEventsForBlockIDsRequest) (*access.EventsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetEventsForBlockIDs") + } + var r0 *access.EventsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetEventsForBlockIDsRequest) (*access.EventsResponse, error)); ok { @@ -331,6 +379,10 @@ func (_m *AccessAPIServer) GetEventsForBlockIDs(_a0 context.Context, _a1 *access func (_m *AccessAPIServer) GetEventsForHeightRange(_a0 context.Context, _a1 *access.GetEventsForHeightRangeRequest) (*access.EventsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetEventsForHeightRange") + } + var r0 *access.EventsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetEventsForHeightRangeRequest) (*access.EventsResponse, error)); ok { @@ -357,6 +409,10 @@ func (_m *AccessAPIServer) GetEventsForHeightRange(_a0 context.Context, _a1 *acc func (_m *AccessAPIServer) GetExecutionResultByID(_a0 context.Context, _a1 *access.GetExecutionResultByIDRequest) (*access.ExecutionResultByIDResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultByID") + } + var r0 *access.ExecutionResultByIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetExecutionResultByIDRequest) (*access.ExecutionResultByIDResponse, error)); ok { @@ -383,6 +439,10 @@ func (_m *AccessAPIServer) GetExecutionResultByID(_a0 context.Context, _a1 *acce func (_m *AccessAPIServer) GetExecutionResultForBlockID(_a0 context.Context, _a1 *access.GetExecutionResultForBlockIDRequest) (*access.ExecutionResultForBlockIDResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultForBlockID") + } + var r0 *access.ExecutionResultForBlockIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetExecutionResultForBlockIDRequest) (*access.ExecutionResultForBlockIDResponse, error)); ok { @@ -409,6 +469,10 @@ func (_m *AccessAPIServer) GetExecutionResultForBlockID(_a0 context.Context, _a1 func (_m *AccessAPIServer) GetFullCollectionByID(_a0 context.Context, _a1 *access.GetFullCollectionByIDRequest) (*access.FullCollectionResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetFullCollectionByID") + } + var r0 *access.FullCollectionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetFullCollectionByIDRequest) (*access.FullCollectionResponse, error)); ok { @@ -435,6 +499,10 @@ func (_m *AccessAPIServer) GetFullCollectionByID(_a0 context.Context, _a1 *acces func (_m *AccessAPIServer) GetLatestBlock(_a0 context.Context, _a1 *access.GetLatestBlockRequest) (*access.BlockResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlock") + } + var r0 *access.BlockResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetLatestBlockRequest) (*access.BlockResponse, error)); ok { @@ -461,6 +529,10 @@ func (_m *AccessAPIServer) GetLatestBlock(_a0 context.Context, _a1 *access.GetLa func (_m *AccessAPIServer) GetLatestBlockHeader(_a0 context.Context, _a1 *access.GetLatestBlockHeaderRequest) (*access.BlockHeaderResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + var r0 *access.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetLatestBlockHeaderRequest) (*access.BlockHeaderResponse, error)); ok { @@ -487,6 +559,10 @@ func (_m *AccessAPIServer) GetLatestBlockHeader(_a0 context.Context, _a1 *access func (_m *AccessAPIServer) GetLatestProtocolStateSnapshot(_a0 context.Context, _a1 *access.GetLatestProtocolStateSnapshotRequest) (*access.ProtocolStateSnapshotResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetLatestProtocolStateSnapshot") + } + var r0 *access.ProtocolStateSnapshotResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetLatestProtocolStateSnapshotRequest) (*access.ProtocolStateSnapshotResponse, error)); ok { @@ -513,6 +589,10 @@ func (_m *AccessAPIServer) GetLatestProtocolStateSnapshot(_a0 context.Context, _ func (_m *AccessAPIServer) GetNetworkParameters(_a0 context.Context, _a1 *access.GetNetworkParametersRequest) (*access.GetNetworkParametersResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetNetworkParameters") + } + var r0 *access.GetNetworkParametersResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetNetworkParametersRequest) (*access.GetNetworkParametersResponse, error)); ok { @@ -539,6 +619,10 @@ func (_m *AccessAPIServer) GetNetworkParameters(_a0 context.Context, _a1 *access func (_m *AccessAPIServer) GetNodeVersionInfo(_a0 context.Context, _a1 *access.GetNodeVersionInfoRequest) (*access.GetNodeVersionInfoResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetNodeVersionInfo") + } + var r0 *access.GetNodeVersionInfoResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetNodeVersionInfoRequest) (*access.GetNodeVersionInfoResponse, error)); ok { @@ -565,6 +649,10 @@ func (_m *AccessAPIServer) GetNodeVersionInfo(_a0 context.Context, _a1 *access.G func (_m *AccessAPIServer) GetProtocolStateSnapshotByBlockID(_a0 context.Context, _a1 *access.GetProtocolStateSnapshotByBlockIDRequest) (*access.ProtocolStateSnapshotResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateSnapshotByBlockID") + } + var r0 *access.ProtocolStateSnapshotResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetProtocolStateSnapshotByBlockIDRequest) (*access.ProtocolStateSnapshotResponse, error)); ok { @@ -591,6 +679,10 @@ func (_m *AccessAPIServer) GetProtocolStateSnapshotByBlockID(_a0 context.Context func (_m *AccessAPIServer) GetProtocolStateSnapshotByHeight(_a0 context.Context, _a1 *access.GetProtocolStateSnapshotByHeightRequest) (*access.ProtocolStateSnapshotResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateSnapshotByHeight") + } + var r0 *access.ProtocolStateSnapshotResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetProtocolStateSnapshotByHeightRequest) (*access.ProtocolStateSnapshotResponse, error)); ok { @@ -617,6 +709,10 @@ func (_m *AccessAPIServer) GetProtocolStateSnapshotByHeight(_a0 context.Context, func (_m *AccessAPIServer) GetSystemTransaction(_a0 context.Context, _a1 *access.GetSystemTransactionRequest) (*access.TransactionResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetSystemTransaction") + } + var r0 *access.TransactionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetSystemTransactionRequest) (*access.TransactionResponse, error)); ok { @@ -643,6 +739,10 @@ func (_m *AccessAPIServer) GetSystemTransaction(_a0 context.Context, _a1 *access func (_m *AccessAPIServer) GetSystemTransactionResult(_a0 context.Context, _a1 *access.GetSystemTransactionResultRequest) (*access.TransactionResultResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetSystemTransactionResult") + } + var r0 *access.TransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetSystemTransactionResultRequest) (*access.TransactionResultResponse, error)); ok { @@ -669,6 +769,10 @@ func (_m *AccessAPIServer) GetSystemTransactionResult(_a0 context.Context, _a1 * func (_m *AccessAPIServer) GetTransaction(_a0 context.Context, _a1 *access.GetTransactionRequest) (*access.TransactionResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransaction") + } + var r0 *access.TransactionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionRequest) (*access.TransactionResponse, error)); ok { @@ -695,6 +799,10 @@ func (_m *AccessAPIServer) GetTransaction(_a0 context.Context, _a1 *access.GetTr func (_m *AccessAPIServer) GetTransactionResult(_a0 context.Context, _a1 *access.GetTransactionRequest) (*access.TransactionResultResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResult") + } + var r0 *access.TransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionRequest) (*access.TransactionResultResponse, error)); ok { @@ -721,6 +829,10 @@ func (_m *AccessAPIServer) GetTransactionResult(_a0 context.Context, _a1 *access func (_m *AccessAPIServer) GetTransactionResultByIndex(_a0 context.Context, _a1 *access.GetTransactionByIndexRequest) (*access.TransactionResultResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultByIndex") + } + var r0 *access.TransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionByIndexRequest) (*access.TransactionResultResponse, error)); ok { @@ -747,6 +859,10 @@ func (_m *AccessAPIServer) GetTransactionResultByIndex(_a0 context.Context, _a1 func (_m *AccessAPIServer) GetTransactionResultsByBlockID(_a0 context.Context, _a1 *access.GetTransactionsByBlockIDRequest) (*access.TransactionResultsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultsByBlockID") + } + var r0 *access.TransactionResultsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionsByBlockIDRequest) (*access.TransactionResultsResponse, error)); ok { @@ -773,6 +889,10 @@ func (_m *AccessAPIServer) GetTransactionResultsByBlockID(_a0 context.Context, _ func (_m *AccessAPIServer) GetTransactionsByBlockID(_a0 context.Context, _a1 *access.GetTransactionsByBlockIDRequest) (*access.TransactionsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionsByBlockID") + } + var r0 *access.TransactionsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.GetTransactionsByBlockIDRequest) (*access.TransactionsResponse, error)); ok { @@ -799,6 +919,10 @@ func (_m *AccessAPIServer) GetTransactionsByBlockID(_a0 context.Context, _a1 *ac func (_m *AccessAPIServer) Ping(_a0 context.Context, _a1 *access.PingRequest) (*access.PingResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 *access.PingResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.PingRequest) (*access.PingResponse, error)); ok { @@ -825,6 +949,10 @@ func (_m *AccessAPIServer) Ping(_a0 context.Context, _a1 *access.PingRequest) (* func (_m *AccessAPIServer) SendAndSubscribeTransactionStatuses(_a0 *access.SendAndSubscribeTransactionStatusesRequest, _a1 access.AccessAPI_SendAndSubscribeTransactionStatusesServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SendAndSubscribeTransactionStatuses") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SendAndSubscribeTransactionStatusesRequest, access.AccessAPI_SendAndSubscribeTransactionStatusesServer) error); ok { r0 = rf(_a0, _a1) @@ -839,6 +967,10 @@ func (_m *AccessAPIServer) SendAndSubscribeTransactionStatuses(_a0 *access.SendA func (_m *AccessAPIServer) SendTransaction(_a0 context.Context, _a1 *access.SendTransactionRequest) (*access.SendTransactionResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SendTransaction") + } + var r0 *access.SendTransactionResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *access.SendTransactionRequest) (*access.SendTransactionResponse, error)); ok { @@ -865,6 +997,10 @@ func (_m *AccessAPIServer) SendTransaction(_a0 context.Context, _a1 *access.Send func (_m *AccessAPIServer) SubscribeBlockDigestsFromLatest(_a0 *access.SubscribeBlockDigestsFromLatestRequest, _a1 access.AccessAPI_SubscribeBlockDigestsFromLatestServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromLatest") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlockDigestsFromLatestRequest, access.AccessAPI_SubscribeBlockDigestsFromLatestServer) error); ok { r0 = rf(_a0, _a1) @@ -879,6 +1015,10 @@ func (_m *AccessAPIServer) SubscribeBlockDigestsFromLatest(_a0 *access.Subscribe func (_m *AccessAPIServer) SubscribeBlockDigestsFromStartBlockID(_a0 *access.SubscribeBlockDigestsFromStartBlockIDRequest, _a1 access.AccessAPI_SubscribeBlockDigestsFromStartBlockIDServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromStartBlockID") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlockDigestsFromStartBlockIDRequest, access.AccessAPI_SubscribeBlockDigestsFromStartBlockIDServer) error); ok { r0 = rf(_a0, _a1) @@ -893,6 +1033,10 @@ func (_m *AccessAPIServer) SubscribeBlockDigestsFromStartBlockID(_a0 *access.Sub func (_m *AccessAPIServer) SubscribeBlockDigestsFromStartHeight(_a0 *access.SubscribeBlockDigestsFromStartHeightRequest, _a1 access.AccessAPI_SubscribeBlockDigestsFromStartHeightServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockDigestsFromStartHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlockDigestsFromStartHeightRequest, access.AccessAPI_SubscribeBlockDigestsFromStartHeightServer) error); ok { r0 = rf(_a0, _a1) @@ -907,6 +1051,10 @@ func (_m *AccessAPIServer) SubscribeBlockDigestsFromStartHeight(_a0 *access.Subs func (_m *AccessAPIServer) SubscribeBlockHeadersFromLatest(_a0 *access.SubscribeBlockHeadersFromLatestRequest, _a1 access.AccessAPI_SubscribeBlockHeadersFromLatestServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromLatest") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlockHeadersFromLatestRequest, access.AccessAPI_SubscribeBlockHeadersFromLatestServer) error); ok { r0 = rf(_a0, _a1) @@ -921,6 +1069,10 @@ func (_m *AccessAPIServer) SubscribeBlockHeadersFromLatest(_a0 *access.Subscribe func (_m *AccessAPIServer) SubscribeBlockHeadersFromStartBlockID(_a0 *access.SubscribeBlockHeadersFromStartBlockIDRequest, _a1 access.AccessAPI_SubscribeBlockHeadersFromStartBlockIDServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromStartBlockID") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlockHeadersFromStartBlockIDRequest, access.AccessAPI_SubscribeBlockHeadersFromStartBlockIDServer) error); ok { r0 = rf(_a0, _a1) @@ -935,6 +1087,10 @@ func (_m *AccessAPIServer) SubscribeBlockHeadersFromStartBlockID(_a0 *access.Sub func (_m *AccessAPIServer) SubscribeBlockHeadersFromStartHeight(_a0 *access.SubscribeBlockHeadersFromStartHeightRequest, _a1 access.AccessAPI_SubscribeBlockHeadersFromStartHeightServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlockHeadersFromStartHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlockHeadersFromStartHeightRequest, access.AccessAPI_SubscribeBlockHeadersFromStartHeightServer) error); ok { r0 = rf(_a0, _a1) @@ -949,6 +1105,10 @@ func (_m *AccessAPIServer) SubscribeBlockHeadersFromStartHeight(_a0 *access.Subs func (_m *AccessAPIServer) SubscribeBlocksFromLatest(_a0 *access.SubscribeBlocksFromLatestRequest, _a1 access.AccessAPI_SubscribeBlocksFromLatestServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromLatest") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlocksFromLatestRequest, access.AccessAPI_SubscribeBlocksFromLatestServer) error); ok { r0 = rf(_a0, _a1) @@ -963,6 +1123,10 @@ func (_m *AccessAPIServer) SubscribeBlocksFromLatest(_a0 *access.SubscribeBlocks func (_m *AccessAPIServer) SubscribeBlocksFromStartBlockID(_a0 *access.SubscribeBlocksFromStartBlockIDRequest, _a1 access.AccessAPI_SubscribeBlocksFromStartBlockIDServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromStartBlockID") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlocksFromStartBlockIDRequest, access.AccessAPI_SubscribeBlocksFromStartBlockIDServer) error); ok { r0 = rf(_a0, _a1) @@ -977,6 +1141,10 @@ func (_m *AccessAPIServer) SubscribeBlocksFromStartBlockID(_a0 *access.Subscribe func (_m *AccessAPIServer) SubscribeBlocksFromStartHeight(_a0 *access.SubscribeBlocksFromStartHeightRequest, _a1 access.AccessAPI_SubscribeBlocksFromStartHeightServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubscribeBlocksFromStartHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(*access.SubscribeBlocksFromStartHeightRequest, access.AccessAPI_SubscribeBlocksFromStartHeightServer) error); ok { r0 = rf(_a0, _a1) @@ -987,13 +1155,12 @@ func (_m *AccessAPIServer) SubscribeBlocksFromStartHeight(_a0 *access.SubscribeB return r0 } -type mockConstructorTestingTNewAccessAPIServer interface { +// NewAccessAPIServer creates a new instance of AccessAPIServer. 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 NewAccessAPIServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccessAPIServer creates a new instance of AccessAPIServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccessAPIServer(t mockConstructorTestingTNewAccessAPIServer) *AccessAPIServer { +}) *AccessAPIServer { mock := &AccessAPIServer{} mock.Mock.Test(t) diff --git a/engine/access/mock/execution_api_client.go b/engine/access/mock/execution_api_client.go index 597eae4f253..fd5fc20c718 100644 --- a/engine/access/mock/execution_api_client.go +++ b/engine/access/mock/execution_api_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -27,6 +27,10 @@ func (_m *ExecutionAPIClient) ExecuteScriptAtBlockID(ctx context.Context, in *ex _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockID") + } + var r0 *execution.ExecuteScriptAtBlockIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest, ...grpc.CallOption) (*execution.ExecuteScriptAtBlockIDResponse, error)); ok { @@ -60,6 +64,10 @@ func (_m *ExecutionAPIClient) GetAccountAtBlockID(ctx context.Context, in *execu _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtBlockID") + } + var r0 *execution.GetAccountAtBlockIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetAccountAtBlockIDRequest, ...grpc.CallOption) (*execution.GetAccountAtBlockIDResponse, error)); ok { @@ -93,6 +101,10 @@ func (_m *ExecutionAPIClient) GetBlockHeaderByID(ctx context.Context, in *execut _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByID") + } + var r0 *execution.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetBlockHeaderByIDRequest, ...grpc.CallOption) (*execution.BlockHeaderResponse, error)); ok { @@ -126,6 +138,10 @@ func (_m *ExecutionAPIClient) GetEventsForBlockIDs(ctx context.Context, in *exec _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetEventsForBlockIDs") + } + var r0 *execution.GetEventsForBlockIDsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetEventsForBlockIDsRequest, ...grpc.CallOption) (*execution.GetEventsForBlockIDsResponse, error)); ok { @@ -159,6 +175,10 @@ func (_m *ExecutionAPIClient) GetLatestBlockHeader(ctx context.Context, in *exec _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + var r0 *execution.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetLatestBlockHeaderRequest, ...grpc.CallOption) (*execution.BlockHeaderResponse, error)); ok { @@ -192,6 +212,10 @@ func (_m *ExecutionAPIClient) GetRegisterAtBlockID(ctx context.Context, in *exec _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetRegisterAtBlockID") + } + var r0 *execution.GetRegisterAtBlockIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetRegisterAtBlockIDRequest, ...grpc.CallOption) (*execution.GetRegisterAtBlockIDResponse, error)); ok { @@ -225,6 +249,10 @@ func (_m *ExecutionAPIClient) GetTransactionErrorMessage(ctx context.Context, in _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionErrorMessage") + } + var r0 *execution.GetTransactionErrorMessageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageRequest, ...grpc.CallOption) (*execution.GetTransactionErrorMessageResponse, error)); ok { @@ -258,6 +286,10 @@ func (_m *ExecutionAPIClient) GetTransactionErrorMessageByIndex(ctx context.Cont _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionErrorMessageByIndex") + } + var r0 *execution.GetTransactionErrorMessageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageByIndexRequest, ...grpc.CallOption) (*execution.GetTransactionErrorMessageResponse, error)); ok { @@ -291,6 +323,10 @@ func (_m *ExecutionAPIClient) GetTransactionErrorMessagesByBlockID(ctx context.C _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionErrorMessagesByBlockID") + } + var r0 *execution.GetTransactionErrorMessagesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessagesByBlockIDRequest, ...grpc.CallOption) (*execution.GetTransactionErrorMessagesResponse, error)); ok { @@ -324,6 +360,10 @@ func (_m *ExecutionAPIClient) GetTransactionResult(ctx context.Context, in *exec _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResult") + } + var r0 *execution.GetTransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionResultRequest, ...grpc.CallOption) (*execution.GetTransactionResultResponse, error)); ok { @@ -357,6 +397,10 @@ func (_m *ExecutionAPIClient) GetTransactionResultByIndex(ctx context.Context, i _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultByIndex") + } + var r0 *execution.GetTransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionByIndexRequest, ...grpc.CallOption) (*execution.GetTransactionResultResponse, error)); ok { @@ -390,6 +434,10 @@ func (_m *ExecutionAPIClient) GetTransactionResultsByBlockID(ctx context.Context _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultsByBlockID") + } + var r0 *execution.GetTransactionResultsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionsByBlockIDRequest, ...grpc.CallOption) (*execution.GetTransactionResultsResponse, error)); ok { @@ -423,6 +471,10 @@ func (_m *ExecutionAPIClient) Ping(ctx context.Context, in *execution.PingReques _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 *execution.PingResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.PingRequest, ...grpc.CallOption) (*execution.PingResponse, error)); ok { @@ -445,13 +497,12 @@ func (_m *ExecutionAPIClient) Ping(ctx context.Context, in *execution.PingReques return r0, r1 } -type mockConstructorTestingTNewExecutionAPIClient interface { +// NewExecutionAPIClient creates a new instance of ExecutionAPIClient. 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 NewExecutionAPIClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionAPIClient creates a new instance of ExecutionAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionAPIClient(t mockConstructorTestingTNewExecutionAPIClient) *ExecutionAPIClient { +}) *ExecutionAPIClient { mock := &ExecutionAPIClient{} mock.Mock.Test(t) diff --git a/engine/access/mock/execution_api_server.go b/engine/access/mock/execution_api_server.go index 11eff9dea23..e61517cb617 100644 --- a/engine/access/mock/execution_api_server.go +++ b/engine/access/mock/execution_api_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ExecutionAPIServer struct { func (_m *ExecutionAPIServer) ExecuteScriptAtBlockID(_a0 context.Context, _a1 *execution.ExecuteScriptAtBlockIDRequest) (*execution.ExecuteScriptAtBlockIDResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockID") + } + var r0 *execution.ExecuteScriptAtBlockIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.ExecuteScriptAtBlockIDRequest) (*execution.ExecuteScriptAtBlockIDResponse, error)); ok { @@ -44,6 +48,10 @@ func (_m *ExecutionAPIServer) ExecuteScriptAtBlockID(_a0 context.Context, _a1 *e func (_m *ExecutionAPIServer) GetAccountAtBlockID(_a0 context.Context, _a1 *execution.GetAccountAtBlockIDRequest) (*execution.GetAccountAtBlockIDResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtBlockID") + } + var r0 *execution.GetAccountAtBlockIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetAccountAtBlockIDRequest) (*execution.GetAccountAtBlockIDResponse, error)); ok { @@ -70,6 +78,10 @@ func (_m *ExecutionAPIServer) GetAccountAtBlockID(_a0 context.Context, _a1 *exec func (_m *ExecutionAPIServer) GetBlockHeaderByID(_a0 context.Context, _a1 *execution.GetBlockHeaderByIDRequest) (*execution.BlockHeaderResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByID") + } + var r0 *execution.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetBlockHeaderByIDRequest) (*execution.BlockHeaderResponse, error)); ok { @@ -96,6 +108,10 @@ func (_m *ExecutionAPIServer) GetBlockHeaderByID(_a0 context.Context, _a1 *execu func (_m *ExecutionAPIServer) GetEventsForBlockIDs(_a0 context.Context, _a1 *execution.GetEventsForBlockIDsRequest) (*execution.GetEventsForBlockIDsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetEventsForBlockIDs") + } + var r0 *execution.GetEventsForBlockIDsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetEventsForBlockIDsRequest) (*execution.GetEventsForBlockIDsResponse, error)); ok { @@ -122,6 +138,10 @@ func (_m *ExecutionAPIServer) GetEventsForBlockIDs(_a0 context.Context, _a1 *exe func (_m *ExecutionAPIServer) GetLatestBlockHeader(_a0 context.Context, _a1 *execution.GetLatestBlockHeaderRequest) (*execution.BlockHeaderResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + var r0 *execution.BlockHeaderResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetLatestBlockHeaderRequest) (*execution.BlockHeaderResponse, error)); ok { @@ -148,6 +168,10 @@ func (_m *ExecutionAPIServer) GetLatestBlockHeader(_a0 context.Context, _a1 *exe func (_m *ExecutionAPIServer) GetRegisterAtBlockID(_a0 context.Context, _a1 *execution.GetRegisterAtBlockIDRequest) (*execution.GetRegisterAtBlockIDResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetRegisterAtBlockID") + } + var r0 *execution.GetRegisterAtBlockIDResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetRegisterAtBlockIDRequest) (*execution.GetRegisterAtBlockIDResponse, error)); ok { @@ -174,6 +198,10 @@ func (_m *ExecutionAPIServer) GetRegisterAtBlockID(_a0 context.Context, _a1 *exe func (_m *ExecutionAPIServer) GetTransactionErrorMessage(_a0 context.Context, _a1 *execution.GetTransactionErrorMessageRequest) (*execution.GetTransactionErrorMessageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionErrorMessage") + } + var r0 *execution.GetTransactionErrorMessageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageRequest) (*execution.GetTransactionErrorMessageResponse, error)); ok { @@ -200,6 +228,10 @@ func (_m *ExecutionAPIServer) GetTransactionErrorMessage(_a0 context.Context, _a func (_m *ExecutionAPIServer) GetTransactionErrorMessageByIndex(_a0 context.Context, _a1 *execution.GetTransactionErrorMessageByIndexRequest) (*execution.GetTransactionErrorMessageResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionErrorMessageByIndex") + } + var r0 *execution.GetTransactionErrorMessageResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessageByIndexRequest) (*execution.GetTransactionErrorMessageResponse, error)); ok { @@ -226,6 +258,10 @@ func (_m *ExecutionAPIServer) GetTransactionErrorMessageByIndex(_a0 context.Cont func (_m *ExecutionAPIServer) GetTransactionErrorMessagesByBlockID(_a0 context.Context, _a1 *execution.GetTransactionErrorMessagesByBlockIDRequest) (*execution.GetTransactionErrorMessagesResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionErrorMessagesByBlockID") + } + var r0 *execution.GetTransactionErrorMessagesResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionErrorMessagesByBlockIDRequest) (*execution.GetTransactionErrorMessagesResponse, error)); ok { @@ -252,6 +288,10 @@ func (_m *ExecutionAPIServer) GetTransactionErrorMessagesByBlockID(_a0 context.C func (_m *ExecutionAPIServer) GetTransactionResult(_a0 context.Context, _a1 *execution.GetTransactionResultRequest) (*execution.GetTransactionResultResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResult") + } + var r0 *execution.GetTransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionResultRequest) (*execution.GetTransactionResultResponse, error)); ok { @@ -278,6 +318,10 @@ func (_m *ExecutionAPIServer) GetTransactionResult(_a0 context.Context, _a1 *exe func (_m *ExecutionAPIServer) GetTransactionResultByIndex(_a0 context.Context, _a1 *execution.GetTransactionByIndexRequest) (*execution.GetTransactionResultResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultByIndex") + } + var r0 *execution.GetTransactionResultResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionByIndexRequest) (*execution.GetTransactionResultResponse, error)); ok { @@ -304,6 +348,10 @@ func (_m *ExecutionAPIServer) GetTransactionResultByIndex(_a0 context.Context, _ func (_m *ExecutionAPIServer) GetTransactionResultsByBlockID(_a0 context.Context, _a1 *execution.GetTransactionsByBlockIDRequest) (*execution.GetTransactionResultsResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultsByBlockID") + } + var r0 *execution.GetTransactionResultsResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.GetTransactionsByBlockIDRequest) (*execution.GetTransactionResultsResponse, error)); ok { @@ -330,6 +378,10 @@ func (_m *ExecutionAPIServer) GetTransactionResultsByBlockID(_a0 context.Context func (_m *ExecutionAPIServer) Ping(_a0 context.Context, _a1 *execution.PingRequest) (*execution.PingResponse, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 *execution.PingResponse var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution.PingRequest) (*execution.PingResponse, error)); ok { @@ -352,13 +404,12 @@ func (_m *ExecutionAPIServer) Ping(_a0 context.Context, _a1 *execution.PingReque return r0, r1 } -type mockConstructorTestingTNewExecutionAPIServer interface { +// NewExecutionAPIServer creates a new instance of ExecutionAPIServer. 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 NewExecutionAPIServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionAPIServer creates a new instance of ExecutionAPIServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionAPIServer(t mockConstructorTestingTNewExecutionAPIServer) *ExecutionAPIServer { +}) *ExecutionAPIServer { mock := &ExecutionAPIServer{} mock.Mock.Test(t) diff --git a/engine/access/rpc/backend/mock/communicator.go b/engine/access/rpc/backend/mock/communicator.go index 5544bd426ef..cdd6076e8de 100644 --- a/engine/access/rpc/backend/mock/communicator.go +++ b/engine/access/rpc/backend/mock/communicator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Communicator struct { func (_m *Communicator) CallAvailableNode(nodes flow.GenericIdentityList[flow.IdentitySkeleton], call func(*flow.IdentitySkeleton) error, shouldTerminateOnError func(*flow.IdentitySkeleton, error) bool) error { ret := _m.Called(nodes, call, shouldTerminateOnError) + if len(ret) == 0 { + panic("no return value specified for CallAvailableNode") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.GenericIdentityList[flow.IdentitySkeleton], func(*flow.IdentitySkeleton) error, func(*flow.IdentitySkeleton, error) bool) error); ok { r0 = rf(nodes, call, shouldTerminateOnError) @@ -26,13 +30,12 @@ func (_m *Communicator) CallAvailableNode(nodes flow.GenericIdentityList[flow.Id return r0 } -type mockConstructorTestingTNewCommunicator interface { +// NewCommunicator creates a new instance of Communicator. 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 NewCommunicator(t interface { mock.TestingT Cleanup(func()) -} - -// NewCommunicator creates a new instance of Communicator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCommunicator(t mockConstructorTestingTNewCommunicator) *Communicator { +}) *Communicator { mock := &Communicator{} mock.Mock.Test(t) diff --git a/engine/access/rpc/connection/mock/connection_factory.go b/engine/access/rpc/connection/mock/connection_factory.go index 6d127598024..0d640208ef6 100644 --- a/engine/access/rpc/connection/mock/connection_factory.go +++ b/engine/access/rpc/connection/mock/connection_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -23,6 +23,10 @@ type ConnectionFactory struct { func (_m *ConnectionFactory) GetAccessAPIClient(address string, networkPubKey crypto.PublicKey) (access.AccessAPIClient, io.Closer, error) { ret := _m.Called(address, networkPubKey) + if len(ret) == 0 { + panic("no return value specified for GetAccessAPIClient") + } + var r0 access.AccessAPIClient var r1 io.Closer var r2 error @@ -58,6 +62,10 @@ func (_m *ConnectionFactory) GetAccessAPIClient(address string, networkPubKey cr func (_m *ConnectionFactory) GetAccessAPIClientWithPort(address string, networkPubKey crypto.PublicKey) (access.AccessAPIClient, io.Closer, error) { ret := _m.Called(address, networkPubKey) + if len(ret) == 0 { + panic("no return value specified for GetAccessAPIClientWithPort") + } + var r0 access.AccessAPIClient var r1 io.Closer var r2 error @@ -93,6 +101,10 @@ func (_m *ConnectionFactory) GetAccessAPIClientWithPort(address string, networkP func (_m *ConnectionFactory) GetExecutionAPIClient(address string) (execution.ExecutionAPIClient, io.Closer, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetExecutionAPIClient") + } + var r0 execution.ExecutionAPIClient var r1 io.Closer var r2 error @@ -124,13 +136,12 @@ func (_m *ConnectionFactory) GetExecutionAPIClient(address string) (execution.Ex return r0, r1, r2 } -type mockConstructorTestingTNewConnectionFactory interface { +// NewConnectionFactory creates a new instance of ConnectionFactory. 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 NewConnectionFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewConnectionFactory creates a new instance of ConnectionFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnectionFactory(t mockConstructorTestingTNewConnectionFactory) *ConnectionFactory { +}) *ConnectionFactory { mock := &ConnectionFactory{} mock.Mock.Test(t) diff --git a/engine/access/state_stream/mock/api.go b/engine/access/state_stream/mock/api.go index 535e5df6b05..6a0c048ee8d 100644 --- a/engine/access/state_stream/mock/api.go +++ b/engine/access/state_stream/mock/api.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -24,6 +24,10 @@ type API struct { func (_m *API) GetExecutionDataByBlockID(ctx context.Context, blockID flow.Identifier) (*execution_data.BlockExecutionData, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetExecutionDataByBlockID") + } + var r0 *execution_data.BlockExecutionData var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*execution_data.BlockExecutionData, error)); ok { @@ -50,6 +54,10 @@ func (_m *API) GetExecutionDataByBlockID(ctx context.Context, blockID flow.Ident func (_m *API) GetRegisterValues(registerIDs flow.RegisterIDs, height uint64) ([][]byte, error) { ret := _m.Called(registerIDs, height) + if len(ret) == 0 { + panic("no return value specified for GetRegisterValues") + } + var r0 [][]byte var r1 error if rf, ok := ret.Get(0).(func(flow.RegisterIDs, uint64) ([][]byte, error)); ok { @@ -76,6 +84,10 @@ func (_m *API) GetRegisterValues(registerIDs flow.RegisterIDs, height uint64) ([ func (_m *API) SubscribeAccountStatusesFromLatestBlock(ctx context.Context, filter state_stream.AccountStatusFilter) subscription.Subscription { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for SubscribeAccountStatusesFromLatestBlock") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, state_stream.AccountStatusFilter) subscription.Subscription); ok { r0 = rf(ctx, filter) @@ -92,6 +104,10 @@ func (_m *API) SubscribeAccountStatusesFromLatestBlock(ctx context.Context, filt func (_m *API) SubscribeAccountStatusesFromStartBlockID(ctx context.Context, startBlockID flow.Identifier, filter state_stream.AccountStatusFilter) subscription.Subscription { ret := _m.Called(ctx, startBlockID, filter) + if len(ret) == 0 { + panic("no return value specified for SubscribeAccountStatusesFromStartBlockID") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, state_stream.AccountStatusFilter) subscription.Subscription); ok { r0 = rf(ctx, startBlockID, filter) @@ -108,6 +124,10 @@ func (_m *API) SubscribeAccountStatusesFromStartBlockID(ctx context.Context, sta func (_m *API) SubscribeAccountStatusesFromStartHeight(ctx context.Context, startHeight uint64, filter state_stream.AccountStatusFilter) subscription.Subscription { ret := _m.Called(ctx, startHeight, filter) + if len(ret) == 0 { + panic("no return value specified for SubscribeAccountStatusesFromStartHeight") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, uint64, state_stream.AccountStatusFilter) subscription.Subscription); ok { r0 = rf(ctx, startHeight, filter) @@ -124,6 +144,10 @@ func (_m *API) SubscribeAccountStatusesFromStartHeight(ctx context.Context, star func (_m *API) SubscribeEvents(ctx context.Context, startBlockID flow.Identifier, startHeight uint64, filter state_stream.EventFilter) subscription.Subscription { ret := _m.Called(ctx, startBlockID, startHeight, filter) + if len(ret) == 0 { + panic("no return value specified for SubscribeEvents") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, uint64, state_stream.EventFilter) subscription.Subscription); ok { r0 = rf(ctx, startBlockID, startHeight, filter) @@ -140,6 +164,10 @@ func (_m *API) SubscribeEvents(ctx context.Context, startBlockID flow.Identifier func (_m *API) SubscribeEventsFromLatest(ctx context.Context, filter state_stream.EventFilter) subscription.Subscription { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for SubscribeEventsFromLatest") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, state_stream.EventFilter) subscription.Subscription); ok { r0 = rf(ctx, filter) @@ -156,6 +184,10 @@ func (_m *API) SubscribeEventsFromLatest(ctx context.Context, filter state_strea func (_m *API) SubscribeEventsFromStartBlockID(ctx context.Context, startBlockID flow.Identifier, filter state_stream.EventFilter) subscription.Subscription { ret := _m.Called(ctx, startBlockID, filter) + if len(ret) == 0 { + panic("no return value specified for SubscribeEventsFromStartBlockID") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, state_stream.EventFilter) subscription.Subscription); ok { r0 = rf(ctx, startBlockID, filter) @@ -172,6 +204,10 @@ func (_m *API) SubscribeEventsFromStartBlockID(ctx context.Context, startBlockID func (_m *API) SubscribeEventsFromStartHeight(ctx context.Context, startHeight uint64, filter state_stream.EventFilter) subscription.Subscription { ret := _m.Called(ctx, startHeight, filter) + if len(ret) == 0 { + panic("no return value specified for SubscribeEventsFromStartHeight") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, uint64, state_stream.EventFilter) subscription.Subscription); ok { r0 = rf(ctx, startHeight, filter) @@ -188,6 +224,10 @@ func (_m *API) SubscribeEventsFromStartHeight(ctx context.Context, startHeight u func (_m *API) SubscribeExecutionData(ctx context.Context, startBlockID flow.Identifier, startBlockHeight uint64) subscription.Subscription { ret := _m.Called(ctx, startBlockID, startBlockHeight) + if len(ret) == 0 { + panic("no return value specified for SubscribeExecutionData") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, uint64) subscription.Subscription); ok { r0 = rf(ctx, startBlockID, startBlockHeight) @@ -204,6 +244,10 @@ func (_m *API) SubscribeExecutionData(ctx context.Context, startBlockID flow.Ide func (_m *API) SubscribeExecutionDataFromLatest(ctx context.Context) subscription.Subscription { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for SubscribeExecutionDataFromLatest") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context) subscription.Subscription); ok { r0 = rf(ctx) @@ -220,6 +264,10 @@ func (_m *API) SubscribeExecutionDataFromLatest(ctx context.Context) subscriptio func (_m *API) SubscribeExecutionDataFromStartBlockHeight(ctx context.Context, startBlockHeight uint64) subscription.Subscription { ret := _m.Called(ctx, startBlockHeight) + if len(ret) == 0 { + panic("no return value specified for SubscribeExecutionDataFromStartBlockHeight") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, uint64) subscription.Subscription); ok { r0 = rf(ctx, startBlockHeight) @@ -236,6 +284,10 @@ func (_m *API) SubscribeExecutionDataFromStartBlockHeight(ctx context.Context, s func (_m *API) SubscribeExecutionDataFromStartBlockID(ctx context.Context, startBlockID flow.Identifier) subscription.Subscription { ret := _m.Called(ctx, startBlockID) + if len(ret) == 0 { + panic("no return value specified for SubscribeExecutionDataFromStartBlockID") + } + var r0 subscription.Subscription if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) subscription.Subscription); ok { r0 = rf(ctx, startBlockID) @@ -248,13 +300,12 @@ func (_m *API) SubscribeExecutionDataFromStartBlockID(ctx context.Context, start return r0 } -type mockConstructorTestingTNewAPI interface { +// NewAPI creates a new instance of API. 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 NewAPI(t interface { mock.TestingT Cleanup(func()) -} - -// NewAPI creates a new instance of API. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAPI(t mockConstructorTestingTNewAPI) *API { +}) *API { mock := &API{} mock.Mock.Test(t) diff --git a/engine/access/subscription/mock/block_tracker.go b/engine/access/subscription/mock/block_tracker.go index 6143ace674a..a3c2e2deb15 100644 --- a/engine/access/subscription/mock/block_tracker.go +++ b/engine/access/subscription/mock/block_tracker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type BlockTracker struct { func (_m *BlockTracker) GetHighestHeight(_a0 flow.BlockStatus) (uint64, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetHighestHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(flow.BlockStatus) (uint64, error)); ok { @@ -42,6 +46,10 @@ func (_m *BlockTracker) GetHighestHeight(_a0 flow.BlockStatus) (uint64, error) { func (_m *BlockTracker) GetStartHeightFromBlockID(_a0 flow.Identifier) (uint64, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetStartHeightFromBlockID") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (uint64, error)); ok { @@ -66,6 +74,10 @@ func (_m *BlockTracker) GetStartHeightFromBlockID(_a0 flow.Identifier) (uint64, func (_m *BlockTracker) GetStartHeightFromHeight(_a0 uint64) (uint64, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetStartHeightFromHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(uint64) (uint64, error)); ok { @@ -90,6 +102,10 @@ func (_m *BlockTracker) GetStartHeightFromHeight(_a0 uint64) (uint64, error) { func (_m *BlockTracker) GetStartHeightFromLatest(_a0 context.Context) (uint64, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetStartHeightFromLatest") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { @@ -114,6 +130,10 @@ func (_m *BlockTracker) GetStartHeightFromLatest(_a0 context.Context) (uint64, e func (_m *BlockTracker) ProcessOnFinalizedBlock() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ProcessOnFinalizedBlock") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -124,13 +144,12 @@ func (_m *BlockTracker) ProcessOnFinalizedBlock() error { return r0 } -type mockConstructorTestingTNewBlockTracker interface { +// NewBlockTracker creates a new instance of BlockTracker. 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 NewBlockTracker(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockTracker creates a new instance of BlockTracker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockTracker(t mockConstructorTestingTNewBlockTracker) *BlockTracker { +}) *BlockTracker { mock := &BlockTracker{} mock.Mock.Test(t) diff --git a/engine/access/subscription/mock/execution_data_tracker.go b/engine/access/subscription/mock/execution_data_tracker.go index fd477e15d9d..ee2b8ea5525 100644 --- a/engine/access/subscription/mock/execution_data_tracker.go +++ b/engine/access/subscription/mock/execution_data_tracker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type ExecutionDataTracker struct { func (_m *ExecutionDataTracker) GetHighestHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetHighestHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *ExecutionDataTracker) GetHighestHeight() uint64 { func (_m *ExecutionDataTracker) GetStartHeight(_a0 context.Context, _a1 flow.Identifier, _a2 uint64) (uint64, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for GetStartHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, uint64) (uint64, error)); ok { @@ -58,6 +66,10 @@ func (_m *ExecutionDataTracker) GetStartHeight(_a0 context.Context, _a1 flow.Ide func (_m *ExecutionDataTracker) GetStartHeightFromBlockID(_a0 flow.Identifier) (uint64, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetStartHeightFromBlockID") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (uint64, error)); ok { @@ -82,6 +94,10 @@ func (_m *ExecutionDataTracker) GetStartHeightFromBlockID(_a0 flow.Identifier) ( func (_m *ExecutionDataTracker) GetStartHeightFromHeight(_a0 uint64) (uint64, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetStartHeightFromHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(uint64) (uint64, error)); ok { @@ -106,6 +122,10 @@ func (_m *ExecutionDataTracker) GetStartHeightFromHeight(_a0 uint64) (uint64, er func (_m *ExecutionDataTracker) GetStartHeightFromLatest(_a0 context.Context) (uint64, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetStartHeightFromLatest") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { @@ -131,13 +151,12 @@ func (_m *ExecutionDataTracker) OnExecutionData(_a0 *execution_data.BlockExecuti _m.Called(_a0) } -type mockConstructorTestingTNewExecutionDataTracker interface { +// NewExecutionDataTracker creates a new instance of ExecutionDataTracker. 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 NewExecutionDataTracker(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionDataTracker creates a new instance of ExecutionDataTracker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionDataTracker(t mockConstructorTestingTNewExecutionDataTracker) *ExecutionDataTracker { +}) *ExecutionDataTracker { mock := &ExecutionDataTracker{} mock.Mock.Test(t) diff --git a/engine/collection/epochmgr/mock/epoch_components_factory.go b/engine/collection/epochmgr/mock/epoch_components_factory.go index a4b7f9b9356..3caae7cb6c3 100644 --- a/engine/collection/epochmgr/mock/epoch_components_factory.go +++ b/engine/collection/epochmgr/mock/epoch_components_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -24,6 +24,10 @@ type EpochComponentsFactory struct { func (_m *EpochComponentsFactory) Create(epoch protocol.Epoch) (cluster.State, component.Component, module.ReadyDoneAware, module.HotStuff, hotstuff.VoteAggregator, hotstuff.TimeoutAggregator, component.Component, error) { ret := _m.Called(epoch) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 cluster.State var r1 component.Component var r2 module.ReadyDoneAware @@ -100,13 +104,12 @@ func (_m *EpochComponentsFactory) Create(epoch protocol.Epoch) (cluster.State, c return r0, r1, r2, r3, r4, r5, r6, r7 } -type mockConstructorTestingTNewEpochComponentsFactory interface { +// NewEpochComponentsFactory creates a new instance of EpochComponentsFactory. 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 NewEpochComponentsFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewEpochComponentsFactory creates a new instance of EpochComponentsFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEpochComponentsFactory(t mockConstructorTestingTNewEpochComponentsFactory) *EpochComponentsFactory { +}) *EpochComponentsFactory { mock := &EpochComponentsFactory{} mock.Mock.Test(t) diff --git a/engine/collection/mock/cluster_events.go b/engine/collection/mock/cluster_events.go index a17e4db4a9a..0255fae1a86 100644 --- a/engine/collection/mock/cluster_events.go +++ b/engine/collection/mock/cluster_events.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,13 +17,12 @@ func (_m *ClusterEvents) ActiveClustersChanged(_a0 flow.ChainIDList) { _m.Called(_a0) } -type mockConstructorTestingTNewClusterEvents interface { +// NewClusterEvents creates a new instance of ClusterEvents. 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 NewClusterEvents(t interface { mock.TestingT Cleanup(func()) -} - -// NewClusterEvents creates a new instance of ClusterEvents. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClusterEvents(t mockConstructorTestingTNewClusterEvents) *ClusterEvents { +}) *ClusterEvents { mock := &ClusterEvents{} mock.Mock.Test(t) diff --git a/engine/collection/mock/compliance.go b/engine/collection/mock/compliance.go index f505d128518..2bc7de907df 100644 --- a/engine/collection/mock/compliance.go +++ b/engine/collection/mock/compliance.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type Compliance struct { func (_m *Compliance) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -46,6 +50,10 @@ func (_m *Compliance) OnSyncedClusterBlock(block flow.Slashable[*messages.Cluste func (_m *Compliance) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -63,13 +71,12 @@ func (_m *Compliance) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewCompliance interface { +// NewCompliance creates a new instance of Compliance. 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 NewCompliance(t interface { mock.TestingT Cleanup(func()) -} - -// NewCompliance creates a new instance of Compliance. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCompliance(t mockConstructorTestingTNewCompliance) *Compliance { +}) *Compliance { mock := &Compliance{} mock.Mock.Test(t) diff --git a/engine/collection/mock/engine_events.go b/engine/collection/mock/engine_events.go index 4eb5ce20268..e44e43391ed 100644 --- a/engine/collection/mock/engine_events.go +++ b/engine/collection/mock/engine_events.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,13 +17,12 @@ func (_m *EngineEvents) ActiveClustersChanged(_a0 flow.ChainIDList) { _m.Called(_a0) } -type mockConstructorTestingTNewEngineEvents interface { +// NewEngineEvents creates a new instance of EngineEvents. 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 NewEngineEvents(t interface { mock.TestingT Cleanup(func()) -} - -// NewEngineEvents creates a new instance of EngineEvents. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEngineEvents(t mockConstructorTestingTNewEngineEvents) *EngineEvents { +}) *EngineEvents { mock := &EngineEvents{} mock.Mock.Test(t) diff --git a/engine/collection/rpc/mock/backend.go b/engine/collection/rpc/mock/backend.go index b7f0289db2c..bf78fe807dd 100644 --- a/engine/collection/rpc/mock/backend.go +++ b/engine/collection/rpc/mock/backend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Backend struct { func (_m *Backend) ProcessTransaction(_a0 *flow.TransactionBody) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ProcessTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.TransactionBody) error); ok { r0 = rf(_a0) @@ -26,13 +30,12 @@ func (_m *Backend) ProcessTransaction(_a0 *flow.TransactionBody) error { return r0 } -type mockConstructorTestingTNewBackend interface { +// NewBackend creates a new instance of Backend. 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 NewBackend(t interface { mock.TestingT Cleanup(func()) -} - -// NewBackend creates a new instance of Backend. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBackend(t mockConstructorTestingTNewBackend) *Backend { +}) *Backend { mock := &Backend{} mock.Mock.Test(t) diff --git a/engine/common/follower/cache/mock/on_entity_ejected.go b/engine/common/follower/cache/mock/on_entity_ejected.go index b525bf43bea..5febf171a6d 100644 --- a/engine/common/follower/cache/mock/on_entity_ejected.go +++ b/engine/common/follower/cache/mock/on_entity_ejected.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,13 +17,12 @@ func (_m *OnEntityEjected) Execute(ejectedEntity flow.Entity) { _m.Called(ejectedEntity) } -type mockConstructorTestingTNewOnEntityEjected interface { +// NewOnEntityEjected creates a new instance of OnEntityEjected. 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 NewOnEntityEjected(t interface { mock.TestingT Cleanup(func()) -} - -// NewOnEntityEjected creates a new instance of OnEntityEjected. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOnEntityEjected(t mockConstructorTestingTNewOnEntityEjected) *OnEntityEjected { +}) *OnEntityEjected { mock := &OnEntityEjected{} mock.Mock.Test(t) diff --git a/engine/common/follower/mock/compliance_core.go b/engine/common/follower/mock/compliance_core.go index 05dfdfc19fc..db1d5c036f0 100644 --- a/engine/common/follower/mock/compliance_core.go +++ b/engine/common/follower/mock/compliance_core.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type ComplianceCore struct { func (_m *ComplianceCore) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -35,6 +39,10 @@ func (_m *ComplianceCore) Done() <-chan struct{} { func (_m *ComplianceCore) OnBlockRange(originID flow.Identifier, connectedRange []*flow.Block) error { ret := _m.Called(originID, connectedRange) + if len(ret) == 0 { + panic("no return value specified for OnBlockRange") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, []*flow.Block) error); ok { r0 = rf(originID, connectedRange) @@ -54,6 +62,10 @@ func (_m *ComplianceCore) OnFinalizedBlock(finalized *flow.Header) { func (_m *ComplianceCore) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -71,13 +83,12 @@ func (_m *ComplianceCore) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewComplianceCore interface { +// NewComplianceCore creates a new instance of ComplianceCore. 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 NewComplianceCore(t interface { mock.TestingT Cleanup(func()) -} - -// NewComplianceCore creates a new instance of ComplianceCore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewComplianceCore(t mockConstructorTestingTNewComplianceCore) *ComplianceCore { +}) *ComplianceCore { mock := &ComplianceCore{} mock.Mock.Test(t) diff --git a/engine/consensus/approvals/mock/assignment_collector.go b/engine/consensus/approvals/mock/assignment_collector.go index 40eac99267c..c7fc286b83e 100644 --- a/engine/consensus/approvals/mock/assignment_collector.go +++ b/engine/consensus/approvals/mock/assignment_collector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type AssignmentCollector struct { func (_m *AssignmentCollector) Block() *flow.Header { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *flow.Header if rf, ok := ret.Get(0).(func() *flow.Header); ok { r0 = rf() @@ -36,6 +40,10 @@ func (_m *AssignmentCollector) Block() *flow.Header { func (_m *AssignmentCollector) BlockID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BlockID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -52,6 +60,10 @@ func (_m *AssignmentCollector) BlockID() flow.Identifier { func (_m *AssignmentCollector) ChangeProcessingStatus(expectedValue approvals.ProcessingStatus, newValue approvals.ProcessingStatus) error { ret := _m.Called(expectedValue, newValue) + if len(ret) == 0 { + panic("no return value specified for ChangeProcessingStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(approvals.ProcessingStatus, approvals.ProcessingStatus) error); ok { r0 = rf(expectedValue, newValue) @@ -66,6 +78,10 @@ func (_m *AssignmentCollector) ChangeProcessingStatus(expectedValue approvals.Pr func (_m *AssignmentCollector) CheckEmergencySealing(observer consensus.SealingObservation, finalizedBlockHeight uint64) error { ret := _m.Called(observer, finalizedBlockHeight) + if len(ret) == 0 { + panic("no return value specified for CheckEmergencySealing") + } + var r0 error if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) error); ok { r0 = rf(observer, finalizedBlockHeight) @@ -80,6 +96,10 @@ func (_m *AssignmentCollector) CheckEmergencySealing(observer consensus.SealingO func (_m *AssignmentCollector) ProcessApproval(approval *flow.ResultApproval) error { ret := _m.Called(approval) + if len(ret) == 0 { + panic("no return value specified for ProcessApproval") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ResultApproval) error); ok { r0 = rf(approval) @@ -94,6 +114,10 @@ func (_m *AssignmentCollector) ProcessApproval(approval *flow.ResultApproval) er func (_m *AssignmentCollector) ProcessIncorporatedResult(incorporatedResult *flow.IncorporatedResult) error { ret := _m.Called(incorporatedResult) + if len(ret) == 0 { + panic("no return value specified for ProcessIncorporatedResult") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.IncorporatedResult) error); ok { r0 = rf(incorporatedResult) @@ -108,6 +132,10 @@ func (_m *AssignmentCollector) ProcessIncorporatedResult(incorporatedResult *flo func (_m *AssignmentCollector) ProcessingStatus() approvals.ProcessingStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ProcessingStatus") + } + var r0 approvals.ProcessingStatus if rf, ok := ret.Get(0).(func() approvals.ProcessingStatus); ok { r0 = rf() @@ -122,6 +150,10 @@ func (_m *AssignmentCollector) ProcessingStatus() approvals.ProcessingStatus { func (_m *AssignmentCollector) RequestMissingApprovals(observer consensus.SealingObservation, maxHeightForRequesting uint64) (uint, error) { ret := _m.Called(observer, maxHeightForRequesting) + if len(ret) == 0 { + panic("no return value specified for RequestMissingApprovals") + } + var r0 uint var r1 error if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) (uint, error)); ok { @@ -146,6 +178,10 @@ func (_m *AssignmentCollector) RequestMissingApprovals(observer consensus.Sealin func (_m *AssignmentCollector) Result() *flow.ExecutionResult { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Result") + } + var r0 *flow.ExecutionResult if rf, ok := ret.Get(0).(func() *flow.ExecutionResult); ok { r0 = rf() @@ -162,6 +198,10 @@ func (_m *AssignmentCollector) Result() *flow.ExecutionResult { func (_m *AssignmentCollector) ResultID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ResultID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -174,13 +214,12 @@ func (_m *AssignmentCollector) ResultID() flow.Identifier { return r0 } -type mockConstructorTestingTNewAssignmentCollector interface { +// NewAssignmentCollector creates a new instance of AssignmentCollector. 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 NewAssignmentCollector(t interface { mock.TestingT Cleanup(func()) -} - -// NewAssignmentCollector creates a new instance of AssignmentCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAssignmentCollector(t mockConstructorTestingTNewAssignmentCollector) *AssignmentCollector { +}) *AssignmentCollector { mock := &AssignmentCollector{} mock.Mock.Test(t) diff --git a/engine/consensus/approvals/mock/assignment_collector_state.go b/engine/consensus/approvals/mock/assignment_collector_state.go index a01b83d1263..f45536cc11f 100644 --- a/engine/consensus/approvals/mock/assignment_collector_state.go +++ b/engine/consensus/approvals/mock/assignment_collector_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type AssignmentCollectorState struct { func (_m *AssignmentCollectorState) Block() *flow.Header { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *flow.Header if rf, ok := ret.Get(0).(func() *flow.Header); ok { r0 = rf() @@ -36,6 +40,10 @@ func (_m *AssignmentCollectorState) Block() *flow.Header { func (_m *AssignmentCollectorState) BlockID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BlockID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -52,6 +60,10 @@ func (_m *AssignmentCollectorState) BlockID() flow.Identifier { func (_m *AssignmentCollectorState) CheckEmergencySealing(observer consensus.SealingObservation, finalizedBlockHeight uint64) error { ret := _m.Called(observer, finalizedBlockHeight) + if len(ret) == 0 { + panic("no return value specified for CheckEmergencySealing") + } + var r0 error if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) error); ok { r0 = rf(observer, finalizedBlockHeight) @@ -66,6 +78,10 @@ func (_m *AssignmentCollectorState) CheckEmergencySealing(observer consensus.Sea func (_m *AssignmentCollectorState) ProcessApproval(approval *flow.ResultApproval) error { ret := _m.Called(approval) + if len(ret) == 0 { + panic("no return value specified for ProcessApproval") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ResultApproval) error); ok { r0 = rf(approval) @@ -80,6 +96,10 @@ func (_m *AssignmentCollectorState) ProcessApproval(approval *flow.ResultApprova func (_m *AssignmentCollectorState) ProcessIncorporatedResult(incorporatedResult *flow.IncorporatedResult) error { ret := _m.Called(incorporatedResult) + if len(ret) == 0 { + panic("no return value specified for ProcessIncorporatedResult") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.IncorporatedResult) error); ok { r0 = rf(incorporatedResult) @@ -94,6 +114,10 @@ func (_m *AssignmentCollectorState) ProcessIncorporatedResult(incorporatedResult func (_m *AssignmentCollectorState) ProcessingStatus() approvals.ProcessingStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ProcessingStatus") + } + var r0 approvals.ProcessingStatus if rf, ok := ret.Get(0).(func() approvals.ProcessingStatus); ok { r0 = rf() @@ -108,6 +132,10 @@ func (_m *AssignmentCollectorState) ProcessingStatus() approvals.ProcessingStatu func (_m *AssignmentCollectorState) RequestMissingApprovals(observer consensus.SealingObservation, maxHeightForRequesting uint64) (uint, error) { ret := _m.Called(observer, maxHeightForRequesting) + if len(ret) == 0 { + panic("no return value specified for RequestMissingApprovals") + } + var r0 uint var r1 error if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) (uint, error)); ok { @@ -132,6 +160,10 @@ func (_m *AssignmentCollectorState) RequestMissingApprovals(observer consensus.S func (_m *AssignmentCollectorState) Result() *flow.ExecutionResult { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Result") + } + var r0 *flow.ExecutionResult if rf, ok := ret.Get(0).(func() *flow.ExecutionResult); ok { r0 = rf() @@ -148,6 +180,10 @@ func (_m *AssignmentCollectorState) Result() *flow.ExecutionResult { func (_m *AssignmentCollectorState) ResultID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ResultID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -160,13 +196,12 @@ func (_m *AssignmentCollectorState) ResultID() flow.Identifier { return r0 } -type mockConstructorTestingTNewAssignmentCollectorState interface { +// NewAssignmentCollectorState creates a new instance of AssignmentCollectorState. 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 NewAssignmentCollectorState(t interface { mock.TestingT Cleanup(func()) -} - -// NewAssignmentCollectorState creates a new instance of AssignmentCollectorState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAssignmentCollectorState(t mockConstructorTestingTNewAssignmentCollectorState) *AssignmentCollectorState { +}) *AssignmentCollectorState { mock := &AssignmentCollectorState{} mock.Mock.Test(t) diff --git a/engine/consensus/mock/compliance.go b/engine/consensus/mock/compliance.go index 69c318dbd7e..ec40d2110da 100644 --- a/engine/consensus/mock/compliance.go +++ b/engine/consensus/mock/compliance.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type Compliance struct { func (_m *Compliance) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -46,6 +50,10 @@ func (_m *Compliance) OnSyncedBlocks(blocks flow.Slashable[[]*messages.BlockProp func (_m *Compliance) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -63,13 +71,12 @@ func (_m *Compliance) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewCompliance interface { +// NewCompliance creates a new instance of Compliance. 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 NewCompliance(t interface { mock.TestingT Cleanup(func()) -} - -// NewCompliance creates a new instance of Compliance. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCompliance(t mockConstructorTestingTNewCompliance) *Compliance { +}) *Compliance { mock := &Compliance{} mock.Mock.Test(t) diff --git a/engine/consensus/mock/matching_core.go b/engine/consensus/mock/matching_core.go index 331d467cf90..ccf72988b9c 100644 --- a/engine/consensus/mock/matching_core.go +++ b/engine/consensus/mock/matching_core.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type MatchingCore struct { func (_m *MatchingCore) OnBlockFinalization() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnBlockFinalization") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *MatchingCore) OnBlockFinalization() error { func (_m *MatchingCore) ProcessReceipt(receipt *flow.ExecutionReceipt) error { ret := _m.Called(receipt) + if len(ret) == 0 { + panic("no return value specified for ProcessReceipt") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) error); ok { r0 = rf(receipt) @@ -40,13 +48,12 @@ func (_m *MatchingCore) ProcessReceipt(receipt *flow.ExecutionReceipt) error { return r0 } -type mockConstructorTestingTNewMatchingCore interface { +// NewMatchingCore creates a new instance of MatchingCore. 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 NewMatchingCore(t interface { mock.TestingT Cleanup(func()) -} - -// NewMatchingCore creates a new instance of MatchingCore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMatchingCore(t mockConstructorTestingTNewMatchingCore) *MatchingCore { +}) *MatchingCore { mock := &MatchingCore{} mock.Mock.Test(t) diff --git a/engine/consensus/mock/sealing_core.go b/engine/consensus/mock/sealing_core.go index ee3e9bbb63a..4ffb3f789cc 100644 --- a/engine/consensus/mock/sealing_core.go +++ b/engine/consensus/mock/sealing_core.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type SealingCore struct { func (_m *SealingCore) ProcessApproval(approval *flow.ResultApproval) error { ret := _m.Called(approval) + if len(ret) == 0 { + panic("no return value specified for ProcessApproval") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ResultApproval) error); ok { r0 = rf(approval) @@ -30,6 +34,10 @@ func (_m *SealingCore) ProcessApproval(approval *flow.ResultApproval) error { func (_m *SealingCore) ProcessFinalizedBlock(finalizedBlockID flow.Identifier) error { ret := _m.Called(finalizedBlockID) + if len(ret) == 0 { + panic("no return value specified for ProcessFinalizedBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { r0 = rf(finalizedBlockID) @@ -44,6 +52,10 @@ func (_m *SealingCore) ProcessFinalizedBlock(finalizedBlockID flow.Identifier) e func (_m *SealingCore) ProcessIncorporatedResult(result *flow.IncorporatedResult) error { ret := _m.Called(result) + if len(ret) == 0 { + panic("no return value specified for ProcessIncorporatedResult") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.IncorporatedResult) error); ok { r0 = rf(result) @@ -54,13 +66,12 @@ func (_m *SealingCore) ProcessIncorporatedResult(result *flow.IncorporatedResult return r0 } -type mockConstructorTestingTNewSealingCore interface { +// NewSealingCore creates a new instance of SealingCore. 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 NewSealingCore(t interface { mock.TestingT Cleanup(func()) -} - -// NewSealingCore creates a new instance of SealingCore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSealingCore(t mockConstructorTestingTNewSealingCore) *SealingCore { +}) *SealingCore { mock := &SealingCore{} mock.Mock.Test(t) diff --git a/engine/consensus/mock/sealing_observation.go b/engine/consensus/mock/sealing_observation.go index 040f3a27217..de17f180340 100644 --- a/engine/consensus/mock/sealing_observation.go +++ b/engine/consensus/mock/sealing_observation.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -32,13 +32,12 @@ func (_m *SealingObservation) QualifiesForEmergencySealing(ir *flow.Incorporated _m.Called(ir, emergencySealable) } -type mockConstructorTestingTNewSealingObservation interface { +// NewSealingObservation creates a new instance of SealingObservation. 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 NewSealingObservation(t interface { mock.TestingT Cleanup(func()) -} - -// NewSealingObservation creates a new instance of SealingObservation. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSealingObservation(t mockConstructorTestingTNewSealingObservation) *SealingObservation { +}) *SealingObservation { mock := &SealingObservation{} mock.Mock.Test(t) diff --git a/engine/consensus/mock/sealing_tracker.go b/engine/consensus/mock/sealing_tracker.go index 47e98cb3d4d..19867acc132 100644 --- a/engine/consensus/mock/sealing_tracker.go +++ b/engine/consensus/mock/sealing_tracker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type SealingTracker struct { func (_m *SealingTracker) NewSealingObservation(finalizedBlock *flow.Header, seal *flow.Seal, sealedBlock *flow.Header) consensus.SealingObservation { ret := _m.Called(finalizedBlock, seal, sealedBlock) + if len(ret) == 0 { + panic("no return value specified for NewSealingObservation") + } + var r0 consensus.SealingObservation if rf, ok := ret.Get(0).(func(*flow.Header, *flow.Seal, *flow.Header) consensus.SealingObservation); ok { r0 = rf(finalizedBlock, seal, sealedBlock) @@ -30,13 +34,12 @@ func (_m *SealingTracker) NewSealingObservation(finalizedBlock *flow.Header, sea return r0 } -type mockConstructorTestingTNewSealingTracker interface { +// NewSealingTracker creates a new instance of SealingTracker. 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 NewSealingTracker(t interface { mock.TestingT Cleanup(func()) -} - -// NewSealingTracker creates a new instance of SealingTracker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSealingTracker(t mockConstructorTestingTNewSealingTracker) *SealingTracker { +}) *SealingTracker { mock := &SealingTracker{} mock.Mock.Test(t) diff --git a/engine/execution/computation/computer/mock/block_computer.go b/engine/execution/computation/computer/mock/block_computer.go index 7464c38e9b2..bc9910ae438 100644 --- a/engine/execution/computation/computer/mock/block_computer.go +++ b/engine/execution/computation/computer/mock/block_computer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -26,6 +26,10 @@ type BlockComputer struct { func (_m *BlockComputer) ExecuteBlock(ctx context.Context, parentBlockExecutionResultID flow.Identifier, block *entity.ExecutableBlock, _a3 snapshot.StorageSnapshot, derivedBlockData *derived.DerivedBlockData) (*execution.ComputationResult, error) { ret := _m.Called(ctx, parentBlockExecutionResultID, block, _a3, derivedBlockData) + if len(ret) == 0 { + panic("no return value specified for ExecuteBlock") + } + var r0 *execution.ComputationResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, *entity.ExecutableBlock, snapshot.StorageSnapshot, *derived.DerivedBlockData) (*execution.ComputationResult, error)); ok { @@ -48,13 +52,12 @@ func (_m *BlockComputer) ExecuteBlock(ctx context.Context, parentBlockExecutionR return r0, r1 } -type mockConstructorTestingTNewBlockComputer interface { +// NewBlockComputer creates a new instance of BlockComputer. 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 NewBlockComputer(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockComputer creates a new instance of BlockComputer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockComputer(t mockConstructorTestingTNewBlockComputer) *BlockComputer { +}) *BlockComputer { mock := &BlockComputer{} mock.Mock.Test(t) diff --git a/engine/execution/computation/computer/mock/transaction_write_behind_logger.go b/engine/execution/computation/computer/mock/transaction_write_behind_logger.go index b9b42474d00..144685ec641 100644 --- a/engine/execution/computation/computer/mock/transaction_write_behind_logger.go +++ b/engine/execution/computation/computer/mock/transaction_write_behind_logger.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -23,13 +23,12 @@ func (_m *TransactionWriteBehindLogger) AddTransactionResult(txn computer.Transa _m.Called(txn, _a1, output, timeSpent, numTxnConflictRetries) } -type mockConstructorTestingTNewTransactionWriteBehindLogger interface { +// NewTransactionWriteBehindLogger creates a new instance of TransactionWriteBehindLogger. 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 NewTransactionWriteBehindLogger(t interface { mock.TestingT Cleanup(func()) -} - -// NewTransactionWriteBehindLogger creates a new instance of TransactionWriteBehindLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransactionWriteBehindLogger(t mockConstructorTestingTNewTransactionWriteBehindLogger) *TransactionWriteBehindLogger { +}) *TransactionWriteBehindLogger { mock := &TransactionWriteBehindLogger{} mock.Mock.Test(t) diff --git a/engine/execution/computation/computer/mock/view_committer.go b/engine/execution/computation/computer/mock/view_committer.go index 5b635f9804a..e8c25c840f6 100644 --- a/engine/execution/computation/computer/mock/view_committer.go +++ b/engine/execution/computation/computer/mock/view_committer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -22,6 +22,10 @@ type ViewCommitter struct { func (_m *ViewCommitter) CommitView(_a0 *snapshot.ExecutionSnapshot, _a1 execution.ExtendableStorageSnapshot) (flow.StateCommitment, []byte, *ledger.TrieUpdate, execution.ExtendableStorageSnapshot, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CommitView") + } + var r0 flow.StateCommitment var r1 []byte var r2 *ledger.TrieUpdate @@ -71,13 +75,12 @@ func (_m *ViewCommitter) CommitView(_a0 *snapshot.ExecutionSnapshot, _a1 executi return r0, r1, r2, r3, r4 } -type mockConstructorTestingTNewViewCommitter interface { +// NewViewCommitter creates a new instance of ViewCommitter. 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 NewViewCommitter(t interface { mock.TestingT Cleanup(func()) -} - -// NewViewCommitter creates a new instance of ViewCommitter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewViewCommitter(t mockConstructorTestingTNewViewCommitter) *ViewCommitter { +}) *ViewCommitter { mock := &ViewCommitter{} mock.Mock.Test(t) diff --git a/engine/execution/computation/mock/computation_manager.go b/engine/execution/computation/mock/computation_manager.go index 39fc3f36018..5e6984bfcd9 100644 --- a/engine/execution/computation/mock/computation_manager.go +++ b/engine/execution/computation/mock/computation_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -24,6 +24,10 @@ type ComputationManager struct { func (_m *ComputationManager) ComputeBlock(ctx context.Context, parentBlockExecutionResultID flow.Identifier, block *entity.ExecutableBlock, _a3 snapshot.StorageSnapshot) (*execution.ComputationResult, error) { ret := _m.Called(ctx, parentBlockExecutionResultID, block, _a3) + if len(ret) == 0 { + panic("no return value specified for ComputeBlock") + } + var r0 *execution.ComputationResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, *entity.ExecutableBlock, snapshot.StorageSnapshot) (*execution.ComputationResult, error)); ok { @@ -50,6 +54,10 @@ func (_m *ComputationManager) ComputeBlock(ctx context.Context, parentBlockExecu func (_m *ComputationManager) ExecuteScript(ctx context.Context, script []byte, arguments [][]byte, blockHeader *flow.Header, _a4 snapshot.StorageSnapshot) ([]byte, uint64, error) { ret := _m.Called(ctx, script, arguments, blockHeader, _a4) + if len(ret) == 0 { + panic("no return value specified for ExecuteScript") + } + var r0 []byte var r1 uint64 var r2 error @@ -83,6 +91,10 @@ func (_m *ComputationManager) ExecuteScript(ctx context.Context, script []byte, func (_m *ComputationManager) GetAccount(ctx context.Context, addr flow.Address, header *flow.Header, _a3 snapshot.StorageSnapshot) (*flow.Account, error) { ret := _m.Called(ctx, addr, header, _a3) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address, *flow.Header, snapshot.StorageSnapshot) (*flow.Account, error)); ok { @@ -105,13 +117,12 @@ func (_m *ComputationManager) GetAccount(ctx context.Context, addr flow.Address, return r0, r1 } -type mockConstructorTestingTNewComputationManager interface { +// NewComputationManager creates a new instance of ComputationManager. 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 NewComputationManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewComputationManager creates a new instance of ComputationManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewComputationManager(t mockConstructorTestingTNewComputationManager) *ComputationManager { +}) *ComputationManager { mock := &ComputationManager{} mock.Mock.Test(t) diff --git a/engine/execution/computation/query/mock/entropy_provider_per_block.go b/engine/execution/computation/query/mock/entropy_provider_per_block.go index ed66876d489..753f3f1ff3a 100644 --- a/engine/execution/computation/query/mock/entropy_provider_per_block.go +++ b/engine/execution/computation/query/mock/entropy_provider_per_block.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type EntropyProviderPerBlock struct { func (_m *EntropyProviderPerBlock) AtBlockID(blockID flow.Identifier) environment.EntropyProvider { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for AtBlockID") + } + var r0 environment.EntropyProvider if rf, ok := ret.Get(0).(func(flow.Identifier) environment.EntropyProvider); ok { r0 = rf(blockID) @@ -30,13 +34,12 @@ func (_m *EntropyProviderPerBlock) AtBlockID(blockID flow.Identifier) environmen return r0 } -type mockConstructorTestingTNewEntropyProviderPerBlock interface { +// NewEntropyProviderPerBlock creates a new instance of EntropyProviderPerBlock. 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 NewEntropyProviderPerBlock(t interface { mock.TestingT Cleanup(func()) -} - -// NewEntropyProviderPerBlock creates a new instance of EntropyProviderPerBlock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEntropyProviderPerBlock(t mockConstructorTestingTNewEntropyProviderPerBlock) *EntropyProviderPerBlock { +}) *EntropyProviderPerBlock { mock := &EntropyProviderPerBlock{} mock.Mock.Test(t) diff --git a/engine/execution/computation/query/mock/executor.go b/engine/execution/computation/query/mock/executor.go index d0755a36621..9f6d372358b 100644 --- a/engine/execution/computation/query/mock/executor.go +++ b/engine/execution/computation/query/mock/executor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type Executor struct { func (_m *Executor) ExecuteScript(ctx context.Context, script []byte, arguments [][]byte, blockHeader *flow.Header, _a4 snapshot.StorageSnapshot) ([]byte, uint64, error) { ret := _m.Called(ctx, script, arguments, blockHeader, _a4) + if len(ret) == 0 { + panic("no return value specified for ExecuteScript") + } + var r0 []byte var r1 uint64 var r2 error @@ -53,6 +57,10 @@ func (_m *Executor) ExecuteScript(ctx context.Context, script []byte, arguments func (_m *Executor) GetAccount(ctx context.Context, addr flow.Address, header *flow.Header, _a3 snapshot.StorageSnapshot) (*flow.Account, error) { ret := _m.Called(ctx, addr, header, _a3) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address, *flow.Header, snapshot.StorageSnapshot) (*flow.Account, error)); ok { @@ -75,13 +83,12 @@ func (_m *Executor) GetAccount(ctx context.Context, addr flow.Address, header *f return r0, r1 } -type mockConstructorTestingTNewExecutor interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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. -func NewExecutor(t mockConstructorTestingTNewExecutor) *Executor { +}) *Executor { mock := &Executor{} mock.Mock.Test(t) diff --git a/engine/execution/mock/executed_finalized_wal.go b/engine/execution/mock/executed_finalized_wal.go index 321467c9b49..fc6a513f104 100644 --- a/engine/execution/mock/executed_finalized_wal.go +++ b/engine/execution/mock/executed_finalized_wal.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ExecutedFinalizedWAL struct { func (_m *ExecutedFinalizedWAL) Append(height uint64, registers flow.RegisterEntries) error { ret := _m.Called(height, registers) + if len(ret) == 0 { + panic("no return value specified for Append") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64, flow.RegisterEntries) error); ok { r0 = rf(height, registers) @@ -32,6 +36,10 @@ func (_m *ExecutedFinalizedWAL) Append(height uint64, registers flow.RegisterEnt func (_m *ExecutedFinalizedWAL) GetReader(height uint64) execution.WALReader { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for GetReader") + } + var r0 execution.WALReader if rf, ok := ret.Get(0).(func(uint64) execution.WALReader); ok { r0 = rf(height) @@ -48,6 +56,10 @@ func (_m *ExecutedFinalizedWAL) GetReader(height uint64) execution.WALReader { func (_m *ExecutedFinalizedWAL) Latest() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Latest") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -68,13 +80,12 @@ func (_m *ExecutedFinalizedWAL) Latest() (uint64, error) { return r0, r1 } -type mockConstructorTestingTNewExecutedFinalizedWAL interface { +// NewExecutedFinalizedWAL creates a new instance of ExecutedFinalizedWAL. 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 NewExecutedFinalizedWAL(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutedFinalizedWAL creates a new instance of ExecutedFinalizedWAL. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutedFinalizedWAL(t mockConstructorTestingTNewExecutedFinalizedWAL) *ExecutedFinalizedWAL { +}) *ExecutedFinalizedWAL { mock := &ExecutedFinalizedWAL{} mock.Mock.Test(t) diff --git a/engine/execution/mock/extendable_storage_snapshot.go b/engine/execution/mock/extendable_storage_snapshot.go index 6b65c7ca52f..4fff88075a1 100644 --- a/engine/execution/mock/extendable_storage_snapshot.go +++ b/engine/execution/mock/extendable_storage_snapshot.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ExtendableStorageSnapshot struct { func (_m *ExtendableStorageSnapshot) Commitment() flow.StateCommitment { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Commitment") + } + var r0 flow.StateCommitment if rf, ok := ret.Get(0).(func() flow.StateCommitment); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *ExtendableStorageSnapshot) Commitment() flow.StateCommitment { func (_m *ExtendableStorageSnapshot) Extend(newCommit flow.StateCommitment, updatedRegisters map[flow.RegisterID][]byte) execution.ExtendableStorageSnapshot { ret := _m.Called(newCommit, updatedRegisters) + if len(ret) == 0 { + panic("no return value specified for Extend") + } + var r0 execution.ExtendableStorageSnapshot if rf, ok := ret.Get(0).(func(flow.StateCommitment, map[flow.RegisterID][]byte) execution.ExtendableStorageSnapshot); ok { r0 = rf(newCommit, updatedRegisters) @@ -50,6 +58,10 @@ func (_m *ExtendableStorageSnapshot) Extend(newCommit flow.StateCommitment, upda func (_m *ExtendableStorageSnapshot) Get(id flow.RegisterID) ([]byte, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(flow.RegisterID) ([]byte, error)); ok { @@ -72,13 +84,12 @@ func (_m *ExtendableStorageSnapshot) Get(id flow.RegisterID) ([]byte, error) { return r0, r1 } -type mockConstructorTestingTNewExtendableStorageSnapshot interface { +// NewExtendableStorageSnapshot creates a new instance of ExtendableStorageSnapshot. 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 NewExtendableStorageSnapshot(t interface { mock.TestingT Cleanup(func()) -} - -// NewExtendableStorageSnapshot creates a new instance of ExtendableStorageSnapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExtendableStorageSnapshot(t mockConstructorTestingTNewExtendableStorageSnapshot) *ExtendableStorageSnapshot { +}) *ExtendableStorageSnapshot { mock := &ExtendableStorageSnapshot{} mock.Mock.Test(t) diff --git a/engine/execution/mock/finalized_reader.go b/engine/execution/mock/finalized_reader.go index 0629bed1710..2a3ee5b3910 100644 --- a/engine/execution/mock/finalized_reader.go +++ b/engine/execution/mock/finalized_reader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type FinalizedReader struct { func (_m *FinalizedReader) FinalizedBlockIDAtHeight(height uint64) (flow.Identifier, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for FinalizedBlockIDAtHeight") + } + var r0 flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(uint64) (flow.Identifier, error)); ok { @@ -38,13 +42,12 @@ func (_m *FinalizedReader) FinalizedBlockIDAtHeight(height uint64) (flow.Identif return r0, r1 } -type mockConstructorTestingTNewFinalizedReader interface { +// NewFinalizedReader creates a new instance of FinalizedReader. 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 NewFinalizedReader(t interface { mock.TestingT Cleanup(func()) -} - -// NewFinalizedReader creates a new instance of FinalizedReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFinalizedReader(t mockConstructorTestingTNewFinalizedReader) *FinalizedReader { +}) *FinalizedReader { mock := &FinalizedReader{} mock.Mock.Test(t) diff --git a/engine/execution/mock/in_memory_register_store.go b/engine/execution/mock/in_memory_register_store.go index 561f39c8a4d..f9e08952c68 100644 --- a/engine/execution/mock/in_memory_register_store.go +++ b/engine/execution/mock/in_memory_register_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type InMemoryRegisterStore struct { func (_m *InMemoryRegisterStore) GetRegister(height uint64, blockID flow.Identifier, register flow.RegisterID) ([]byte, error) { ret := _m.Called(height, blockID, register) + if len(ret) == 0 { + panic("no return value specified for GetRegister") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, flow.RegisterID) ([]byte, error)); ok { @@ -42,6 +46,10 @@ func (_m *InMemoryRegisterStore) GetRegister(height uint64, blockID flow.Identif func (_m *InMemoryRegisterStore) GetUpdatedRegisters(height uint64, blockID flow.Identifier) (flow.RegisterEntries, error) { ret := _m.Called(height, blockID) + if len(ret) == 0 { + panic("no return value specified for GetUpdatedRegisters") + } + var r0 flow.RegisterEntries var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (flow.RegisterEntries, error)); ok { @@ -68,6 +76,10 @@ func (_m *InMemoryRegisterStore) GetUpdatedRegisters(height uint64, blockID flow func (_m *InMemoryRegisterStore) IsBlockExecuted(height uint64, blockID flow.Identifier) (bool, error) { ret := _m.Called(height, blockID) + if len(ret) == 0 { + panic("no return value specified for IsBlockExecuted") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (bool, error)); ok { @@ -92,6 +104,10 @@ func (_m *InMemoryRegisterStore) IsBlockExecuted(height uint64, blockID flow.Ide func (_m *InMemoryRegisterStore) Prune(finalizedHeight uint64, finalizedBlockID flow.Identifier) error { ret := _m.Called(finalizedHeight, finalizedBlockID) + if len(ret) == 0 { + panic("no return value specified for Prune") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) error); ok { r0 = rf(finalizedHeight, finalizedBlockID) @@ -106,6 +122,10 @@ func (_m *InMemoryRegisterStore) Prune(finalizedHeight uint64, finalizedBlockID func (_m *InMemoryRegisterStore) PrunedHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PrunedHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -120,6 +140,10 @@ func (_m *InMemoryRegisterStore) PrunedHeight() uint64 { func (_m *InMemoryRegisterStore) SaveRegisters(height uint64, blockID flow.Identifier, parentID flow.Identifier, registers flow.RegisterEntries) error { ret := _m.Called(height, blockID, parentID, registers) + if len(ret) == 0 { + panic("no return value specified for SaveRegisters") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, flow.Identifier, flow.RegisterEntries) error); ok { r0 = rf(height, blockID, parentID, registers) @@ -130,13 +154,12 @@ func (_m *InMemoryRegisterStore) SaveRegisters(height uint64, blockID flow.Ident return r0 } -type mockConstructorTestingTNewInMemoryRegisterStore interface { +// NewInMemoryRegisterStore creates a new instance of InMemoryRegisterStore. 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 NewInMemoryRegisterStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewInMemoryRegisterStore creates a new instance of InMemoryRegisterStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewInMemoryRegisterStore(t mockConstructorTestingTNewInMemoryRegisterStore) *InMemoryRegisterStore { +}) *InMemoryRegisterStore { mock := &InMemoryRegisterStore{} mock.Mock.Test(t) diff --git a/engine/execution/mock/register_store.go b/engine/execution/mock/register_store.go index e2bd3dba400..ab232af547f 100644 --- a/engine/execution/mock/register_store.go +++ b/engine/execution/mock/register_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type RegisterStore struct { func (_m *RegisterStore) GetRegister(height uint64, blockID flow.Identifier, register flow.RegisterID) ([]byte, error) { ret := _m.Called(height, blockID, register) + if len(ret) == 0 { + panic("no return value specified for GetRegister") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, flow.RegisterID) ([]byte, error)); ok { @@ -42,6 +46,10 @@ func (_m *RegisterStore) GetRegister(height uint64, blockID flow.Identifier, reg func (_m *RegisterStore) IsBlockExecuted(height uint64, blockID flow.Identifier) (bool, error) { ret := _m.Called(height, blockID) + if len(ret) == 0 { + panic("no return value specified for IsBlockExecuted") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (bool, error)); ok { @@ -66,6 +74,10 @@ func (_m *RegisterStore) IsBlockExecuted(height uint64, blockID flow.Identifier) func (_m *RegisterStore) LastFinalizedAndExecutedHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LastFinalizedAndExecutedHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -80,6 +92,10 @@ func (_m *RegisterStore) LastFinalizedAndExecutedHeight() uint64 { func (_m *RegisterStore) OnBlockFinalized() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OnBlockFinalized") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -94,6 +110,10 @@ func (_m *RegisterStore) OnBlockFinalized() error { func (_m *RegisterStore) SaveRegisters(header *flow.Header, registers flow.RegisterEntries) error { ret := _m.Called(header, registers) + if len(ret) == 0 { + panic("no return value specified for SaveRegisters") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.Header, flow.RegisterEntries) error); ok { r0 = rf(header, registers) @@ -104,13 +124,12 @@ func (_m *RegisterStore) SaveRegisters(header *flow.Header, registers flow.Regis return r0 } -type mockConstructorTestingTNewRegisterStore interface { +// NewRegisterStore creates a new instance of RegisterStore. 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 NewRegisterStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewRegisterStore creates a new instance of RegisterStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRegisterStore(t mockConstructorTestingTNewRegisterStore) *RegisterStore { +}) *RegisterStore { mock := &RegisterStore{} mock.Mock.Test(t) diff --git a/engine/execution/mock/register_store_notifier.go b/engine/execution/mock/register_store_notifier.go index 7959e9e766b..fee6659d8c5 100644 --- a/engine/execution/mock/register_store_notifier.go +++ b/engine/execution/mock/register_store_notifier.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -14,13 +14,12 @@ func (_m *RegisterStoreNotifier) OnFinalizedAndExecutedHeightUpdated(height uint _m.Called(height) } -type mockConstructorTestingTNewRegisterStoreNotifier interface { +// NewRegisterStoreNotifier creates a new instance of RegisterStoreNotifier. 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 NewRegisterStoreNotifier(t interface { mock.TestingT Cleanup(func()) -} - -// NewRegisterStoreNotifier creates a new instance of RegisterStoreNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRegisterStoreNotifier(t mockConstructorTestingTNewRegisterStoreNotifier) *RegisterStoreNotifier { +}) *RegisterStoreNotifier { mock := &RegisterStoreNotifier{} mock.Mock.Test(t) diff --git a/engine/execution/mock/script_executor.go b/engine/execution/mock/script_executor.go index ddeb77ce3e7..a2532cc04bb 100644 --- a/engine/execution/mock/script_executor.go +++ b/engine/execution/mock/script_executor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type ScriptExecutor struct { func (_m *ScriptExecutor) ExecuteScriptAtBlockID(ctx context.Context, script []byte, arguments [][]byte, blockID flow.Identifier) ([]byte, uint64, error) { ret := _m.Called(ctx, script, arguments, blockID) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockID") + } + var r0 []byte var r1 uint64 var r2 error @@ -52,6 +56,10 @@ func (_m *ScriptExecutor) ExecuteScriptAtBlockID(ctx context.Context, script []b func (_m *ScriptExecutor) GetAccount(ctx context.Context, address flow.Address, blockID flow.Identifier) (*flow.Account, error) { ret := _m.Called(ctx, address, blockID) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address, flow.Identifier) (*flow.Account, error)); ok { @@ -78,6 +86,10 @@ func (_m *ScriptExecutor) GetAccount(ctx context.Context, address flow.Address, func (_m *ScriptExecutor) GetRegisterAtBlockID(ctx context.Context, owner []byte, key []byte, blockID flow.Identifier) ([]byte, error) { ret := _m.Called(ctx, owner, key, blockID) + if len(ret) == 0 { + panic("no return value specified for GetRegisterAtBlockID") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, []byte, []byte, flow.Identifier) ([]byte, error)); ok { @@ -100,13 +112,12 @@ func (_m *ScriptExecutor) GetRegisterAtBlockID(ctx context.Context, owner []byte return r0, r1 } -type mockConstructorTestingTNewScriptExecutor interface { +// NewScriptExecutor creates a new instance of ScriptExecutor. 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 NewScriptExecutor(t interface { mock.TestingT Cleanup(func()) -} - -// NewScriptExecutor creates a new instance of ScriptExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewScriptExecutor(t mockConstructorTestingTNewScriptExecutor) *ScriptExecutor { +}) *ScriptExecutor { mock := &ScriptExecutor{} mock.Mock.Test(t) diff --git a/engine/execution/mock/wal_reader.go b/engine/execution/mock/wal_reader.go index f9917c8b520..071791e46ca 100644 --- a/engine/execution/mock/wal_reader.go +++ b/engine/execution/mock/wal_reader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type WALReader struct { func (_m *WALReader) Next() (uint64, flow.RegisterEntries, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Next") + } + var r0 uint64 var r1 flow.RegisterEntries var r2 error @@ -45,13 +49,12 @@ func (_m *WALReader) Next() (uint64, flow.RegisterEntries, error) { return r0, r1, r2 } -type mockConstructorTestingTNewWALReader interface { +// NewWALReader creates a new instance of WALReader. 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 NewWALReader(t interface { mock.TestingT Cleanup(func()) -} - -// NewWALReader creates a new instance of WALReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWALReader(t mockConstructorTestingTNewWALReader) *WALReader { +}) *WALReader { mock := &WALReader{} mock.Mock.Test(t) diff --git a/engine/execution/provider/mock/provider_engine.go b/engine/execution/provider/mock/provider_engine.go index 5271f59c946..5cdf3a99236 100644 --- a/engine/execution/provider/mock/provider_engine.go +++ b/engine/execution/provider/mock/provider_engine.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -21,6 +21,10 @@ type ProviderEngine struct { func (_m *ProviderEngine) BroadcastExecutionReceipt(_a0 context.Context, _a1 uint64, _a2 *flow.ExecutionReceipt) (bool, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for BroadcastExecutionReceipt") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64, *flow.ExecutionReceipt) (bool, error)); ok { @@ -45,6 +49,10 @@ func (_m *ProviderEngine) BroadcastExecutionReceipt(_a0 context.Context, _a1 uin func (_m *ProviderEngine) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -61,6 +69,10 @@ func (_m *ProviderEngine) Done() <-chan struct{} { func (_m *ProviderEngine) Process(channel channels.Channel, originID flow.Identifier, message interface{}) error { ret := _m.Called(channel, originID, message) + if len(ret) == 0 { + panic("no return value specified for Process") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel, flow.Identifier, interface{}) error); ok { r0 = rf(channel, originID, message) @@ -75,6 +87,10 @@ func (_m *ProviderEngine) Process(channel channels.Channel, originID flow.Identi func (_m *ProviderEngine) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -87,13 +103,12 @@ func (_m *ProviderEngine) Ready() <-chan struct{} { return r0 } -type mockConstructorTestingTNewProviderEngine interface { +// NewProviderEngine creates a new instance of ProviderEngine. 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 NewProviderEngine(t interface { mock.TestingT Cleanup(func()) -} - -// NewProviderEngine creates a new instance of ProviderEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProviderEngine(t mockConstructorTestingTNewProviderEngine) *ProviderEngine { +}) *ProviderEngine { mock := &ProviderEngine{} mock.Mock.Test(t) diff --git a/engine/execution/state/mock/execution_state.go b/engine/execution/state/mock/execution_state.go index ec22b8d6497..e10988cdd4f 100644 --- a/engine/execution/state/mock/execution_state.go +++ b/engine/execution/state/mock/execution_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -22,6 +22,10 @@ type ExecutionState struct { func (_m *ExecutionState) ChunkDataPackByChunkID(_a0 flow.Identifier) (*flow.ChunkDataPack, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ChunkDataPackByChunkID") + } + var r0 *flow.ChunkDataPack var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ChunkDataPack, error)); ok { @@ -48,6 +52,10 @@ func (_m *ExecutionState) ChunkDataPackByChunkID(_a0 flow.Identifier) (*flow.Chu func (_m *ExecutionState) CreateStorageSnapshot(blockID flow.Identifier) (snapshot.StorageSnapshot, *flow.Header, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for CreateStorageSnapshot") + } + var r0 snapshot.StorageSnapshot var r1 *flow.Header var r2 error @@ -83,6 +91,10 @@ func (_m *ExecutionState) CreateStorageSnapshot(blockID flow.Identifier) (snapsh func (_m *ExecutionState) GetExecutionResultID(_a0 context.Context, _a1 flow.Identifier) (flow.Identifier, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultID") + } + var r0 flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (flow.Identifier, error)); ok { @@ -109,6 +121,10 @@ func (_m *ExecutionState) GetExecutionResultID(_a0 context.Context, _a1 flow.Ide func (_m *ExecutionState) GetHighestExecutedBlockID(_a0 context.Context) (uint64, flow.Identifier, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetHighestExecutedBlockID") + } + var r0 uint64 var r1 flow.Identifier var r2 error @@ -142,6 +158,10 @@ func (_m *ExecutionState) GetHighestExecutedBlockID(_a0 context.Context) (uint64 func (_m *ExecutionState) GetHighestFinalizedExecuted() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetHighestFinalizedExecuted") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -166,6 +186,10 @@ func (_m *ExecutionState) GetHighestFinalizedExecuted() (uint64, error) { func (_m *ExecutionState) IsBlockExecuted(height uint64, blockID flow.Identifier) (bool, error) { ret := _m.Called(height, blockID) + if len(ret) == 0 { + panic("no return value specified for IsBlockExecuted") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (bool, error)); ok { @@ -190,6 +214,10 @@ func (_m *ExecutionState) IsBlockExecuted(height uint64, blockID flow.Identifier func (_m *ExecutionState) NewStorageSnapshot(commit flow.StateCommitment, blockID flow.Identifier, height uint64) snapshot.StorageSnapshot { ret := _m.Called(commit, blockID, height) + if len(ret) == 0 { + panic("no return value specified for NewStorageSnapshot") + } + var r0 snapshot.StorageSnapshot if rf, ok := ret.Get(0).(func(flow.StateCommitment, flow.Identifier, uint64) snapshot.StorageSnapshot); ok { r0 = rf(commit, blockID, height) @@ -206,6 +234,10 @@ func (_m *ExecutionState) NewStorageSnapshot(commit flow.StateCommitment, blockI func (_m *ExecutionState) SaveExecutionResults(ctx context.Context, result *execution.ComputationResult) error { ret := _m.Called(ctx, result) + if len(ret) == 0 { + panic("no return value specified for SaveExecutionResults") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *execution.ComputationResult) error); ok { r0 = rf(ctx, result) @@ -220,6 +252,10 @@ func (_m *ExecutionState) SaveExecutionResults(ctx context.Context, result *exec func (_m *ExecutionState) StateCommitmentByBlockID(_a0 flow.Identifier) (flow.StateCommitment, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for StateCommitmentByBlockID") + } + var r0 flow.StateCommitment var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.StateCommitment, error)); ok { @@ -246,6 +282,10 @@ func (_m *ExecutionState) StateCommitmentByBlockID(_a0 flow.Identifier) (flow.St func (_m *ExecutionState) UpdateHighestExecutedBlockIfHigher(_a0 context.Context, _a1 *flow.Header) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for UpdateHighestExecutedBlockIfHigher") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *flow.Header) error); ok { r0 = rf(_a0, _a1) @@ -256,13 +296,12 @@ func (_m *ExecutionState) UpdateHighestExecutedBlockIfHigher(_a0 context.Context return r0 } -type mockConstructorTestingTNewExecutionState interface { +// NewExecutionState creates a new instance of ExecutionState. 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 NewExecutionState(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionState creates a new instance of ExecutionState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionState(t mockConstructorTestingTNewExecutionState) *ExecutionState { +}) *ExecutionState { mock := &ExecutionState{} mock.Mock.Test(t) diff --git a/engine/execution/state/mock/finalized_execution_state.go b/engine/execution/state/mock/finalized_execution_state.go index b8a391f4258..30360615c75 100644 --- a/engine/execution/state/mock/finalized_execution_state.go +++ b/engine/execution/state/mock/finalized_execution_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type FinalizedExecutionState struct { func (_m *FinalizedExecutionState) GetHighestFinalizedExecuted() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetHighestFinalizedExecuted") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -33,13 +37,12 @@ func (_m *FinalizedExecutionState) GetHighestFinalizedExecuted() (uint64, error) return r0, r1 } -type mockConstructorTestingTNewFinalizedExecutionState interface { +// NewFinalizedExecutionState creates a new instance of FinalizedExecutionState. 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 NewFinalizedExecutionState(t interface { mock.TestingT Cleanup(func()) -} - -// NewFinalizedExecutionState creates a new instance of FinalizedExecutionState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFinalizedExecutionState(t mockConstructorTestingTNewFinalizedExecutionState) *FinalizedExecutionState { +}) *FinalizedExecutionState { mock := &FinalizedExecutionState{} mock.Mock.Test(t) diff --git a/engine/execution/state/mock/read_only_execution_state.go b/engine/execution/state/mock/read_only_execution_state.go index cab9c110b1c..68d4a9bcc3f 100644 --- a/engine/execution/state/mock/read_only_execution_state.go +++ b/engine/execution/state/mock/read_only_execution_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type ReadOnlyExecutionState struct { func (_m *ReadOnlyExecutionState) ChunkDataPackByChunkID(_a0 flow.Identifier) (*flow.ChunkDataPack, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ChunkDataPackByChunkID") + } + var r0 *flow.ChunkDataPack var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ChunkDataPack, error)); ok { @@ -46,6 +50,10 @@ func (_m *ReadOnlyExecutionState) ChunkDataPackByChunkID(_a0 flow.Identifier) (* func (_m *ReadOnlyExecutionState) CreateStorageSnapshot(blockID flow.Identifier) (snapshot.StorageSnapshot, *flow.Header, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for CreateStorageSnapshot") + } + var r0 snapshot.StorageSnapshot var r1 *flow.Header var r2 error @@ -81,6 +89,10 @@ func (_m *ReadOnlyExecutionState) CreateStorageSnapshot(blockID flow.Identifier) func (_m *ReadOnlyExecutionState) GetExecutionResultID(_a0 context.Context, _a1 flow.Identifier) (flow.Identifier, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultID") + } + var r0 flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (flow.Identifier, error)); ok { @@ -107,6 +119,10 @@ func (_m *ReadOnlyExecutionState) GetExecutionResultID(_a0 context.Context, _a1 func (_m *ReadOnlyExecutionState) GetHighestExecutedBlockID(_a0 context.Context) (uint64, flow.Identifier, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetHighestExecutedBlockID") + } + var r0 uint64 var r1 flow.Identifier var r2 error @@ -140,6 +156,10 @@ func (_m *ReadOnlyExecutionState) GetHighestExecutedBlockID(_a0 context.Context) func (_m *ReadOnlyExecutionState) IsBlockExecuted(height uint64, blockID flow.Identifier) (bool, error) { ret := _m.Called(height, blockID) + if len(ret) == 0 { + panic("no return value specified for IsBlockExecuted") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (bool, error)); ok { @@ -164,6 +184,10 @@ func (_m *ReadOnlyExecutionState) IsBlockExecuted(height uint64, blockID flow.Id func (_m *ReadOnlyExecutionState) NewStorageSnapshot(commit flow.StateCommitment, blockID flow.Identifier, height uint64) snapshot.StorageSnapshot { ret := _m.Called(commit, blockID, height) + if len(ret) == 0 { + panic("no return value specified for NewStorageSnapshot") + } + var r0 snapshot.StorageSnapshot if rf, ok := ret.Get(0).(func(flow.StateCommitment, flow.Identifier, uint64) snapshot.StorageSnapshot); ok { r0 = rf(commit, blockID, height) @@ -180,6 +204,10 @@ func (_m *ReadOnlyExecutionState) NewStorageSnapshot(commit flow.StateCommitment func (_m *ReadOnlyExecutionState) StateCommitmentByBlockID(_a0 flow.Identifier) (flow.StateCommitment, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for StateCommitmentByBlockID") + } + var r0 flow.StateCommitment var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.StateCommitment, error)); ok { @@ -202,13 +230,12 @@ func (_m *ReadOnlyExecutionState) StateCommitmentByBlockID(_a0 flow.Identifier) return r0, r1 } -type mockConstructorTestingTNewReadOnlyExecutionState interface { +// NewReadOnlyExecutionState creates a new instance of ReadOnlyExecutionState. 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 NewReadOnlyExecutionState(t interface { mock.TestingT Cleanup(func()) -} - -// NewReadOnlyExecutionState creates a new instance of ReadOnlyExecutionState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReadOnlyExecutionState(t mockConstructorTestingTNewReadOnlyExecutionState) *ReadOnlyExecutionState { +}) *ReadOnlyExecutionState { mock := &ReadOnlyExecutionState{} mock.Mock.Test(t) diff --git a/engine/execution/state/mock/register_updates_holder.go b/engine/execution/state/mock/register_updates_holder.go index dd4239d2f6d..134e77c1b5e 100644 --- a/engine/execution/state/mock/register_updates_holder.go +++ b/engine/execution/state/mock/register_updates_holder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type RegisterUpdatesHolder struct { func (_m *RegisterUpdatesHolder) UpdatedRegisterSet() map[flow.RegisterID][]byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for UpdatedRegisterSet") + } + var r0 map[flow.RegisterID][]byte if rf, ok := ret.Get(0).(func() map[flow.RegisterID][]byte); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *RegisterUpdatesHolder) UpdatedRegisterSet() map[flow.RegisterID][]byte func (_m *RegisterUpdatesHolder) UpdatedRegisters() flow.RegisterEntries { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for UpdatedRegisters") + } + var r0 flow.RegisterEntries if rf, ok := ret.Get(0).(func() flow.RegisterEntries); ok { r0 = rf() @@ -44,13 +52,12 @@ func (_m *RegisterUpdatesHolder) UpdatedRegisters() flow.RegisterEntries { return r0 } -type mockConstructorTestingTNewRegisterUpdatesHolder interface { +// NewRegisterUpdatesHolder creates a new instance of RegisterUpdatesHolder. 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 NewRegisterUpdatesHolder(t interface { mock.TestingT Cleanup(func()) -} - -// NewRegisterUpdatesHolder creates a new instance of RegisterUpdatesHolder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRegisterUpdatesHolder(t mockConstructorTestingTNewRegisterUpdatesHolder) *RegisterUpdatesHolder { +}) *RegisterUpdatesHolder { mock := &RegisterUpdatesHolder{} mock.Mock.Test(t) diff --git a/engine/execution/state/mock/script_execution_state.go b/engine/execution/state/mock/script_execution_state.go index 54b21fab462..6a2fad1888e 100644 --- a/engine/execution/state/mock/script_execution_state.go +++ b/engine/execution/state/mock/script_execution_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ScriptExecutionState struct { func (_m *ScriptExecutionState) CreateStorageSnapshot(blockID flow.Identifier) (snapshot.StorageSnapshot, *flow.Header, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for CreateStorageSnapshot") + } + var r0 snapshot.StorageSnapshot var r1 *flow.Header var r2 error @@ -53,6 +57,10 @@ func (_m *ScriptExecutionState) CreateStorageSnapshot(blockID flow.Identifier) ( func (_m *ScriptExecutionState) IsBlockExecuted(height uint64, blockID flow.Identifier) (bool, error) { ret := _m.Called(height, blockID) + if len(ret) == 0 { + panic("no return value specified for IsBlockExecuted") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (bool, error)); ok { @@ -77,6 +85,10 @@ func (_m *ScriptExecutionState) IsBlockExecuted(height uint64, blockID flow.Iden func (_m *ScriptExecutionState) NewStorageSnapshot(commit flow.StateCommitment, blockID flow.Identifier, height uint64) snapshot.StorageSnapshot { ret := _m.Called(commit, blockID, height) + if len(ret) == 0 { + panic("no return value specified for NewStorageSnapshot") + } + var r0 snapshot.StorageSnapshot if rf, ok := ret.Get(0).(func(flow.StateCommitment, flow.Identifier, uint64) snapshot.StorageSnapshot); ok { r0 = rf(commit, blockID, height) @@ -93,6 +105,10 @@ func (_m *ScriptExecutionState) NewStorageSnapshot(commit flow.StateCommitment, func (_m *ScriptExecutionState) StateCommitmentByBlockID(_a0 flow.Identifier) (flow.StateCommitment, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for StateCommitmentByBlockID") + } + var r0 flow.StateCommitment var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.StateCommitment, error)); ok { @@ -115,13 +131,12 @@ func (_m *ScriptExecutionState) StateCommitmentByBlockID(_a0 flow.Identifier) (f return r0, r1 } -type mockConstructorTestingTNewScriptExecutionState interface { +// NewScriptExecutionState creates a new instance of ScriptExecutionState. 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 NewScriptExecutionState(t interface { mock.TestingT Cleanup(func()) -} - -// NewScriptExecutionState creates a new instance of ScriptExecutionState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewScriptExecutionState(t mockConstructorTestingTNewScriptExecutionState) *ScriptExecutionState { +}) *ScriptExecutionState { mock := &ScriptExecutionState{} mock.Mock.Test(t) diff --git a/engine/protocol/mock/api.go b/engine/protocol/mock/api.go index fb7bf3a3c42..f2e4fb175fa 100644 --- a/engine/protocol/mock/api.go +++ b/engine/protocol/mock/api.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -21,6 +21,10 @@ type API struct { func (_m *API) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Block, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for GetBlockByHeight") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (*flow.Block, error)); ok { @@ -47,6 +51,10 @@ func (_m *API) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Block func (_m *API) GetBlockByID(ctx context.Context, id flow.Identifier) (*flow.Block, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockByID") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Block, error)); ok { @@ -73,6 +81,10 @@ func (_m *API) GetBlockByID(ctx context.Context, id flow.Identifier) (*flow.Bloc func (_m *API) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow.Header, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByHeight") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (*flow.Header, error)); ok { @@ -99,6 +111,10 @@ func (_m *API) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow func (_m *API) GetBlockHeaderByID(ctx context.Context, id flow.Identifier) (*flow.Header, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByID") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Header, error)); ok { @@ -125,6 +141,10 @@ func (_m *API) GetBlockHeaderByID(ctx context.Context, id flow.Identifier) (*flo func (_m *API) GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Block, error) { ret := _m.Called(ctx, isSealed) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlock") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (*flow.Block, error)); ok { @@ -151,6 +171,10 @@ func (_m *API) GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Block, func (_m *API) GetLatestBlockHeader(ctx context.Context, isSealed bool) (*flow.Header, error) { ret := _m.Called(ctx, isSealed) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (*flow.Header, error)); ok { @@ -177,6 +201,10 @@ func (_m *API) GetLatestBlockHeader(ctx context.Context, isSealed bool) (*flow.H func (_m *API) GetLatestProtocolStateSnapshot(ctx context.Context) ([]byte, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetLatestProtocolStateSnapshot") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]byte, error)); ok { @@ -203,6 +231,10 @@ func (_m *API) GetLatestProtocolStateSnapshot(ctx context.Context) ([]byte, erro func (_m *API) GetNetworkParameters(ctx context.Context) access.NetworkParameters { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNetworkParameters") + } + var r0 access.NetworkParameters if rf, ok := ret.Get(0).(func(context.Context) access.NetworkParameters); ok { r0 = rf(ctx) @@ -217,6 +249,10 @@ func (_m *API) GetNetworkParameters(ctx context.Context) access.NetworkParameter func (_m *API) GetNodeVersionInfo(ctx context.Context) (*access.NodeVersionInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNodeVersionInfo") + } + var r0 *access.NodeVersionInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*access.NodeVersionInfo, error)); ok { @@ -243,6 +279,10 @@ func (_m *API) GetNodeVersionInfo(ctx context.Context) (*access.NodeVersionInfo, func (_m *API) GetProtocolStateSnapshotByBlockID(ctx context.Context, blockID flow.Identifier) ([]byte, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateSnapshotByBlockID") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) ([]byte, error)); ok { @@ -269,6 +309,10 @@ func (_m *API) GetProtocolStateSnapshotByBlockID(ctx context.Context, blockID fl func (_m *API) GetProtocolStateSnapshotByHeight(ctx context.Context, blockHeight uint64) ([]byte, error) { ret := _m.Called(ctx, blockHeight) + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateSnapshotByHeight") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) ([]byte, error)); ok { @@ -291,13 +335,12 @@ func (_m *API) GetProtocolStateSnapshotByHeight(ctx context.Context, blockHeight return r0, r1 } -type mockConstructorTestingTNewAPI interface { +// NewAPI creates a new instance of API. 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 NewAPI(t interface { mock.TestingT Cleanup(func()) -} - -// NewAPI creates a new instance of API. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAPI(t mockConstructorTestingTNewAPI) *API { +}) *API { mock := &API{} mock.Mock.Test(t) diff --git a/engine/verification/fetcher/mock/assigned_chunk_processor.go b/engine/verification/fetcher/mock/assigned_chunk_processor.go index 193af0532a2..7efa0040a60 100644 --- a/engine/verification/fetcher/mock/assigned_chunk_processor.go +++ b/engine/verification/fetcher/mock/assigned_chunk_processor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockfetcher @@ -19,6 +19,10 @@ type AssignedChunkProcessor struct { func (_m *AssignedChunkProcessor) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -40,6 +44,10 @@ func (_m *AssignedChunkProcessor) ProcessAssignedChunk(locator *chunks.Locator) func (_m *AssignedChunkProcessor) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -57,13 +65,12 @@ func (_m *AssignedChunkProcessor) WithChunkConsumerNotifier(notifier module.Proc _m.Called(notifier) } -type mockConstructorTestingTNewAssignedChunkProcessor interface { +// NewAssignedChunkProcessor creates a new instance of AssignedChunkProcessor. 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 NewAssignedChunkProcessor(t interface { mock.TestingT Cleanup(func()) -} - -// NewAssignedChunkProcessor creates a new instance of AssignedChunkProcessor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAssignedChunkProcessor(t mockConstructorTestingTNewAssignedChunkProcessor) *AssignedChunkProcessor { +}) *AssignedChunkProcessor { mock := &AssignedChunkProcessor{} mock.Mock.Test(t) diff --git a/engine/verification/fetcher/mock/chunk_data_pack_handler.go b/engine/verification/fetcher/mock/chunk_data_pack_handler.go index c3675d3480c..85fa21cf643 100644 --- a/engine/verification/fetcher/mock/chunk_data_pack_handler.go +++ b/engine/verification/fetcher/mock/chunk_data_pack_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockfetcher @@ -24,13 +24,12 @@ func (_m *ChunkDataPackHandler) NotifyChunkDataPackSealed(chunkIndex uint64, res _m.Called(chunkIndex, resultID) } -type mockConstructorTestingTNewChunkDataPackHandler interface { +// NewChunkDataPackHandler creates a new instance of ChunkDataPackHandler. 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 NewChunkDataPackHandler(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkDataPackHandler creates a new instance of ChunkDataPackHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkDataPackHandler(t mockConstructorTestingTNewChunkDataPackHandler) *ChunkDataPackHandler { +}) *ChunkDataPackHandler { mock := &ChunkDataPackHandler{} mock.Mock.Test(t) diff --git a/engine/verification/fetcher/mock/chunk_data_pack_requester.go b/engine/verification/fetcher/mock/chunk_data_pack_requester.go index 2b3b42de6c4..8d1538e0ba2 100644 --- a/engine/verification/fetcher/mock/chunk_data_pack_requester.go +++ b/engine/verification/fetcher/mock/chunk_data_pack_requester.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockfetcher @@ -18,6 +18,10 @@ type ChunkDataPackRequester struct { func (_m *ChunkDataPackRequester) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *ChunkDataPackRequester) Done() <-chan struct{} { func (_m *ChunkDataPackRequester) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -56,13 +64,12 @@ func (_m *ChunkDataPackRequester) WithChunkDataPackHandler(handler fetcher.Chunk _m.Called(handler) } -type mockConstructorTestingTNewChunkDataPackRequester interface { +// NewChunkDataPackRequester creates a new instance of ChunkDataPackRequester. 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 NewChunkDataPackRequester(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkDataPackRequester creates a new instance of ChunkDataPackRequester. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkDataPackRequester(t mockConstructorTestingTNewChunkDataPackRequester) *ChunkDataPackRequester { +}) *ChunkDataPackRequester { mock := &ChunkDataPackRequester{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/account_creator.go b/fvm/environment/mock/account_creator.go index 15b19b507b1..94a05f2a01c 100644 --- a/fvm/environment/mock/account_creator.go +++ b/fvm/environment/mock/account_creator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,6 +17,10 @@ type AccountCreator struct { func (_m *AccountCreator) CreateAccount(runtimePayer common.Address) (common.Address, error) { ret := _m.Called(runtimePayer) + if len(ret) == 0 { + panic("no return value specified for CreateAccount") + } + var r0 common.Address var r1 error if rf, ok := ret.Get(0).(func(common.Address) (common.Address, error)); ok { @@ -39,13 +43,12 @@ func (_m *AccountCreator) CreateAccount(runtimePayer common.Address) (common.Add return r0, r1 } -type mockConstructorTestingTNewAccountCreator interface { +// NewAccountCreator creates a new instance of AccountCreator. 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 NewAccountCreator(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccountCreator creates a new instance of AccountCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccountCreator(t mockConstructorTestingTNewAccountCreator) *AccountCreator { +}) *AccountCreator { mock := &AccountCreator{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/account_info.go b/fvm/environment/mock/account_info.go index 4af71a34296..c28110c9561 100644 --- a/fvm/environment/mock/account_info.go +++ b/fvm/environment/mock/account_info.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type AccountInfo struct { func (_m *AccountInfo) GetAccount(address flow.Address) (*flow.Account, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(flow.Address) (*flow.Account, error)); ok { @@ -45,6 +49,10 @@ func (_m *AccountInfo) GetAccount(address flow.Address) (*flow.Account, error) { func (_m *AccountInfo) GetAccountAvailableBalance(runtimeAddress common.Address) (uint64, error) { ret := _m.Called(runtimeAddress) + if len(ret) == 0 { + panic("no return value specified for GetAccountAvailableBalance") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -69,6 +77,10 @@ func (_m *AccountInfo) GetAccountAvailableBalance(runtimeAddress common.Address) func (_m *AccountInfo) GetAccountBalance(runtimeAddress common.Address) (uint64, error) { ret := _m.Called(runtimeAddress) + if len(ret) == 0 { + panic("no return value specified for GetAccountBalance") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -93,6 +105,10 @@ func (_m *AccountInfo) GetAccountBalance(runtimeAddress common.Address) (uint64, func (_m *AccountInfo) GetStorageCapacity(runtimeAddress common.Address) (uint64, error) { ret := _m.Called(runtimeAddress) + if len(ret) == 0 { + panic("no return value specified for GetStorageCapacity") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -117,6 +133,10 @@ func (_m *AccountInfo) GetStorageCapacity(runtimeAddress common.Address) (uint64 func (_m *AccountInfo) GetStorageUsed(runtimeaddress common.Address) (uint64, error) { ret := _m.Called(runtimeaddress) + if len(ret) == 0 { + panic("no return value specified for GetStorageUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -137,13 +157,12 @@ func (_m *AccountInfo) GetStorageUsed(runtimeaddress common.Address) (uint64, er return r0, r1 } -type mockConstructorTestingTNewAccountInfo interface { +// NewAccountInfo creates a new instance of AccountInfo. 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 NewAccountInfo(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccountInfo creates a new instance of AccountInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccountInfo(t mockConstructorTestingTNewAccountInfo) *AccountInfo { +}) *AccountInfo { mock := &AccountInfo{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/account_key_reader.go b/fvm/environment/mock/account_key_reader.go index 64cd803bcf1..5701c342a02 100644 --- a/fvm/environment/mock/account_key_reader.go +++ b/fvm/environment/mock/account_key_reader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type AccountKeyReader struct { func (_m *AccountKeyReader) AccountKeysCount(runtimeAddress common.Address) (uint64, error) { ret := _m.Called(runtimeAddress) + if len(ret) == 0 { + panic("no return value specified for AccountKeysCount") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -43,6 +47,10 @@ func (_m *AccountKeyReader) AccountKeysCount(runtimeAddress common.Address) (uin func (_m *AccountKeyReader) GetAccountKey(runtimeAddress common.Address, keyIndex int) (*stdlib.AccountKey, error) { ret := _m.Called(runtimeAddress, keyIndex) + if len(ret) == 0 { + panic("no return value specified for GetAccountKey") + } + var r0 *stdlib.AccountKey var r1 error if rf, ok := ret.Get(0).(func(common.Address, int) (*stdlib.AccountKey, error)); ok { @@ -65,13 +73,12 @@ func (_m *AccountKeyReader) GetAccountKey(runtimeAddress common.Address, keyInde return r0, r1 } -type mockConstructorTestingTNewAccountKeyReader interface { +// NewAccountKeyReader creates a new instance of AccountKeyReader. 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 NewAccountKeyReader(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccountKeyReader creates a new instance of AccountKeyReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccountKeyReader(t mockConstructorTestingTNewAccountKeyReader) *AccountKeyReader { +}) *AccountKeyReader { mock := &AccountKeyReader{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/account_key_updater.go b/fvm/environment/mock/account_key_updater.go index 85ecad57721..53671223e54 100644 --- a/fvm/environment/mock/account_key_updater.go +++ b/fvm/environment/mock/account_key_updater.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -21,6 +21,10 @@ type AccountKeyUpdater struct { func (_m *AccountKeyUpdater) AddAccountKey(runtimeAddress common.Address, publicKey *stdlib.PublicKey, hashAlgo sema.HashAlgorithm, weight int) (*stdlib.AccountKey, error) { ret := _m.Called(runtimeAddress, publicKey, hashAlgo, weight) + if len(ret) == 0 { + panic("no return value specified for AddAccountKey") + } + var r0 *stdlib.AccountKey var r1 error if rf, ok := ret.Get(0).(func(common.Address, *stdlib.PublicKey, sema.HashAlgorithm, int) (*stdlib.AccountKey, error)); ok { @@ -47,6 +51,10 @@ func (_m *AccountKeyUpdater) AddAccountKey(runtimeAddress common.Address, public func (_m *AccountKeyUpdater) RevokeAccountKey(runtimeAddress common.Address, keyIndex int) (*stdlib.AccountKey, error) { ret := _m.Called(runtimeAddress, keyIndex) + if len(ret) == 0 { + panic("no return value specified for RevokeAccountKey") + } + var r0 *stdlib.AccountKey var r1 error if rf, ok := ret.Get(0).(func(common.Address, int) (*stdlib.AccountKey, error)); ok { @@ -69,13 +77,12 @@ func (_m *AccountKeyUpdater) RevokeAccountKey(runtimeAddress common.Address, key return r0, r1 } -type mockConstructorTestingTNewAccountKeyUpdater interface { +// NewAccountKeyUpdater creates a new instance of AccountKeyUpdater. 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 NewAccountKeyUpdater(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccountKeyUpdater creates a new instance of AccountKeyUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccountKeyUpdater(t mockConstructorTestingTNewAccountKeyUpdater) *AccountKeyUpdater { +}) *AccountKeyUpdater { mock := &AccountKeyUpdater{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/account_local_id_generator.go b/fvm/environment/mock/account_local_id_generator.go index f6bfac27edb..8ff52c83663 100644 --- a/fvm/environment/mock/account_local_id_generator.go +++ b/fvm/environment/mock/account_local_id_generator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,6 +17,10 @@ type AccountLocalIDGenerator struct { func (_m *AccountLocalIDGenerator) GenerateAccountID(address common.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GenerateAccountID") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -37,13 +41,12 @@ func (_m *AccountLocalIDGenerator) GenerateAccountID(address common.Address) (ui return r0, r1 } -type mockConstructorTestingTNewAccountLocalIDGenerator interface { +// NewAccountLocalIDGenerator creates a new instance of AccountLocalIDGenerator. 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 NewAccountLocalIDGenerator(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccountLocalIDGenerator creates a new instance of AccountLocalIDGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccountLocalIDGenerator(t mockConstructorTestingTNewAccountLocalIDGenerator) *AccountLocalIDGenerator { +}) *AccountLocalIDGenerator { mock := &AccountLocalIDGenerator{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/accounts.go b/fvm/environment/mock/accounts.go index ee4656a4be8..66c912c5f35 100644 --- a/fvm/environment/mock/accounts.go +++ b/fvm/environment/mock/accounts.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type Accounts struct { func (_m *Accounts) AllocateStorageIndex(address flow.Address) (atree.StorageIndex, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for AllocateStorageIndex") + } + var r0 atree.StorageIndex var r1 error if rf, ok := ret.Get(0).(func(flow.Address) (atree.StorageIndex, error)); ok { @@ -45,6 +49,10 @@ func (_m *Accounts) AllocateStorageIndex(address flow.Address) (atree.StorageInd func (_m *Accounts) AppendPublicKey(address flow.Address, key flow.AccountPublicKey) error { ret := _m.Called(address, key) + if len(ret) == 0 { + panic("no return value specified for AppendPublicKey") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Address, flow.AccountPublicKey) error); ok { r0 = rf(address, key) @@ -59,6 +67,10 @@ func (_m *Accounts) AppendPublicKey(address flow.Address, key flow.AccountPublic func (_m *Accounts) ContractExists(contractName string, address flow.Address) (bool, error) { ret := _m.Called(contractName, address) + if len(ret) == 0 { + panic("no return value specified for ContractExists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string, flow.Address) (bool, error)); ok { @@ -83,6 +95,10 @@ func (_m *Accounts) ContractExists(contractName string, address flow.Address) (b func (_m *Accounts) Create(publicKeys []flow.AccountPublicKey, newAddress flow.Address) error { ret := _m.Called(publicKeys, newAddress) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 error if rf, ok := ret.Get(0).(func([]flow.AccountPublicKey, flow.Address) error); ok { r0 = rf(publicKeys, newAddress) @@ -97,6 +113,10 @@ func (_m *Accounts) Create(publicKeys []flow.AccountPublicKey, newAddress flow.A func (_m *Accounts) DeleteContract(contractName string, address flow.Address) error { ret := _m.Called(contractName, address) + if len(ret) == 0 { + panic("no return value specified for DeleteContract") + } + var r0 error if rf, ok := ret.Get(0).(func(string, flow.Address) error); ok { r0 = rf(contractName, address) @@ -111,6 +131,10 @@ func (_m *Accounts) DeleteContract(contractName string, address flow.Address) er func (_m *Accounts) Exists(address flow.Address) (bool, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for Exists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(flow.Address) (bool, error)); ok { @@ -135,6 +159,10 @@ func (_m *Accounts) Exists(address flow.Address) (bool, error) { func (_m *Accounts) GenerateAccountLocalID(address flow.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GenerateAccountLocalID") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(flow.Address) (uint64, error)); ok { @@ -159,6 +187,10 @@ func (_m *Accounts) GenerateAccountLocalID(address flow.Address) (uint64, error) func (_m *Accounts) Get(address flow.Address) (*flow.Account, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(flow.Address) (*flow.Account, error)); ok { @@ -185,6 +217,10 @@ func (_m *Accounts) Get(address flow.Address) (*flow.Account, error) { func (_m *Accounts) GetContract(contractName string, address flow.Address) ([]byte, error) { ret := _m.Called(contractName, address) + if len(ret) == 0 { + panic("no return value specified for GetContract") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(string, flow.Address) ([]byte, error)); ok { @@ -211,6 +247,10 @@ func (_m *Accounts) GetContract(contractName string, address flow.Address) ([]by func (_m *Accounts) GetContractNames(address flow.Address) ([]string, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetContractNames") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(flow.Address) ([]string, error)); ok { @@ -237,6 +277,10 @@ func (_m *Accounts) GetContractNames(address flow.Address) ([]string, error) { func (_m *Accounts) GetPublicKey(address flow.Address, keyIndex uint64) (flow.AccountPublicKey, error) { ret := _m.Called(address, keyIndex) + if len(ret) == 0 { + panic("no return value specified for GetPublicKey") + } + var r0 flow.AccountPublicKey var r1 error if rf, ok := ret.Get(0).(func(flow.Address, uint64) (flow.AccountPublicKey, error)); ok { @@ -261,6 +305,10 @@ func (_m *Accounts) GetPublicKey(address flow.Address, keyIndex uint64) (flow.Ac func (_m *Accounts) GetPublicKeyCount(address flow.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetPublicKeyCount") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(flow.Address) (uint64, error)); ok { @@ -285,6 +333,10 @@ func (_m *Accounts) GetPublicKeyCount(address flow.Address) (uint64, error) { func (_m *Accounts) GetStorageUsed(address flow.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetStorageUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(flow.Address) (uint64, error)); ok { @@ -309,6 +361,10 @@ func (_m *Accounts) GetStorageUsed(address flow.Address) (uint64, error) { func (_m *Accounts) GetValue(id flow.RegisterID) ([]byte, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for GetValue") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(flow.RegisterID) ([]byte, error)); ok { @@ -335,6 +391,10 @@ func (_m *Accounts) GetValue(id flow.RegisterID) ([]byte, error) { func (_m *Accounts) SetContract(contractName string, address flow.Address, contract []byte) error { ret := _m.Called(contractName, address, contract) + if len(ret) == 0 { + panic("no return value specified for SetContract") + } + var r0 error if rf, ok := ret.Get(0).(func(string, flow.Address, []byte) error); ok { r0 = rf(contractName, address, contract) @@ -349,6 +409,10 @@ func (_m *Accounts) SetContract(contractName string, address flow.Address, contr func (_m *Accounts) SetPublicKey(address flow.Address, keyIndex uint64, publicKey flow.AccountPublicKey) ([]byte, error) { ret := _m.Called(address, keyIndex, publicKey) + if len(ret) == 0 { + panic("no return value specified for SetPublicKey") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(flow.Address, uint64, flow.AccountPublicKey) ([]byte, error)); ok { @@ -375,6 +439,10 @@ func (_m *Accounts) SetPublicKey(address flow.Address, keyIndex uint64, publicKe func (_m *Accounts) SetValue(id flow.RegisterID, value []byte) error { ret := _m.Called(id, value) + if len(ret) == 0 { + panic("no return value specified for SetValue") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.RegisterID, []byte) error); ok { r0 = rf(id, value) @@ -385,13 +453,12 @@ func (_m *Accounts) SetValue(id flow.RegisterID, value []byte) error { return r0 } -type mockConstructorTestingTNewAccounts interface { +// NewAccounts creates a new instance of Accounts. 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 NewAccounts(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccounts creates a new instance of Accounts. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccounts(t mockConstructorTestingTNewAccounts) *Accounts { +}) *Accounts { mock := &Accounts{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/address_generator.go b/fvm/environment/mock/address_generator.go index 26f5e1158ac..6d411fd93a5 100644 --- a/fvm/environment/mock/address_generator.go +++ b/fvm/environment/mock/address_generator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type AddressGenerator struct { func (_m *AddressGenerator) AddressCount() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AddressCount") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *AddressGenerator) AddressCount() uint64 { func (_m *AddressGenerator) Bytes() []byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Bytes") + } + var r0 []byte if rf, ok := ret.Get(0).(func() []byte); ok { r0 = rf() @@ -46,6 +54,10 @@ func (_m *AddressGenerator) Bytes() []byte { func (_m *AddressGenerator) CurrentAddress() flow.Address { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CurrentAddress") + } + var r0 flow.Address if rf, ok := ret.Get(0).(func() flow.Address); ok { r0 = rf() @@ -62,6 +74,10 @@ func (_m *AddressGenerator) CurrentAddress() flow.Address { func (_m *AddressGenerator) NextAddress() (flow.Address, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NextAddress") + } + var r0 flow.Address var r1 error if rf, ok := ret.Get(0).(func() (flow.Address, error)); ok { @@ -84,13 +100,12 @@ func (_m *AddressGenerator) NextAddress() (flow.Address, error) { return r0, r1 } -type mockConstructorTestingTNewAddressGenerator interface { +// NewAddressGenerator creates a new instance of AddressGenerator. 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 NewAddressGenerator(t interface { mock.TestingT Cleanup(func()) -} - -// NewAddressGenerator creates a new instance of AddressGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAddressGenerator(t mockConstructorTestingTNewAddressGenerator) *AddressGenerator { +}) *AddressGenerator { mock := &AddressGenerator{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/block_info.go b/fvm/environment/mock/block_info.go index 27e19e3206e..df2b75cffc2 100644 --- a/fvm/environment/mock/block_info.go +++ b/fvm/environment/mock/block_info.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type BlockInfo struct { func (_m *BlockInfo) GetBlockAtHeight(height uint64) (stdlib.Block, bool, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for GetBlockAtHeight") + } + var r0 stdlib.Block var r1 bool var r2 error @@ -47,6 +51,10 @@ func (_m *BlockInfo) GetBlockAtHeight(height uint64) (stdlib.Block, bool, error) func (_m *BlockInfo) GetCurrentBlockHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCurrentBlockHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -67,13 +75,12 @@ func (_m *BlockInfo) GetCurrentBlockHeight() (uint64, error) { return r0, r1 } -type mockConstructorTestingTNewBlockInfo interface { +// NewBlockInfo creates a new instance of BlockInfo. 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 NewBlockInfo(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockInfo creates a new instance of BlockInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockInfo(t mockConstructorTestingTNewBlockInfo) *BlockInfo { +}) *BlockInfo { mock := &BlockInfo{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/blocks.go b/fvm/environment/mock/blocks.go index 51d1305c8a5..89aa5333fc0 100644 --- a/fvm/environment/mock/blocks.go +++ b/fvm/environment/mock/blocks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Blocks struct { func (_m *Blocks) ByHeightFrom(height uint64, header *flow.Header) (*flow.Header, error) { ret := _m.Called(height, header) + if len(ret) == 0 { + panic("no return value specified for ByHeightFrom") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func(uint64, *flow.Header) (*flow.Header, error)); ok { @@ -38,13 +42,12 @@ func (_m *Blocks) ByHeightFrom(height uint64, header *flow.Header) (*flow.Header return r0, r1 } -type mockConstructorTestingTNewBlocks interface { +// NewBlocks creates a new instance of Blocks. 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 NewBlocks(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlocks creates a new instance of Blocks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlocks(t mockConstructorTestingTNewBlocks) *Blocks { +}) *Blocks { mock := &Blocks{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/bootstrap_account_creator.go b/fvm/environment/mock/bootstrap_account_creator.go index 3fb8a316a18..9d5540c5dbc 100644 --- a/fvm/environment/mock/bootstrap_account_creator.go +++ b/fvm/environment/mock/bootstrap_account_creator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type BootstrapAccountCreator struct { func (_m *BootstrapAccountCreator) CreateBootstrapAccount(publicKeys []flow.AccountPublicKey) (flow.Address, error) { ret := _m.Called(publicKeys) + if len(ret) == 0 { + panic("no return value specified for CreateBootstrapAccount") + } + var r0 flow.Address var r1 error if rf, ok := ret.Get(0).(func([]flow.AccountPublicKey) (flow.Address, error)); ok { @@ -38,13 +42,12 @@ func (_m *BootstrapAccountCreator) CreateBootstrapAccount(publicKeys []flow.Acco return r0, r1 } -type mockConstructorTestingTNewBootstrapAccountCreator interface { +// NewBootstrapAccountCreator creates a new instance of BootstrapAccountCreator. 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 NewBootstrapAccountCreator(t interface { mock.TestingT Cleanup(func()) -} - -// NewBootstrapAccountCreator creates a new instance of BootstrapAccountCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBootstrapAccountCreator(t mockConstructorTestingTNewBootstrapAccountCreator) *BootstrapAccountCreator { +}) *BootstrapAccountCreator { mock := &BootstrapAccountCreator{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/contract_function_invoker.go b/fvm/environment/mock/contract_function_invoker.go index a01c2ac4f4c..1be63bd7151 100644 --- a/fvm/environment/mock/contract_function_invoker.go +++ b/fvm/environment/mock/contract_function_invoker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,6 +17,10 @@ type ContractFunctionInvoker struct { func (_m *ContractFunctionInvoker) Invoke(spec environment.ContractFunctionSpec, arguments []cadence.Value) (cadence.Value, error) { ret := _m.Called(spec, arguments) + if len(ret) == 0 { + panic("no return value specified for Invoke") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(environment.ContractFunctionSpec, []cadence.Value) (cadence.Value, error)); ok { @@ -39,13 +43,12 @@ func (_m *ContractFunctionInvoker) Invoke(spec environment.ContractFunctionSpec, return r0, r1 } -type mockConstructorTestingTNewContractFunctionInvoker interface { +// NewContractFunctionInvoker creates a new instance of ContractFunctionInvoker. 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 NewContractFunctionInvoker(t interface { mock.TestingT Cleanup(func()) -} - -// NewContractFunctionInvoker creates a new instance of ContractFunctionInvoker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewContractFunctionInvoker(t mockConstructorTestingTNewContractFunctionInvoker) *ContractFunctionInvoker { +}) *ContractFunctionInvoker { mock := &ContractFunctionInvoker{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/contract_updater.go b/fvm/environment/mock/contract_updater.go index fa5fba0bb5c..15c40a8c253 100644 --- a/fvm/environment/mock/contract_updater.go +++ b/fvm/environment/mock/contract_updater.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ContractUpdater struct { func (_m *ContractUpdater) Commit() (environment.ContractUpdates, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 environment.ContractUpdates var r1 error if rf, ok := ret.Get(0).(func() (environment.ContractUpdates, error)); ok { @@ -42,6 +46,10 @@ func (_m *ContractUpdater) Commit() (environment.ContractUpdates, error) { func (_m *ContractUpdater) RemoveAccountContractCode(location common.AddressLocation) error { ret := _m.Called(location) + if len(ret) == 0 { + panic("no return value specified for RemoveAccountContractCode") + } + var r0 error if rf, ok := ret.Get(0).(func(common.AddressLocation) error); ok { r0 = rf(location) @@ -61,6 +69,10 @@ func (_m *ContractUpdater) Reset() { func (_m *ContractUpdater) UpdateAccountContractCode(location common.AddressLocation, code []byte) error { ret := _m.Called(location, code) + if len(ret) == 0 { + panic("no return value specified for UpdateAccountContractCode") + } + var r0 error if rf, ok := ret.Get(0).(func(common.AddressLocation, []byte) error); ok { r0 = rf(location, code) @@ -71,13 +83,12 @@ func (_m *ContractUpdater) UpdateAccountContractCode(location common.AddressLoca return r0 } -type mockConstructorTestingTNewContractUpdater interface { +// NewContractUpdater creates a new instance of ContractUpdater. 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 NewContractUpdater(t interface { mock.TestingT Cleanup(func()) -} - -// NewContractUpdater creates a new instance of ContractUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewContractUpdater(t mockConstructorTestingTNewContractUpdater) *ContractUpdater { +}) *ContractUpdater { mock := &ContractUpdater{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/contract_updater_stubs.go b/fvm/environment/mock/contract_updater_stubs.go index a7edad7ee14..7e34889c10f 100644 --- a/fvm/environment/mock/contract_updater_stubs.go +++ b/fvm/environment/mock/contract_updater_stubs.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type ContractUpdaterStubs struct { func (_m *ContractUpdaterStubs) GetAuthorizedAccounts(path cadence.Path) []flow.Address { ret := _m.Called(path) + if len(ret) == 0 { + panic("no return value specified for GetAuthorizedAccounts") + } + var r0 []flow.Address if rf, ok := ret.Get(0).(func(cadence.Path) []flow.Address); ok { r0 = rf(path) @@ -35,6 +39,10 @@ func (_m *ContractUpdaterStubs) GetAuthorizedAccounts(path cadence.Path) []flow. func (_m *ContractUpdaterStubs) RestrictedDeploymentEnabled() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RestrictedDeploymentEnabled") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -49,6 +57,10 @@ func (_m *ContractUpdaterStubs) RestrictedDeploymentEnabled() bool { func (_m *ContractUpdaterStubs) RestrictedRemovalEnabled() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RestrictedRemovalEnabled") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -59,13 +71,12 @@ func (_m *ContractUpdaterStubs) RestrictedRemovalEnabled() bool { return r0 } -type mockConstructorTestingTNewContractUpdaterStubs interface { +// NewContractUpdaterStubs creates a new instance of ContractUpdaterStubs. 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 NewContractUpdaterStubs(t interface { mock.TestingT Cleanup(func()) -} - -// NewContractUpdaterStubs creates a new instance of ContractUpdaterStubs. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewContractUpdaterStubs(t mockConstructorTestingTNewContractUpdaterStubs) *ContractUpdaterStubs { +}) *ContractUpdaterStubs { mock := &ContractUpdaterStubs{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/crypto_library.go b/fvm/environment/mock/crypto_library.go index 32f794a4800..e408bfa9fdc 100644 --- a/fvm/environment/mock/crypto_library.go +++ b/fvm/environment/mock/crypto_library.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type CryptoLibrary struct { func (_m *CryptoLibrary) BLSAggregatePublicKeys(keys []*stdlib.PublicKey) (*stdlib.PublicKey, error) { ret := _m.Called(keys) + if len(ret) == 0 { + panic("no return value specified for BLSAggregatePublicKeys") + } + var r0 *stdlib.PublicKey var r1 error if rf, ok := ret.Get(0).(func([]*stdlib.PublicKey) (*stdlib.PublicKey, error)); ok { @@ -44,6 +48,10 @@ func (_m *CryptoLibrary) BLSAggregatePublicKeys(keys []*stdlib.PublicKey) (*stdl func (_m *CryptoLibrary) BLSAggregateSignatures(sigs [][]byte) ([]byte, error) { ret := _m.Called(sigs) + if len(ret) == 0 { + panic("no return value specified for BLSAggregateSignatures") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func([][]byte) ([]byte, error)); ok { @@ -70,6 +78,10 @@ func (_m *CryptoLibrary) BLSAggregateSignatures(sigs [][]byte) ([]byte, error) { func (_m *CryptoLibrary) BLSVerifyPOP(pk *stdlib.PublicKey, sig []byte) (bool, error) { ret := _m.Called(pk, sig) + if len(ret) == 0 { + panic("no return value specified for BLSVerifyPOP") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*stdlib.PublicKey, []byte) (bool, error)); ok { @@ -94,6 +106,10 @@ func (_m *CryptoLibrary) BLSVerifyPOP(pk *stdlib.PublicKey, sig []byte) (bool, e func (_m *CryptoLibrary) Hash(data []byte, tag string, hashAlgorithm sema.HashAlgorithm) ([]byte, error) { ret := _m.Called(data, tag, hashAlgorithm) + if len(ret) == 0 { + panic("no return value specified for Hash") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func([]byte, string, sema.HashAlgorithm) ([]byte, error)); ok { @@ -120,6 +136,10 @@ func (_m *CryptoLibrary) Hash(data []byte, tag string, hashAlgorithm sema.HashAl func (_m *CryptoLibrary) ValidatePublicKey(pk *stdlib.PublicKey) error { ret := _m.Called(pk) + if len(ret) == 0 { + panic("no return value specified for ValidatePublicKey") + } + var r0 error if rf, ok := ret.Get(0).(func(*stdlib.PublicKey) error); ok { r0 = rf(pk) @@ -134,6 +154,10 @@ func (_m *CryptoLibrary) ValidatePublicKey(pk *stdlib.PublicKey) error { func (_m *CryptoLibrary) VerifySignature(signature []byte, tag string, signedData []byte, publicKey []byte, signatureAlgorithm sema.SignatureAlgorithm, hashAlgorithm sema.HashAlgorithm) (bool, error) { ret := _m.Called(signature, tag, signedData, publicKey, signatureAlgorithm, hashAlgorithm) + if len(ret) == 0 { + panic("no return value specified for VerifySignature") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func([]byte, string, []byte, []byte, sema.SignatureAlgorithm, sema.HashAlgorithm) (bool, error)); ok { @@ -154,13 +178,12 @@ func (_m *CryptoLibrary) VerifySignature(signature []byte, tag string, signedDat return r0, r1 } -type mockConstructorTestingTNewCryptoLibrary interface { +// NewCryptoLibrary creates a new instance of CryptoLibrary. 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 NewCryptoLibrary(t interface { mock.TestingT Cleanup(func()) -} - -// NewCryptoLibrary creates a new instance of CryptoLibrary. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCryptoLibrary(t mockConstructorTestingTNewCryptoLibrary) *CryptoLibrary { +}) *CryptoLibrary { mock := &CryptoLibrary{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/entropy_provider.go b/fvm/environment/mock/entropy_provider.go index cf3f19fb306..8056d6d03ba 100644 --- a/fvm/environment/mock/entropy_provider.go +++ b/fvm/environment/mock/entropy_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type EntropyProvider struct { func (_m *EntropyProvider) RandomSource() ([]byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RandomSource") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { @@ -35,13 +39,12 @@ func (_m *EntropyProvider) RandomSource() ([]byte, error) { return r0, r1 } -type mockConstructorTestingTNewEntropyProvider interface { +// NewEntropyProvider creates a new instance of EntropyProvider. 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 NewEntropyProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewEntropyProvider creates a new instance of EntropyProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEntropyProvider(t mockConstructorTestingTNewEntropyProvider) *EntropyProvider { +}) *EntropyProvider { mock := &EntropyProvider{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/environment.go b/fvm/environment/mock/environment.go index 07dec698cb1..5f4e3ca81e6 100644 --- a/fvm/environment/mock/environment.go +++ b/fvm/environment/mock/environment.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -48,6 +48,10 @@ type Environment struct { func (_m *Environment) AccountKeysCount(address common.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for AccountKeysCount") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -72,6 +76,10 @@ func (_m *Environment) AccountKeysCount(address common.Address) (uint64, error) func (_m *Environment) AccountsStorageCapacity(addresses []flow.Address, payer flow.Address, maxTxFees uint64) (cadence.Value, error) { ret := _m.Called(addresses, payer, maxTxFees) + if len(ret) == 0 { + panic("no return value specified for AccountsStorageCapacity") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func([]flow.Address, flow.Address, uint64) (cadence.Value, error)); ok { @@ -98,6 +106,10 @@ func (_m *Environment) AccountsStorageCapacity(addresses []flow.Address, payer f func (_m *Environment) AddAccountKey(address common.Address, publicKey *stdlib.PublicKey, hashAlgo sema.HashAlgorithm, weight int) (*stdlib.AccountKey, error) { ret := _m.Called(address, publicKey, hashAlgo, weight) + if len(ret) == 0 { + panic("no return value specified for AddAccountKey") + } + var r0 *stdlib.AccountKey var r1 error if rf, ok := ret.Get(0).(func(common.Address, *stdlib.PublicKey, sema.HashAlgorithm, int) (*stdlib.AccountKey, error)); ok { @@ -124,6 +136,10 @@ func (_m *Environment) AddAccountKey(address common.Address, publicKey *stdlib.P func (_m *Environment) AllocateStorageIndex(owner []byte) (atree.StorageIndex, error) { ret := _m.Called(owner) + if len(ret) == 0 { + panic("no return value specified for AllocateStorageIndex") + } + var r0 atree.StorageIndex var r1 error if rf, ok := ret.Get(0).(func([]byte) (atree.StorageIndex, error)); ok { @@ -150,6 +166,10 @@ func (_m *Environment) AllocateStorageIndex(owner []byte) (atree.StorageIndex, e func (_m *Environment) BLSAggregatePublicKeys(publicKeys []*stdlib.PublicKey) (*stdlib.PublicKey, error) { ret := _m.Called(publicKeys) + if len(ret) == 0 { + panic("no return value specified for BLSAggregatePublicKeys") + } + var r0 *stdlib.PublicKey var r1 error if rf, ok := ret.Get(0).(func([]*stdlib.PublicKey) (*stdlib.PublicKey, error)); ok { @@ -176,6 +196,10 @@ func (_m *Environment) BLSAggregatePublicKeys(publicKeys []*stdlib.PublicKey) (* func (_m *Environment) BLSAggregateSignatures(signatures [][]byte) ([]byte, error) { ret := _m.Called(signatures) + if len(ret) == 0 { + panic("no return value specified for BLSAggregateSignatures") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func([][]byte) ([]byte, error)); ok { @@ -202,6 +226,10 @@ func (_m *Environment) BLSAggregateSignatures(signatures [][]byte) ([]byte, erro func (_m *Environment) BLSVerifyPOP(publicKey *stdlib.PublicKey, signature []byte) (bool, error) { ret := _m.Called(publicKey, signature) + if len(ret) == 0 { + panic("no return value specified for BLSVerifyPOP") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*stdlib.PublicKey, []byte) (bool, error)); ok { @@ -226,6 +254,10 @@ func (_m *Environment) BLSVerifyPOP(publicKey *stdlib.PublicKey, signature []byt func (_m *Environment) BorrowCadenceRuntime() *runtime.ReusableCadenceRuntime { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BorrowCadenceRuntime") + } + var r0 *runtime.ReusableCadenceRuntime if rf, ok := ret.Get(0).(func() *runtime.ReusableCadenceRuntime); ok { r0 = rf() @@ -242,6 +274,10 @@ func (_m *Environment) BorrowCadenceRuntime() *runtime.ReusableCadenceRuntime { func (_m *Environment) CheckPayerBalanceAndGetMaxTxFees(payer flow.Address, inclusionEffort uint64, executionEffort uint64) (cadence.Value, error) { ret := _m.Called(payer, inclusionEffort, executionEffort) + if len(ret) == 0 { + panic("no return value specified for CheckPayerBalanceAndGetMaxTxFees") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(flow.Address, uint64, uint64) (cadence.Value, error)); ok { @@ -268,6 +304,10 @@ func (_m *Environment) CheckPayerBalanceAndGetMaxTxFees(payer flow.Address, incl func (_m *Environment) ComputationAvailable(_a0 common.ComputationKind, _a1 uint) bool { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ComputationAvailable") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.ComputationKind, uint) bool); ok { r0 = rf(_a0, _a1) @@ -282,6 +322,10 @@ func (_m *Environment) ComputationAvailable(_a0 common.ComputationKind, _a1 uint func (_m *Environment) ComputationIntensities() meter.MeteredComputationIntensities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ComputationIntensities") + } + var r0 meter.MeteredComputationIntensities if rf, ok := ret.Get(0).(func() meter.MeteredComputationIntensities); ok { r0 = rf() @@ -298,6 +342,10 @@ func (_m *Environment) ComputationIntensities() meter.MeteredComputationIntensit func (_m *Environment) ComputationUsed() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ComputationUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -322,6 +370,10 @@ func (_m *Environment) ComputationUsed() (uint64, error) { func (_m *Environment) ConvertedServiceEvents() flow.ServiceEventList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ConvertedServiceEvents") + } + var r0 flow.ServiceEventList if rf, ok := ret.Get(0).(func() flow.ServiceEventList); ok { r0 = rf() @@ -338,6 +390,10 @@ func (_m *Environment) ConvertedServiceEvents() flow.ServiceEventList { func (_m *Environment) CreateAccount(payer common.Address) (common.Address, error) { ret := _m.Called(payer) + if len(ret) == 0 { + panic("no return value specified for CreateAccount") + } + var r0 common.Address var r1 error if rf, ok := ret.Get(0).(func(common.Address) (common.Address, error)); ok { @@ -364,6 +420,10 @@ func (_m *Environment) CreateAccount(payer common.Address) (common.Address, erro func (_m *Environment) DecodeArgument(argument []byte, argumentType cadence.Type) (cadence.Value, error) { ret := _m.Called(argument, argumentType) + if len(ret) == 0 { + panic("no return value specified for DecodeArgument") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func([]byte, cadence.Type) (cadence.Value, error)); ok { @@ -390,6 +450,10 @@ func (_m *Environment) DecodeArgument(argument []byte, argumentType cadence.Type func (_m *Environment) DeductTransactionFees(payer flow.Address, inclusionEffort uint64, executionEffort uint64) (cadence.Value, error) { ret := _m.Called(payer, inclusionEffort, executionEffort) + if len(ret) == 0 { + panic("no return value specified for DeductTransactionFees") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(flow.Address, uint64, uint64) (cadence.Value, error)); ok { @@ -416,6 +480,10 @@ func (_m *Environment) DeductTransactionFees(payer flow.Address, inclusionEffort func (_m *Environment) EmitEvent(_a0 cadence.Event) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for EmitEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(cadence.Event) error); ok { r0 = rf(_a0) @@ -430,6 +498,10 @@ func (_m *Environment) EmitEvent(_a0 cadence.Event) error { func (_m *Environment) Events() flow.EventsList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 flow.EventsList if rf, ok := ret.Get(0).(func() flow.EventsList); ok { r0 = rf() @@ -446,6 +518,10 @@ func (_m *Environment) Events() flow.EventsList { func (_m *Environment) FlushPendingUpdates() (environment.ContractUpdates, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FlushPendingUpdates") + } + var r0 environment.ContractUpdates var r1 error if rf, ok := ret.Get(0).(func() (environment.ContractUpdates, error)); ok { @@ -470,6 +546,10 @@ func (_m *Environment) FlushPendingUpdates() (environment.ContractUpdates, error func (_m *Environment) GenerateAccountID(address common.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GenerateAccountID") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -494,6 +574,10 @@ func (_m *Environment) GenerateAccountID(address common.Address) (uint64, error) func (_m *Environment) GenerateUUID() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GenerateUUID") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -518,6 +602,10 @@ func (_m *Environment) GenerateUUID() (uint64, error) { func (_m *Environment) GetAccount(address flow.Address) (*flow.Account, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(flow.Address) (*flow.Account, error)); ok { @@ -544,6 +632,10 @@ func (_m *Environment) GetAccount(address flow.Address) (*flow.Account, error) { func (_m *Environment) GetAccountAvailableBalance(address common.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetAccountAvailableBalance") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -568,6 +660,10 @@ func (_m *Environment) GetAccountAvailableBalance(address common.Address) (uint6 func (_m *Environment) GetAccountBalance(address common.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetAccountBalance") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -592,6 +688,10 @@ func (_m *Environment) GetAccountBalance(address common.Address) (uint64, error) func (_m *Environment) GetAccountContractCode(location common.AddressLocation) ([]byte, error) { ret := _m.Called(location) + if len(ret) == 0 { + panic("no return value specified for GetAccountContractCode") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(common.AddressLocation) ([]byte, error)); ok { @@ -618,6 +718,10 @@ func (_m *Environment) GetAccountContractCode(location common.AddressLocation) ( func (_m *Environment) GetAccountContractNames(address common.Address) ([]string, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetAccountContractNames") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(common.Address) ([]string, error)); ok { @@ -644,6 +748,10 @@ func (_m *Environment) GetAccountContractNames(address common.Address) ([]string func (_m *Environment) GetAccountKey(address common.Address, index int) (*stdlib.AccountKey, error) { ret := _m.Called(address, index) + if len(ret) == 0 { + panic("no return value specified for GetAccountKey") + } + var r0 *stdlib.AccountKey var r1 error if rf, ok := ret.Get(0).(func(common.Address, int) (*stdlib.AccountKey, error)); ok { @@ -670,6 +778,10 @@ func (_m *Environment) GetAccountKey(address common.Address, index int) (*stdlib func (_m *Environment) GetBlockAtHeight(height uint64) (stdlib.Block, bool, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for GetBlockAtHeight") + } + var r0 stdlib.Block var r1 bool var r2 error @@ -701,6 +813,10 @@ func (_m *Environment) GetBlockAtHeight(height uint64) (stdlib.Block, bool, erro func (_m *Environment) GetCode(location common.Location) ([]byte, error) { ret := _m.Called(location) + if len(ret) == 0 { + panic("no return value specified for GetCode") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(common.Location) ([]byte, error)); ok { @@ -727,6 +843,10 @@ func (_m *Environment) GetCode(location common.Location) ([]byte, error) { func (_m *Environment) GetCurrentBlockHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCurrentBlockHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -751,6 +871,10 @@ func (_m *Environment) GetCurrentBlockHeight() (uint64, error) { func (_m *Environment) GetInterpreterSharedState() *interpreter.SharedState { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetInterpreterSharedState") + } + var r0 *interpreter.SharedState if rf, ok := ret.Get(0).(func() *interpreter.SharedState); ok { r0 = rf() @@ -767,6 +891,10 @@ func (_m *Environment) GetInterpreterSharedState() *interpreter.SharedState { func (_m *Environment) GetOrLoadProgram(location common.Location, load func() (*interpreter.Program, error)) (*interpreter.Program, error) { ret := _m.Called(location, load) + if len(ret) == 0 { + panic("no return value specified for GetOrLoadProgram") + } + var r0 *interpreter.Program var r1 error if rf, ok := ret.Get(0).(func(common.Location, func() (*interpreter.Program, error)) (*interpreter.Program, error)); ok { @@ -793,6 +921,10 @@ func (_m *Environment) GetOrLoadProgram(location common.Location, load func() (* func (_m *Environment) GetSigningAccounts() ([]common.Address, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetSigningAccounts") + } + var r0 []common.Address var r1 error if rf, ok := ret.Get(0).(func() ([]common.Address, error)); ok { @@ -819,6 +951,10 @@ func (_m *Environment) GetSigningAccounts() ([]common.Address, error) { func (_m *Environment) GetStorageCapacity(address common.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetStorageCapacity") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -843,6 +979,10 @@ func (_m *Environment) GetStorageCapacity(address common.Address) (uint64, error func (_m *Environment) GetStorageUsed(address common.Address) (uint64, error) { ret := _m.Called(address) + if len(ret) == 0 { + panic("no return value specified for GetStorageUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(common.Address) (uint64, error)); ok { @@ -867,6 +1007,10 @@ func (_m *Environment) GetStorageUsed(address common.Address) (uint64, error) { func (_m *Environment) GetValue(owner []byte, key []byte) ([]byte, error) { ret := _m.Called(owner, key) + if len(ret) == 0 { + panic("no return value specified for GetValue") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func([]byte, []byte) ([]byte, error)); ok { @@ -893,6 +1037,10 @@ func (_m *Environment) GetValue(owner []byte, key []byte) ([]byte, error) { func (_m *Environment) Hash(data []byte, tag string, hashAlgorithm sema.HashAlgorithm) ([]byte, error) { ret := _m.Called(data, tag, hashAlgorithm) + if len(ret) == 0 { + panic("no return value specified for Hash") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func([]byte, string, sema.HashAlgorithm) ([]byte, error)); ok { @@ -919,6 +1067,10 @@ func (_m *Environment) Hash(data []byte, tag string, hashAlgorithm sema.HashAlgo func (_m *Environment) ImplementationDebugLog(message string) error { ret := _m.Called(message) + if len(ret) == 0 { + panic("no return value specified for ImplementationDebugLog") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(message) @@ -933,6 +1085,10 @@ func (_m *Environment) ImplementationDebugLog(message string) error { func (_m *Environment) InteractionUsed() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InteractionUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -957,6 +1113,10 @@ func (_m *Environment) InteractionUsed() (uint64, error) { func (_m *Environment) Invoke(spec environment.ContractFunctionSpec, arguments []cadence.Value) (cadence.Value, error) { ret := _m.Called(spec, arguments) + if len(ret) == 0 { + panic("no return value specified for Invoke") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(environment.ContractFunctionSpec, []cadence.Value) (cadence.Value, error)); ok { @@ -983,6 +1143,10 @@ func (_m *Environment) Invoke(spec environment.ContractFunctionSpec, arguments [ func (_m *Environment) IsServiceAccountAuthorizer() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsServiceAccountAuthorizer") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -997,6 +1161,10 @@ func (_m *Environment) IsServiceAccountAuthorizer() bool { func (_m *Environment) LimitAccountStorage() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LimitAccountStorage") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -1011,6 +1179,10 @@ func (_m *Environment) LimitAccountStorage() bool { func (_m *Environment) Logger() zerolog.Logger { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Logger") + } + var r0 zerolog.Logger if rf, ok := ret.Get(0).(func() zerolog.Logger); ok { r0 = rf() @@ -1025,6 +1197,10 @@ func (_m *Environment) Logger() zerolog.Logger { func (_m *Environment) Logs() []string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Logs") + } + var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() @@ -1041,6 +1217,10 @@ func (_m *Environment) Logs() []string { func (_m *Environment) MemoryUsed() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MemoryUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -1065,6 +1245,10 @@ func (_m *Environment) MemoryUsed() (uint64, error) { func (_m *Environment) MeterComputation(operationType common.ComputationKind, intensity uint) error { ret := _m.Called(operationType, intensity) + if len(ret) == 0 { + panic("no return value specified for MeterComputation") + } + var r0 error if rf, ok := ret.Get(0).(func(common.ComputationKind, uint) error); ok { r0 = rf(operationType, intensity) @@ -1079,6 +1263,10 @@ func (_m *Environment) MeterComputation(operationType common.ComputationKind, in func (_m *Environment) MeterEmittedEvent(byteSize uint64) error { ret := _m.Called(byteSize) + if len(ret) == 0 { + panic("no return value specified for MeterEmittedEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(byteSize) @@ -1093,6 +1281,10 @@ func (_m *Environment) MeterEmittedEvent(byteSize uint64) error { func (_m *Environment) MeterMemory(usage common.MemoryUsage) error { ret := _m.Called(usage) + if len(ret) == 0 { + panic("no return value specified for MeterMemory") + } + var r0 error if rf, ok := ret.Get(0).(func(common.MemoryUsage) error); ok { r0 = rf(usage) @@ -1107,6 +1299,10 @@ func (_m *Environment) MeterMemory(usage common.MemoryUsage) error { func (_m *Environment) ProgramLog(_a0 string) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ProgramLog") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(_a0) @@ -1121,6 +1317,10 @@ func (_m *Environment) ProgramLog(_a0 string) error { func (_m *Environment) RandomSourceHistory() ([]byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RandomSourceHistory") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { @@ -1147,6 +1347,10 @@ func (_m *Environment) RandomSourceHistory() ([]byte, error) { func (_m *Environment) ReadRandom(_a0 []byte) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ReadRandom") + } + var r0 error if rf, ok := ret.Get(0).(func([]byte) error); ok { r0 = rf(_a0) @@ -1166,6 +1370,10 @@ func (_m *Environment) RecordTrace(operation string, location common.Location, d func (_m *Environment) RemoveAccountContractCode(location common.AddressLocation) error { ret := _m.Called(location) + if len(ret) == 0 { + panic("no return value specified for RemoveAccountContractCode") + } + var r0 error if rf, ok := ret.Get(0).(func(common.AddressLocation) error); ok { r0 = rf(location) @@ -1185,6 +1393,10 @@ func (_m *Environment) Reset() { func (_m *Environment) ResolveLocation(identifiers []ast.Identifier, location common.Location) ([]sema.ResolvedLocation, error) { ret := _m.Called(identifiers, location) + if len(ret) == 0 { + panic("no return value specified for ResolveLocation") + } + var r0 []sema.ResolvedLocation var r1 error if rf, ok := ret.Get(0).(func([]ast.Identifier, common.Location) ([]sema.ResolvedLocation, error)); ok { @@ -1221,6 +1433,10 @@ func (_m *Environment) ReturnCadenceRuntime(_a0 *runtime.ReusableCadenceRuntime) func (_m *Environment) RevokeAccountKey(address common.Address, index int) (*stdlib.AccountKey, error) { ret := _m.Called(address, index) + if len(ret) == 0 { + panic("no return value specified for RevokeAccountKey") + } + var r0 *stdlib.AccountKey var r1 error if rf, ok := ret.Get(0).(func(common.Address, int) (*stdlib.AccountKey, error)); ok { @@ -1247,6 +1463,10 @@ func (_m *Environment) RevokeAccountKey(address common.Address, index int) (*std func (_m *Environment) ServiceEvents() flow.EventsList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ServiceEvents") + } + var r0 flow.EventsList if rf, ok := ret.Get(0).(func() flow.EventsList); ok { r0 = rf() @@ -1268,6 +1488,10 @@ func (_m *Environment) SetInterpreterSharedState(state *interpreter.SharedState) func (_m *Environment) SetValue(owner []byte, key []byte, value []byte) error { ret := _m.Called(owner, key, value) + if len(ret) == 0 { + panic("no return value specified for SetValue") + } + var r0 error if rf, ok := ret.Get(0).(func([]byte, []byte, []byte) error); ok { r0 = rf(owner, key, value) @@ -1289,6 +1513,10 @@ func (_m *Environment) StartChildSpan(name trace.SpanName, options ...oteltrace. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartChildSpan") + } + var r0 tracing.TracerSpan if rf, ok := ret.Get(0).(func(trace.SpanName, ...oteltrace.SpanStartOption) tracing.TracerSpan); ok { r0 = rf(name, options...) @@ -1303,6 +1531,10 @@ func (_m *Environment) StartChildSpan(name trace.SpanName, options ...oteltrace. func (_m *Environment) TotalEmittedEventBytes() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TotalEmittedEventBytes") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -1317,6 +1549,10 @@ func (_m *Environment) TotalEmittedEventBytes() uint64 { func (_m *Environment) TransactionFeesEnabled() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TransactionFeesEnabled") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -1331,6 +1567,10 @@ func (_m *Environment) TransactionFeesEnabled() bool { func (_m *Environment) TxID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -1347,6 +1587,10 @@ func (_m *Environment) TxID() flow.Identifier { func (_m *Environment) TxIndex() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxIndex") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -1361,6 +1605,10 @@ func (_m *Environment) TxIndex() uint32 { func (_m *Environment) UpdateAccountContractCode(location common.AddressLocation, code []byte) error { ret := _m.Called(location, code) + if len(ret) == 0 { + panic("no return value specified for UpdateAccountContractCode") + } + var r0 error if rf, ok := ret.Get(0).(func(common.AddressLocation, []byte) error); ok { r0 = rf(location, code) @@ -1375,6 +1623,10 @@ func (_m *Environment) UpdateAccountContractCode(location common.AddressLocation func (_m *Environment) ValidatePublicKey(key *stdlib.PublicKey) error { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for ValidatePublicKey") + } + var r0 error if rf, ok := ret.Get(0).(func(*stdlib.PublicKey) error); ok { r0 = rf(key) @@ -1389,6 +1641,10 @@ func (_m *Environment) ValidatePublicKey(key *stdlib.PublicKey) error { func (_m *Environment) ValueExists(owner []byte, key []byte) (bool, error) { ret := _m.Called(owner, key) + if len(ret) == 0 { + panic("no return value specified for ValueExists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func([]byte, []byte) (bool, error)); ok { @@ -1413,6 +1669,10 @@ func (_m *Environment) ValueExists(owner []byte, key []byte) (bool, error) { func (_m *Environment) VerifySignature(signature []byte, tag string, signedData []byte, publicKey []byte, signatureAlgorithm sema.SignatureAlgorithm, hashAlgorithm sema.HashAlgorithm) (bool, error) { ret := _m.Called(signature, tag, signedData, publicKey, signatureAlgorithm, hashAlgorithm) + if len(ret) == 0 { + panic("no return value specified for VerifySignature") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func([]byte, string, []byte, []byte, sema.SignatureAlgorithm, sema.HashAlgorithm) (bool, error)); ok { @@ -1433,13 +1693,12 @@ func (_m *Environment) VerifySignature(signature []byte, tag string, signedData return r0, r1 } -type mockConstructorTestingTNewEnvironment interface { +// NewEnvironment creates a new instance of Environment. 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 NewEnvironment(t interface { mock.TestingT Cleanup(func()) -} - -// NewEnvironment creates a new instance of Environment. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEnvironment(t mockConstructorTestingTNewEnvironment) *Environment { +}) *Environment { mock := &Environment{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/event_emitter.go b/fvm/environment/mock/event_emitter.go index 5ff23d14d71..184aeb6fcd1 100644 --- a/fvm/environment/mock/event_emitter.go +++ b/fvm/environment/mock/event_emitter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type EventEmitter struct { func (_m *EventEmitter) ConvertedServiceEvents() flow.ServiceEventList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ConvertedServiceEvents") + } + var r0 flow.ServiceEventList if rf, ok := ret.Get(0).(func() flow.ServiceEventList); ok { r0 = rf() @@ -35,6 +39,10 @@ func (_m *EventEmitter) ConvertedServiceEvents() flow.ServiceEventList { func (_m *EventEmitter) EmitEvent(event cadence.Event) error { ret := _m.Called(event) + if len(ret) == 0 { + panic("no return value specified for EmitEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(cadence.Event) error); ok { r0 = rf(event) @@ -49,6 +57,10 @@ func (_m *EventEmitter) EmitEvent(event cadence.Event) error { func (_m *EventEmitter) Events() flow.EventsList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 flow.EventsList if rf, ok := ret.Get(0).(func() flow.EventsList); ok { r0 = rf() @@ -70,6 +82,10 @@ func (_m *EventEmitter) Reset() { func (_m *EventEmitter) ServiceEvents() flow.EventsList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ServiceEvents") + } + var r0 flow.EventsList if rf, ok := ret.Get(0).(func() flow.EventsList); ok { r0 = rf() @@ -82,13 +98,12 @@ func (_m *EventEmitter) ServiceEvents() flow.EventsList { return r0 } -type mockConstructorTestingTNewEventEmitter interface { +// NewEventEmitter creates a new instance of EventEmitter. 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 NewEventEmitter(t interface { mock.TestingT Cleanup(func()) -} - -// NewEventEmitter creates a new instance of EventEmitter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEventEmitter(t mockConstructorTestingTNewEventEmitter) *EventEmitter { +}) *EventEmitter { mock := &EventEmitter{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/event_encoder.go b/fvm/environment/mock/event_encoder.go index a57384f1662..46cc2ca4a0f 100644 --- a/fvm/environment/mock/event_encoder.go +++ b/fvm/environment/mock/event_encoder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,6 +17,10 @@ type EventEncoder struct { func (_m *EventEncoder) Encode(event cadence.Event) ([]byte, error) { ret := _m.Called(event) + if len(ret) == 0 { + panic("no return value specified for Encode") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(cadence.Event) ([]byte, error)); ok { @@ -39,13 +43,12 @@ func (_m *EventEncoder) Encode(event cadence.Event) ([]byte, error) { return r0, r1 } -type mockConstructorTestingTNewEventEncoder interface { +// NewEventEncoder creates a new instance of EventEncoder. 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 NewEventEncoder(t interface { mock.TestingT Cleanup(func()) -} - -// NewEventEncoder creates a new instance of EventEncoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEventEncoder(t mockConstructorTestingTNewEventEncoder) *EventEncoder { +}) *EventEncoder { mock := &EventEncoder{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/meter.go b/fvm/environment/mock/meter.go index d8b2cdd7f99..a156b02f0ef 100644 --- a/fvm/environment/mock/meter.go +++ b/fvm/environment/mock/meter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type Meter struct { func (_m *Meter) ComputationAvailable(_a0 common.ComputationKind, _a1 uint) bool { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ComputationAvailable") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.ComputationKind, uint) bool); ok { r0 = rf(_a0, _a1) @@ -33,6 +37,10 @@ func (_m *Meter) ComputationAvailable(_a0 common.ComputationKind, _a1 uint) bool func (_m *Meter) ComputationIntensities() meter.MeteredComputationIntensities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ComputationIntensities") + } + var r0 meter.MeteredComputationIntensities if rf, ok := ret.Get(0).(func() meter.MeteredComputationIntensities); ok { r0 = rf() @@ -49,6 +57,10 @@ func (_m *Meter) ComputationIntensities() meter.MeteredComputationIntensities { func (_m *Meter) ComputationUsed() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ComputationUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -73,6 +85,10 @@ func (_m *Meter) ComputationUsed() (uint64, error) { func (_m *Meter) InteractionUsed() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InteractionUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -97,6 +113,10 @@ func (_m *Meter) InteractionUsed() (uint64, error) { func (_m *Meter) MemoryUsed() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MemoryUsed") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -121,6 +141,10 @@ func (_m *Meter) MemoryUsed() (uint64, error) { func (_m *Meter) MeterComputation(_a0 common.ComputationKind, _a1 uint) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for MeterComputation") + } + var r0 error if rf, ok := ret.Get(0).(func(common.ComputationKind, uint) error); ok { r0 = rf(_a0, _a1) @@ -135,6 +159,10 @@ func (_m *Meter) MeterComputation(_a0 common.ComputationKind, _a1 uint) error { func (_m *Meter) MeterEmittedEvent(byteSize uint64) error { ret := _m.Called(byteSize) + if len(ret) == 0 { + panic("no return value specified for MeterEmittedEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(byteSize) @@ -149,6 +177,10 @@ func (_m *Meter) MeterEmittedEvent(byteSize uint64) error { func (_m *Meter) MeterMemory(usage common.MemoryUsage) error { ret := _m.Called(usage) + if len(ret) == 0 { + panic("no return value specified for MeterMemory") + } + var r0 error if rf, ok := ret.Get(0).(func(common.MemoryUsage) error); ok { r0 = rf(usage) @@ -163,6 +195,10 @@ func (_m *Meter) MeterMemory(usage common.MemoryUsage) error { func (_m *Meter) TotalEmittedEventBytes() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TotalEmittedEventBytes") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -173,13 +209,12 @@ func (_m *Meter) TotalEmittedEventBytes() uint64 { return r0 } -type mockConstructorTestingTNewMeter interface { +// NewMeter creates a new instance of Meter. 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 NewMeter(t interface { mock.TestingT Cleanup(func()) -} - -// NewMeter creates a new instance of Meter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMeter(t mockConstructorTestingTNewMeter) *Meter { +}) *Meter { mock := &Meter{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/metrics_reporter.go b/fvm/environment/mock/metrics_reporter.go index 10369a3f4c5..dbc2b014974 100644 --- a/fvm/environment/mock/metrics_reporter.go +++ b/fvm/environment/mock/metrics_reporter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -43,13 +43,12 @@ func (_m *MetricsReporter) RuntimeTransactionProgramsCacheMiss() { _m.Called() } -type mockConstructorTestingTNewMetricsReporter interface { +// NewMetricsReporter creates a new instance of MetricsReporter. 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 NewMetricsReporter(t interface { mock.TestingT Cleanup(func()) -} - -// NewMetricsReporter creates a new instance of MetricsReporter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMetricsReporter(t mockConstructorTestingTNewMetricsReporter) *MetricsReporter { +}) *MetricsReporter { mock := &MetricsReporter{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/random_generator.go b/fvm/environment/mock/random_generator.go index cd47b1d747b..b2ffcb09c29 100644 --- a/fvm/environment/mock/random_generator.go +++ b/fvm/environment/mock/random_generator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type RandomGenerator struct { func (_m *RandomGenerator) ReadRandom(_a0 []byte) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ReadRandom") + } + var r0 error if rf, ok := ret.Get(0).(func([]byte) error); ok { r0 = rf(_a0) @@ -23,13 +27,12 @@ func (_m *RandomGenerator) ReadRandom(_a0 []byte) error { return r0 } -type mockConstructorTestingTNewRandomGenerator interface { +// NewRandomGenerator creates a new instance of RandomGenerator. 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 NewRandomGenerator(t interface { mock.TestingT Cleanup(func()) -} - -// NewRandomGenerator creates a new instance of RandomGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRandomGenerator(t mockConstructorTestingTNewRandomGenerator) *RandomGenerator { +}) *RandomGenerator { mock := &RandomGenerator{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/random_source_history_provider.go b/fvm/environment/mock/random_source_history_provider.go index f09b83750be..a990c525b14 100644 --- a/fvm/environment/mock/random_source_history_provider.go +++ b/fvm/environment/mock/random_source_history_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type RandomSourceHistoryProvider struct { func (_m *RandomSourceHistoryProvider) RandomSourceHistory() ([]byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RandomSourceHistory") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { @@ -35,13 +39,12 @@ func (_m *RandomSourceHistoryProvider) RandomSourceHistory() ([]byte, error) { return r0, r1 } -type mockConstructorTestingTNewRandomSourceHistoryProvider interface { +// NewRandomSourceHistoryProvider creates a new instance of RandomSourceHistoryProvider. 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 NewRandomSourceHistoryProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewRandomSourceHistoryProvider creates a new instance of RandomSourceHistoryProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRandomSourceHistoryProvider(t mockConstructorTestingTNewRandomSourceHistoryProvider) *RandomSourceHistoryProvider { +}) *RandomSourceHistoryProvider { mock := &RandomSourceHistoryProvider{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/transaction_info.go b/fvm/environment/mock/transaction_info.go index 4b838b5f513..30a913dd35b 100644 --- a/fvm/environment/mock/transaction_info.go +++ b/fvm/environment/mock/transaction_info.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type TransactionInfo struct { func (_m *TransactionInfo) GetSigningAccounts() ([]common.Address, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetSigningAccounts") + } + var r0 []common.Address var r1 error if rf, ok := ret.Get(0).(func() ([]common.Address, error)); ok { @@ -45,6 +49,10 @@ func (_m *TransactionInfo) GetSigningAccounts() ([]common.Address, error) { func (_m *TransactionInfo) IsServiceAccountAuthorizer() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsServiceAccountAuthorizer") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -59,6 +67,10 @@ func (_m *TransactionInfo) IsServiceAccountAuthorizer() bool { func (_m *TransactionInfo) LimitAccountStorage() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LimitAccountStorage") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -73,6 +85,10 @@ func (_m *TransactionInfo) LimitAccountStorage() bool { func (_m *TransactionInfo) TransactionFeesEnabled() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TransactionFeesEnabled") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -87,6 +103,10 @@ func (_m *TransactionInfo) TransactionFeesEnabled() bool { func (_m *TransactionInfo) TxID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -103,6 +123,10 @@ func (_m *TransactionInfo) TxID() flow.Identifier { func (_m *TransactionInfo) TxIndex() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxIndex") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -113,13 +137,12 @@ func (_m *TransactionInfo) TxIndex() uint32 { return r0 } -type mockConstructorTestingTNewTransactionInfo interface { +// NewTransactionInfo creates a new instance of TransactionInfo. 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 NewTransactionInfo(t interface { mock.TestingT Cleanup(func()) -} - -// NewTransactionInfo creates a new instance of TransactionInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransactionInfo(t mockConstructorTestingTNewTransactionInfo) *TransactionInfo { +}) *TransactionInfo { mock := &TransactionInfo{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/uuid_generator.go b/fvm/environment/mock/uuid_generator.go index 914f56808f9..8f3f27e4e43 100644 --- a/fvm/environment/mock/uuid_generator.go +++ b/fvm/environment/mock/uuid_generator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type UUIDGenerator struct { func (_m *UUIDGenerator) GenerateUUID() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GenerateUUID") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -33,13 +37,12 @@ func (_m *UUIDGenerator) GenerateUUID() (uint64, error) { return r0, r1 } -type mockConstructorTestingTNewUUIDGenerator interface { +// NewUUIDGenerator creates a new instance of UUIDGenerator. 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 NewUUIDGenerator(t interface { mock.TestingT Cleanup(func()) -} - -// NewUUIDGenerator creates a new instance of UUIDGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUUIDGenerator(t mockConstructorTestingTNewUUIDGenerator) *UUIDGenerator { +}) *UUIDGenerator { mock := &UUIDGenerator{} mock.Mock.Test(t) diff --git a/fvm/environment/mock/value_store.go b/fvm/environment/mock/value_store.go index acfc3918545..1473ef43f8e 100644 --- a/fvm/environment/mock/value_store.go +++ b/fvm/environment/mock/value_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,6 +17,10 @@ type ValueStore struct { func (_m *ValueStore) AllocateStorageIndex(owner []byte) (atree.StorageIndex, error) { ret := _m.Called(owner) + if len(ret) == 0 { + panic("no return value specified for AllocateStorageIndex") + } + var r0 atree.StorageIndex var r1 error if rf, ok := ret.Get(0).(func([]byte) (atree.StorageIndex, error)); ok { @@ -43,6 +47,10 @@ func (_m *ValueStore) AllocateStorageIndex(owner []byte) (atree.StorageIndex, er func (_m *ValueStore) GetValue(owner []byte, key []byte) ([]byte, error) { ret := _m.Called(owner, key) + if len(ret) == 0 { + panic("no return value specified for GetValue") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func([]byte, []byte) ([]byte, error)); ok { @@ -69,6 +77,10 @@ func (_m *ValueStore) GetValue(owner []byte, key []byte) ([]byte, error) { func (_m *ValueStore) SetValue(owner []byte, key []byte, value []byte) error { ret := _m.Called(owner, key, value) + if len(ret) == 0 { + panic("no return value specified for SetValue") + } + var r0 error if rf, ok := ret.Get(0).(func([]byte, []byte, []byte) error); ok { r0 = rf(owner, key, value) @@ -83,6 +95,10 @@ func (_m *ValueStore) SetValue(owner []byte, key []byte, value []byte) error { func (_m *ValueStore) ValueExists(owner []byte, key []byte) (bool, error) { ret := _m.Called(owner, key) + if len(ret) == 0 { + panic("no return value specified for ValueExists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func([]byte, []byte) (bool, error)); ok { @@ -103,13 +119,12 @@ func (_m *ValueStore) ValueExists(owner []byte, key []byte) (bool, error) { return r0, r1 } -type mockConstructorTestingTNewValueStore interface { +// NewValueStore creates a new instance of ValueStore. 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 NewValueStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewValueStore creates a new instance of ValueStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewValueStore(t mockConstructorTestingTNewValueStore) *ValueStore { +}) *ValueStore { mock := &ValueStore{} mock.Mock.Test(t) diff --git a/fvm/mock/bootstrap_procedure_option.go b/fvm/mock/bootstrap_procedure_option.go index ea5010b451e..dac8052e1cd 100644 --- a/fvm/mock/bootstrap_procedure_option.go +++ b/fvm/mock/bootstrap_procedure_option.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type BootstrapProcedureOption struct { func (_m *BootstrapProcedureOption) Execute(_a0 *fvm.BootstrapProcedure) *fvm.BootstrapProcedure { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 *fvm.BootstrapProcedure if rf, ok := ret.Get(0).(func(*fvm.BootstrapProcedure) *fvm.BootstrapProcedure); ok { r0 = rf(_a0) @@ -28,13 +32,12 @@ func (_m *BootstrapProcedureOption) Execute(_a0 *fvm.BootstrapProcedure) *fvm.Bo return r0 } -type mockConstructorTestingTNewBootstrapProcedureOption interface { +// NewBootstrapProcedureOption creates a new instance of BootstrapProcedureOption. 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 NewBootstrapProcedureOption(t interface { mock.TestingT Cleanup(func()) -} - -// NewBootstrapProcedureOption creates a new instance of BootstrapProcedureOption. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBootstrapProcedureOption(t mockConstructorTestingTNewBootstrapProcedureOption) *BootstrapProcedureOption { +}) *BootstrapProcedureOption { mock := &BootstrapProcedureOption{} mock.Mock.Test(t) diff --git a/fvm/mock/option.go b/fvm/mock/option.go index 3e306aae44b..4d4f5252067 100644 --- a/fvm/mock/option.go +++ b/fvm/mock/option.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Option struct { func (_m *Option) Execute(ctx fvm.Context) fvm.Context { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 fvm.Context if rf, ok := ret.Get(0).(func(fvm.Context) fvm.Context); ok { r0 = rf(ctx) @@ -26,13 +30,12 @@ func (_m *Option) Execute(ctx fvm.Context) fvm.Context { return r0 } -type mockConstructorTestingTNewOption interface { +// NewOption creates a new instance of Option. 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 NewOption(t interface { mock.TestingT Cleanup(func()) -} - -// NewOption creates a new instance of Option. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOption(t mockConstructorTestingTNewOption) *Option { +}) *Option { mock := &Option{} mock.Mock.Test(t) diff --git a/fvm/mock/procedure.go b/fvm/mock/procedure.go index f4c2929490f..cd46a0105d1 100644 --- a/fvm/mock/procedure.go +++ b/fvm/mock/procedure.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type Procedure struct { func (_m *Procedure) ComputationLimit(ctx fvm.Context) uint64 { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for ComputationLimit") + } + var r0 uint64 if rf, ok := ret.Get(0).(func(fvm.Context) uint64); ok { r0 = rf(ctx) @@ -33,6 +37,10 @@ func (_m *Procedure) ComputationLimit(ctx fvm.Context) uint64 { func (_m *Procedure) ExecutionTime() logical.Time { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ExecutionTime") + } + var r0 logical.Time if rf, ok := ret.Get(0).(func() logical.Time); ok { r0 = rf() @@ -47,6 +55,10 @@ func (_m *Procedure) ExecutionTime() logical.Time { func (_m *Procedure) MemoryLimit(ctx fvm.Context) uint64 { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for MemoryLimit") + } + var r0 uint64 if rf, ok := ret.Get(0).(func(fvm.Context) uint64); ok { r0 = rf(ctx) @@ -61,6 +73,10 @@ func (_m *Procedure) MemoryLimit(ctx fvm.Context) uint64 { func (_m *Procedure) NewExecutor(ctx fvm.Context, txnState storage.TransactionPreparer) fvm.ProcedureExecutor { ret := _m.Called(ctx, txnState) + if len(ret) == 0 { + panic("no return value specified for NewExecutor") + } + var r0 fvm.ProcedureExecutor if rf, ok := ret.Get(0).(func(fvm.Context, storage.TransactionPreparer) fvm.ProcedureExecutor); ok { r0 = rf(ctx, txnState) @@ -77,6 +93,10 @@ func (_m *Procedure) NewExecutor(ctx fvm.Context, txnState storage.TransactionPr func (_m *Procedure) ShouldDisableMemoryAndInteractionLimits(ctx fvm.Context) bool { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for ShouldDisableMemoryAndInteractionLimits") + } + var r0 bool if rf, ok := ret.Get(0).(func(fvm.Context) bool); ok { r0 = rf(ctx) @@ -91,6 +111,10 @@ func (_m *Procedure) ShouldDisableMemoryAndInteractionLimits(ctx fvm.Context) bo func (_m *Procedure) Type() fvm.ProcedureType { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Type") + } + var r0 fvm.ProcedureType if rf, ok := ret.Get(0).(func() fvm.ProcedureType); ok { r0 = rf() @@ -101,13 +125,12 @@ func (_m *Procedure) Type() fvm.ProcedureType { return r0 } -type mockConstructorTestingTNewProcedure interface { +// NewProcedure creates a new instance of Procedure. 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 NewProcedure(t interface { mock.TestingT Cleanup(func()) -} - -// NewProcedure creates a new instance of Procedure. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProcedure(t mockConstructorTestingTNewProcedure) *Procedure { +}) *Procedure { mock := &Procedure{} mock.Mock.Test(t) diff --git a/fvm/mock/procedure_executor.go b/fvm/mock/procedure_executor.go index f649e1816ef..9ae1608fcf6 100644 --- a/fvm/mock/procedure_executor.go +++ b/fvm/mock/procedure_executor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -21,6 +21,10 @@ func (_m *ProcedureExecutor) Cleanup() { func (_m *ProcedureExecutor) Execute() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -35,6 +39,10 @@ func (_m *ProcedureExecutor) Execute() error { func (_m *ProcedureExecutor) Output() fvm.ProcedureOutput { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Output") + } + var r0 fvm.ProcedureOutput if rf, ok := ret.Get(0).(func() fvm.ProcedureOutput); ok { r0 = rf() @@ -49,6 +57,10 @@ func (_m *ProcedureExecutor) Output() fvm.ProcedureOutput { func (_m *ProcedureExecutor) Preprocess() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Preprocess") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -59,13 +71,12 @@ func (_m *ProcedureExecutor) Preprocess() error { return r0 } -type mockConstructorTestingTNewProcedureExecutor interface { +// NewProcedureExecutor creates a new instance of ProcedureExecutor. 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 NewProcedureExecutor(t interface { mock.TestingT Cleanup(func()) -} - -// NewProcedureExecutor creates a new instance of ProcedureExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProcedureExecutor(t mockConstructorTestingTNewProcedureExecutor) *ProcedureExecutor { +}) *ProcedureExecutor { mock := &ProcedureExecutor{} mock.Mock.Test(t) diff --git a/fvm/mock/vm.go b/fvm/mock/vm.go index 1f836fd9836..e5910146855 100644 --- a/fvm/mock/vm.go +++ b/fvm/mock/vm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -22,6 +22,10 @@ type VM struct { func (_m *VM) GetAccount(_a0 fvm.Context, _a1 flow.Address, _a2 snapshot.StorageSnapshot) (*flow.Account, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(fvm.Context, flow.Address, snapshot.StorageSnapshot) (*flow.Account, error)); ok { @@ -48,6 +52,10 @@ func (_m *VM) GetAccount(_a0 fvm.Context, _a1 flow.Address, _a2 snapshot.Storage func (_m *VM) NewExecutor(_a0 fvm.Context, _a1 fvm.Procedure, _a2 storage.TransactionPreparer) fvm.ProcedureExecutor { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for NewExecutor") + } + var r0 fvm.ProcedureExecutor if rf, ok := ret.Get(0).(func(fvm.Context, fvm.Procedure, storage.TransactionPreparer) fvm.ProcedureExecutor); ok { r0 = rf(_a0, _a1, _a2) @@ -64,6 +72,10 @@ func (_m *VM) NewExecutor(_a0 fvm.Context, _a1 fvm.Procedure, _a2 storage.Transa func (_m *VM) Run(_a0 fvm.Context, _a1 fvm.Procedure, _a2 snapshot.StorageSnapshot) (*snapshot.ExecutionSnapshot, fvm.ProcedureOutput, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for Run") + } + var r0 *snapshot.ExecutionSnapshot var r1 fvm.ProcedureOutput var r2 error @@ -93,13 +105,12 @@ func (_m *VM) Run(_a0 fvm.Context, _a1 fvm.Procedure, _a2 snapshot.StorageSnapsh return r0, r1, r2 } -type mockConstructorTestingTNewVM interface { +// NewVM creates a new instance of VM. 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 NewVM(t interface { mock.TestingT Cleanup(func()) -} - -// NewVM creates a new instance of VM. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVM(t mockConstructorTestingTNewVM) *VM { +}) *VM { mock := &VM{} mock.Mock.Test(t) diff --git a/fvm/storage/snapshot/mock/storage_snapshot.go b/fvm/storage/snapshot/mock/storage_snapshot.go index 4b9e5c33f26..2ee1f882d51 100644 --- a/fvm/storage/snapshot/mock/storage_snapshot.go +++ b/fvm/storage/snapshot/mock/storage_snapshot.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type StorageSnapshot struct { func (_m *StorageSnapshot) Get(id flow.RegisterID) ([]byte, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(flow.RegisterID) ([]byte, error)); ok { @@ -38,13 +42,12 @@ func (_m *StorageSnapshot) Get(id flow.RegisterID) ([]byte, error) { return r0, r1 } -type mockConstructorTestingTNewStorageSnapshot interface { +// NewStorageSnapshot creates a new instance of StorageSnapshot. 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 NewStorageSnapshot(t interface { mock.TestingT Cleanup(func()) -} - -// NewStorageSnapshot creates a new instance of StorageSnapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStorageSnapshot(t mockConstructorTestingTNewStorageSnapshot) *StorageSnapshot { +}) *StorageSnapshot { mock := &StorageSnapshot{} mock.Mock.Test(t) diff --git a/insecure/mock/attack_orchestrator.go b/insecure/mock/attack_orchestrator.go index 8e89b466e39..6adcb134e31 100644 --- a/insecure/mock/attack_orchestrator.go +++ b/insecure/mock/attack_orchestrator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -16,6 +16,10 @@ type AttackOrchestrator struct { func (_m *AttackOrchestrator) HandleEgressEvent(_a0 *insecure.EgressEvent) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for HandleEgressEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(*insecure.EgressEvent) error); ok { r0 = rf(_a0) @@ -30,6 +34,10 @@ func (_m *AttackOrchestrator) HandleEgressEvent(_a0 *insecure.EgressEvent) error func (_m *AttackOrchestrator) HandleIngressEvent(_a0 *insecure.IngressEvent) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for HandleIngressEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(*insecure.IngressEvent) error); ok { r0 = rf(_a0) @@ -45,13 +53,12 @@ func (_m *AttackOrchestrator) Register(_a0 insecure.OrchestratorNetwork) { _m.Called(_a0) } -type mockConstructorTestingTNewAttackOrchestrator interface { +// NewAttackOrchestrator creates a new instance of AttackOrchestrator. 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 NewAttackOrchestrator(t interface { mock.TestingT Cleanup(func()) -} - -// NewAttackOrchestrator creates a new instance of AttackOrchestrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAttackOrchestrator(t mockConstructorTestingTNewAttackOrchestrator) *AttackOrchestrator { +}) *AttackOrchestrator { mock := &AttackOrchestrator{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupt_conduit_factory.go b/insecure/mock/corrupt_conduit_factory.go index 4c7659385ad..7b793ac142b 100644 --- a/insecure/mock/corrupt_conduit_factory.go +++ b/insecure/mock/corrupt_conduit_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -25,6 +25,10 @@ type CorruptConduitFactory struct { func (_m *CorruptConduitFactory) NewConduit(_a0 context.Context, _a1 channels.Channel) (network.Conduit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for NewConduit") + } + var r0 network.Conduit var r1 error if rf, ok := ret.Get(0).(func(context.Context, channels.Channel) (network.Conduit, error)); ok { @@ -51,6 +55,10 @@ func (_m *CorruptConduitFactory) NewConduit(_a0 context.Context, _a1 channels.Ch func (_m *CorruptConduitFactory) RegisterAdapter(_a0 network.ConduitAdapter) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for RegisterAdapter") + } + var r0 error if rf, ok := ret.Get(0).(func(network.ConduitAdapter) error); ok { r0 = rf(_a0) @@ -65,6 +73,10 @@ func (_m *CorruptConduitFactory) RegisterAdapter(_a0 network.ConduitAdapter) err func (_m *CorruptConduitFactory) RegisterEgressController(_a0 insecure.EgressController) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for RegisterEgressController") + } + var r0 error if rf, ok := ret.Get(0).(func(insecure.EgressController) error); ok { r0 = rf(_a0) @@ -86,6 +98,10 @@ func (_m *CorruptConduitFactory) SendOnFlowNetwork(_a0 interface{}, _a1 channels _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SendOnFlowNetwork") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}, channels.Channel, insecure.Protocol, uint, ...flow.Identifier) error); ok { r0 = rf(_a0, _a1, _a2, _a3, _a4...) @@ -100,6 +116,10 @@ func (_m *CorruptConduitFactory) SendOnFlowNetwork(_a0 interface{}, _a1 channels func (_m *CorruptConduitFactory) UnregisterChannel(_a0 channels.Channel) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for UnregisterChannel") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel) error); ok { r0 = rf(_a0) @@ -110,13 +130,12 @@ func (_m *CorruptConduitFactory) UnregisterChannel(_a0 channels.Channel) error { return r0 } -type mockConstructorTestingTNewCorruptConduitFactory interface { +// NewCorruptConduitFactory creates a new instance of CorruptConduitFactory. 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 NewCorruptConduitFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptConduitFactory creates a new instance of CorruptConduitFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptConduitFactory(t mockConstructorTestingTNewCorruptConduitFactory) *CorruptConduitFactory { +}) *CorruptConduitFactory { mock := &CorruptConduitFactory{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupt_network__connect_attacker_client.go b/insecure/mock/corrupt_network__connect_attacker_client.go index 05dd0eca7ce..df06f8a5b62 100644 --- a/insecure/mock/corrupt_network__connect_attacker_client.go +++ b/insecure/mock/corrupt_network__connect_attacker_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -20,6 +20,10 @@ type CorruptNetwork_ConnectAttackerClient struct { func (_m *CorruptNetwork_ConnectAttackerClient) CloseSend() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CloseSend") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *CorruptNetwork_ConnectAttackerClient) CloseSend() error { func (_m *CorruptNetwork_ConnectAttackerClient) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -50,6 +58,10 @@ func (_m *CorruptNetwork_ConnectAttackerClient) Context() context.Context { func (_m *CorruptNetwork_ConnectAttackerClient) Header() (metadata.MD, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 metadata.MD var r1 error if rf, ok := ret.Get(0).(func() (metadata.MD, error)); ok { @@ -76,6 +88,10 @@ func (_m *CorruptNetwork_ConnectAttackerClient) Header() (metadata.MD, error) { func (_m *CorruptNetwork_ConnectAttackerClient) Recv() (*insecure.Message, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Recv") + } + var r0 *insecure.Message var r1 error if rf, ok := ret.Get(0).(func() (*insecure.Message, error)); ok { @@ -102,6 +118,10 @@ func (_m *CorruptNetwork_ConnectAttackerClient) Recv() (*insecure.Message, error func (_m *CorruptNetwork_ConnectAttackerClient) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -116,6 +136,10 @@ func (_m *CorruptNetwork_ConnectAttackerClient) RecvMsg(m interface{}) error { func (_m *CorruptNetwork_ConnectAttackerClient) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -130,6 +154,10 @@ func (_m *CorruptNetwork_ConnectAttackerClient) SendMsg(m interface{}) error { func (_m *CorruptNetwork_ConnectAttackerClient) Trailer() metadata.MD { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Trailer") + } + var r0 metadata.MD if rf, ok := ret.Get(0).(func() metadata.MD); ok { r0 = rf() @@ -142,13 +170,12 @@ func (_m *CorruptNetwork_ConnectAttackerClient) Trailer() metadata.MD { return r0 } -type mockConstructorTestingTNewCorruptNetwork_ConnectAttackerClient interface { +// NewCorruptNetwork_ConnectAttackerClient creates a new instance of CorruptNetwork_ConnectAttackerClient. 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 NewCorruptNetwork_ConnectAttackerClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptNetwork_ConnectAttackerClient creates a new instance of CorruptNetwork_ConnectAttackerClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptNetwork_ConnectAttackerClient(t mockConstructorTestingTNewCorruptNetwork_ConnectAttackerClient) *CorruptNetwork_ConnectAttackerClient { +}) *CorruptNetwork_ConnectAttackerClient { mock := &CorruptNetwork_ConnectAttackerClient{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupt_network__connect_attacker_server.go b/insecure/mock/corrupt_network__connect_attacker_server.go index f36128847bd..6bb5fd3cf5f 100644 --- a/insecure/mock/corrupt_network__connect_attacker_server.go +++ b/insecure/mock/corrupt_network__connect_attacker_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -20,6 +20,10 @@ type CorruptNetwork_ConnectAttackerServer struct { func (_m *CorruptNetwork_ConnectAttackerServer) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -36,6 +40,10 @@ func (_m *CorruptNetwork_ConnectAttackerServer) Context() context.Context { func (_m *CorruptNetwork_ConnectAttackerServer) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -50,6 +58,10 @@ func (_m *CorruptNetwork_ConnectAttackerServer) RecvMsg(m interface{}) error { func (_m *CorruptNetwork_ConnectAttackerServer) Send(_a0 *insecure.Message) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(*insecure.Message) error); ok { r0 = rf(_a0) @@ -64,6 +76,10 @@ func (_m *CorruptNetwork_ConnectAttackerServer) Send(_a0 *insecure.Message) erro func (_m *CorruptNetwork_ConnectAttackerServer) SendHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) @@ -78,6 +94,10 @@ func (_m *CorruptNetwork_ConnectAttackerServer) SendHeader(_a0 metadata.MD) erro func (_m *CorruptNetwork_ConnectAttackerServer) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -92,6 +112,10 @@ func (_m *CorruptNetwork_ConnectAttackerServer) SendMsg(m interface{}) error { func (_m *CorruptNetwork_ConnectAttackerServer) SetHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) @@ -107,13 +131,12 @@ func (_m *CorruptNetwork_ConnectAttackerServer) SetTrailer(_a0 metadata.MD) { _m.Called(_a0) } -type mockConstructorTestingTNewCorruptNetwork_ConnectAttackerServer interface { +// NewCorruptNetwork_ConnectAttackerServer creates a new instance of CorruptNetwork_ConnectAttackerServer. 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 NewCorruptNetwork_ConnectAttackerServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptNetwork_ConnectAttackerServer creates a new instance of CorruptNetwork_ConnectAttackerServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptNetwork_ConnectAttackerServer(t mockConstructorTestingTNewCorruptNetwork_ConnectAttackerServer) *CorruptNetwork_ConnectAttackerServer { +}) *CorruptNetwork_ConnectAttackerServer { mock := &CorruptNetwork_ConnectAttackerServer{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupt_network__process_attacker_message_client.go b/insecure/mock/corrupt_network__process_attacker_message_client.go index ef61ab21a14..a69715455cc 100644 --- a/insecure/mock/corrupt_network__process_attacker_message_client.go +++ b/insecure/mock/corrupt_network__process_attacker_message_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -22,6 +22,10 @@ type CorruptNetwork_ProcessAttackerMessageClient struct { func (_m *CorruptNetwork_ProcessAttackerMessageClient) CloseAndRecv() (*emptypb.Empty, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CloseAndRecv") + } + var r0 *emptypb.Empty var r1 error if rf, ok := ret.Get(0).(func() (*emptypb.Empty, error)); ok { @@ -48,6 +52,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageClient) CloseAndRecv() (*emptypb. func (_m *CorruptNetwork_ProcessAttackerMessageClient) CloseSend() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CloseSend") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -62,6 +70,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageClient) CloseSend() error { func (_m *CorruptNetwork_ProcessAttackerMessageClient) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -78,6 +90,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageClient) Context() context.Context func (_m *CorruptNetwork_ProcessAttackerMessageClient) Header() (metadata.MD, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 metadata.MD var r1 error if rf, ok := ret.Get(0).(func() (metadata.MD, error)); ok { @@ -104,6 +120,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageClient) Header() (metadata.MD, er func (_m *CorruptNetwork_ProcessAttackerMessageClient) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -118,6 +138,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageClient) RecvMsg(m interface{}) er func (_m *CorruptNetwork_ProcessAttackerMessageClient) Send(_a0 *insecure.Message) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(*insecure.Message) error); ok { r0 = rf(_a0) @@ -132,6 +156,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageClient) Send(_a0 *insecure.Messag func (_m *CorruptNetwork_ProcessAttackerMessageClient) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -146,6 +174,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageClient) SendMsg(m interface{}) er func (_m *CorruptNetwork_ProcessAttackerMessageClient) Trailer() metadata.MD { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Trailer") + } + var r0 metadata.MD if rf, ok := ret.Get(0).(func() metadata.MD); ok { r0 = rf() @@ -158,13 +190,12 @@ func (_m *CorruptNetwork_ProcessAttackerMessageClient) Trailer() metadata.MD { return r0 } -type mockConstructorTestingTNewCorruptNetwork_ProcessAttackerMessageClient interface { +// NewCorruptNetwork_ProcessAttackerMessageClient creates a new instance of CorruptNetwork_ProcessAttackerMessageClient. 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 NewCorruptNetwork_ProcessAttackerMessageClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptNetwork_ProcessAttackerMessageClient creates a new instance of CorruptNetwork_ProcessAttackerMessageClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptNetwork_ProcessAttackerMessageClient(t mockConstructorTestingTNewCorruptNetwork_ProcessAttackerMessageClient) *CorruptNetwork_ProcessAttackerMessageClient { +}) *CorruptNetwork_ProcessAttackerMessageClient { mock := &CorruptNetwork_ProcessAttackerMessageClient{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupt_network__process_attacker_message_server.go b/insecure/mock/corrupt_network__process_attacker_message_server.go index 00339fd8a42..7c50dccb624 100644 --- a/insecure/mock/corrupt_network__process_attacker_message_server.go +++ b/insecure/mock/corrupt_network__process_attacker_message_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -22,6 +22,10 @@ type CorruptNetwork_ProcessAttackerMessageServer struct { func (_m *CorruptNetwork_ProcessAttackerMessageServer) Context() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Context") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -38,6 +42,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageServer) Context() context.Context func (_m *CorruptNetwork_ProcessAttackerMessageServer) Recv() (*insecure.Message, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Recv") + } + var r0 *insecure.Message var r1 error if rf, ok := ret.Get(0).(func() (*insecure.Message, error)); ok { @@ -64,6 +72,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageServer) Recv() (*insecure.Message func (_m *CorruptNetwork_ProcessAttackerMessageServer) RecvMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for RecvMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -78,6 +90,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageServer) RecvMsg(m interface{}) er func (_m *CorruptNetwork_ProcessAttackerMessageServer) SendAndClose(_a0 *emptypb.Empty) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendAndClose") + } + var r0 error if rf, ok := ret.Get(0).(func(*emptypb.Empty) error); ok { r0 = rf(_a0) @@ -92,6 +108,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageServer) SendAndClose(_a0 *emptypb func (_m *CorruptNetwork_ProcessAttackerMessageServer) SendHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) @@ -106,6 +126,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageServer) SendHeader(_a0 metadata.M func (_m *CorruptNetwork_ProcessAttackerMessageServer) SendMsg(m interface{}) error { ret := _m.Called(m) + if len(ret) == 0 { + panic("no return value specified for SendMsg") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(m) @@ -120,6 +144,10 @@ func (_m *CorruptNetwork_ProcessAttackerMessageServer) SendMsg(m interface{}) er func (_m *CorruptNetwork_ProcessAttackerMessageServer) SetHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { r0 = rf(_a0) @@ -135,13 +163,12 @@ func (_m *CorruptNetwork_ProcessAttackerMessageServer) SetTrailer(_a0 metadata.M _m.Called(_a0) } -type mockConstructorTestingTNewCorruptNetwork_ProcessAttackerMessageServer interface { +// NewCorruptNetwork_ProcessAttackerMessageServer creates a new instance of CorruptNetwork_ProcessAttackerMessageServer. 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 NewCorruptNetwork_ProcessAttackerMessageServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptNetwork_ProcessAttackerMessageServer creates a new instance of CorruptNetwork_ProcessAttackerMessageServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptNetwork_ProcessAttackerMessageServer(t mockConstructorTestingTNewCorruptNetwork_ProcessAttackerMessageServer) *CorruptNetwork_ProcessAttackerMessageServer { +}) *CorruptNetwork_ProcessAttackerMessageServer { mock := &CorruptNetwork_ProcessAttackerMessageServer{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupt_network_client.go b/insecure/mock/corrupt_network_client.go index b7f1b3c0f00..6d850e18d5c 100644 --- a/insecure/mock/corrupt_network_client.go +++ b/insecure/mock/corrupt_network_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -29,6 +29,10 @@ func (_m *CorruptNetworkClient) ConnectAttacker(ctx context.Context, in *emptypb _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ConnectAttacker") + } + var r0 insecure.CorruptNetwork_ConnectAttackerClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, *emptypb.Empty, ...grpc.CallOption) (insecure.CorruptNetwork_ConnectAttackerClient, error)); ok { @@ -62,6 +66,10 @@ func (_m *CorruptNetworkClient) ProcessAttackerMessage(ctx context.Context, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ProcessAttackerMessage") + } + var r0 insecure.CorruptNetwork_ProcessAttackerMessageClient var r1 error if rf, ok := ret.Get(0).(func(context.Context, ...grpc.CallOption) (insecure.CorruptNetwork_ProcessAttackerMessageClient, error)); ok { @@ -84,13 +92,12 @@ func (_m *CorruptNetworkClient) ProcessAttackerMessage(ctx context.Context, opts return r0, r1 } -type mockConstructorTestingTNewCorruptNetworkClient interface { +// NewCorruptNetworkClient creates a new instance of CorruptNetworkClient. 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 NewCorruptNetworkClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptNetworkClient creates a new instance of CorruptNetworkClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptNetworkClient(t mockConstructorTestingTNewCorruptNetworkClient) *CorruptNetworkClient { +}) *CorruptNetworkClient { mock := &CorruptNetworkClient{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupt_network_server.go b/insecure/mock/corrupt_network_server.go index 3ba497383d8..11aae22ac69 100644 --- a/insecure/mock/corrupt_network_server.go +++ b/insecure/mock/corrupt_network_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -18,6 +18,10 @@ type CorruptNetworkServer struct { func (_m *CorruptNetworkServer) ConnectAttacker(_a0 *emptypb.Empty, _a1 insecure.CorruptNetwork_ConnectAttackerServer) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ConnectAttacker") + } + var r0 error if rf, ok := ret.Get(0).(func(*emptypb.Empty, insecure.CorruptNetwork_ConnectAttackerServer) error); ok { r0 = rf(_a0, _a1) @@ -32,6 +36,10 @@ func (_m *CorruptNetworkServer) ConnectAttacker(_a0 *emptypb.Empty, _a1 insecure func (_m *CorruptNetworkServer) ProcessAttackerMessage(_a0 insecure.CorruptNetwork_ProcessAttackerMessageServer) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ProcessAttackerMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(insecure.CorruptNetwork_ProcessAttackerMessageServer) error); ok { r0 = rf(_a0) @@ -42,13 +50,12 @@ func (_m *CorruptNetworkServer) ProcessAttackerMessage(_a0 insecure.CorruptNetwo return r0 } -type mockConstructorTestingTNewCorruptNetworkServer interface { +// NewCorruptNetworkServer creates a new instance of CorruptNetworkServer. 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 NewCorruptNetworkServer(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptNetworkServer creates a new instance of CorruptNetworkServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptNetworkServer(t mockConstructorTestingTNewCorruptNetworkServer) *CorruptNetworkServer { +}) *CorruptNetworkServer { mock := &CorruptNetworkServer{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupted_node_connection.go b/insecure/mock/corrupted_node_connection.go index b5839b26941..61e0132fe9e 100644 --- a/insecure/mock/corrupted_node_connection.go +++ b/insecure/mock/corrupted_node_connection.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -16,6 +16,10 @@ type CorruptedNodeConnection struct { func (_m *CorruptedNodeConnection) CloseConnection() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CloseConnection") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *CorruptedNodeConnection) CloseConnection() error { func (_m *CorruptedNodeConnection) SendMessage(_a0 *insecure.Message) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(*insecure.Message) error); ok { r0 = rf(_a0) @@ -40,13 +48,12 @@ func (_m *CorruptedNodeConnection) SendMessage(_a0 *insecure.Message) error { return r0 } -type mockConstructorTestingTNewCorruptedNodeConnection interface { +// NewCorruptedNodeConnection creates a new instance of CorruptedNodeConnection. 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 NewCorruptedNodeConnection(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptedNodeConnection creates a new instance of CorruptedNodeConnection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptedNodeConnection(t mockConstructorTestingTNewCorruptedNodeConnection) *CorruptedNodeConnection { +}) *CorruptedNodeConnection { mock := &CorruptedNodeConnection{} mock.Mock.Test(t) diff --git a/insecure/mock/corrupted_node_connector.go b/insecure/mock/corrupted_node_connector.go index 93b5535a6b8..e7dc7ec9899 100644 --- a/insecure/mock/corrupted_node_connector.go +++ b/insecure/mock/corrupted_node_connector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -20,6 +20,10 @@ type CorruptedNodeConnector struct { func (_m *CorruptedNodeConnector) Connect(_a0 irrecoverable.SignalerContext, _a1 flow.Identifier) (insecure.CorruptedNodeConnection, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Connect") + } + var r0 insecure.CorruptedNodeConnection var r1 error if rf, ok := ret.Get(0).(func(irrecoverable.SignalerContext, flow.Identifier) (insecure.CorruptedNodeConnection, error)); ok { @@ -47,13 +51,12 @@ func (_m *CorruptedNodeConnector) WithIncomingMessageHandler(_a0 func(*insecure. _m.Called(_a0) } -type mockConstructorTestingTNewCorruptedNodeConnector interface { +// NewCorruptedNodeConnector creates a new instance of CorruptedNodeConnector. 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 NewCorruptedNodeConnector(t interface { mock.TestingT Cleanup(func()) -} - -// NewCorruptedNodeConnector creates a new instance of CorruptedNodeConnector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCorruptedNodeConnector(t mockConstructorTestingTNewCorruptedNodeConnector) *CorruptedNodeConnector { +}) *CorruptedNodeConnector { mock := &CorruptedNodeConnector{} mock.Mock.Test(t) diff --git a/insecure/mock/egress_controller.go b/insecure/mock/egress_controller.go index 8f332bdf74e..2099e679dd5 100644 --- a/insecure/mock/egress_controller.go +++ b/insecure/mock/egress_controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -20,6 +20,10 @@ type EgressController struct { func (_m *EgressController) EngineClosingChannel(_a0 channels.Channel) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for EngineClosingChannel") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel) error); ok { r0 = rf(_a0) @@ -41,6 +45,10 @@ func (_m *EgressController) HandleOutgoingEvent(_a0 interface{}, _a1 channels.Ch _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for HandleOutgoingEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}, channels.Channel, insecure.Protocol, uint32, ...flow.Identifier) error); ok { r0 = rf(_a0, _a1, _a2, _a3, _a4...) @@ -51,13 +59,12 @@ func (_m *EgressController) HandleOutgoingEvent(_a0 interface{}, _a1 channels.Ch return r0 } -type mockConstructorTestingTNewEgressController interface { +// NewEgressController creates a new instance of EgressController. 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 NewEgressController(t interface { mock.TestingT Cleanup(func()) -} - -// NewEgressController creates a new instance of EgressController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEgressController(t mockConstructorTestingTNewEgressController) *EgressController { +}) *EgressController { mock := &EgressController{} mock.Mock.Test(t) diff --git a/insecure/mock/ingress_controller.go b/insecure/mock/ingress_controller.go index 16efd7a1f17..9a753bb7e2d 100644 --- a/insecure/mock/ingress_controller.go +++ b/insecure/mock/ingress_controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -18,6 +18,10 @@ type IngressController struct { func (_m *IngressController) HandleIncomingEvent(_a0 interface{}, _a1 channels.Channel, _a2 flow.Identifier) bool { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for HandleIncomingEvent") + } + var r0 bool if rf, ok := ret.Get(0).(func(interface{}, channels.Channel, flow.Identifier) bool); ok { r0 = rf(_a0, _a1, _a2) @@ -28,13 +32,12 @@ func (_m *IngressController) HandleIncomingEvent(_a0 interface{}, _a1 channels.C return r0 } -type mockConstructorTestingTNewIngressController interface { +// NewIngressController creates a new instance of IngressController. 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 NewIngressController(t interface { mock.TestingT Cleanup(func()) -} - -// NewIngressController creates a new instance of IngressController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIngressController(t mockConstructorTestingTNewIngressController) *IngressController { +}) *IngressController { mock := &IngressController{} mock.Mock.Test(t) diff --git a/insecure/mock/orchestrator_network.go b/insecure/mock/orchestrator_network.go index c00c42d6185..74ddbfdaf3f 100644 --- a/insecure/mock/orchestrator_network.go +++ b/insecure/mock/orchestrator_network.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockinsecure @@ -18,6 +18,10 @@ type OrchestratorNetwork struct { func (_m *OrchestratorNetwork) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -39,6 +43,10 @@ func (_m *OrchestratorNetwork) Observe(_a0 *insecure.Message) { func (_m *OrchestratorNetwork) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -55,6 +63,10 @@ func (_m *OrchestratorNetwork) Ready() <-chan struct{} { func (_m *OrchestratorNetwork) SendEgress(_a0 *insecure.EgressEvent) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendEgress") + } + var r0 error if rf, ok := ret.Get(0).(func(*insecure.EgressEvent) error); ok { r0 = rf(_a0) @@ -69,6 +81,10 @@ func (_m *OrchestratorNetwork) SendEgress(_a0 *insecure.EgressEvent) error { func (_m *OrchestratorNetwork) SendIngress(_a0 *insecure.IngressEvent) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SendIngress") + } + var r0 error if rf, ok := ret.Get(0).(func(*insecure.IngressEvent) error); ok { r0 = rf(_a0) @@ -84,13 +100,12 @@ func (_m *OrchestratorNetwork) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewOrchestratorNetwork interface { +// NewOrchestratorNetwork creates a new instance of OrchestratorNetwork. 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 NewOrchestratorNetwork(t interface { mock.TestingT Cleanup(func()) -} - -// NewOrchestratorNetwork creates a new instance of OrchestratorNetwork. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOrchestratorNetwork(t mockConstructorTestingTNewOrchestratorNetwork) *OrchestratorNetwork { +}) *OrchestratorNetwork { mock := &OrchestratorNetwork{} mock.Mock.Test(t) diff --git a/integration/benchmark/mock/client.go b/integration/benchmark/mock/client.go index 41509dc1586..79483204cae 100644 --- a/integration/benchmark/mock/client.go +++ b/integration/benchmark/mock/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -22,6 +22,10 @@ type Client struct { func (_m *Client) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -36,6 +40,10 @@ func (_m *Client) Close() error { func (_m *Client) ExecuteScriptAtBlockHeight(ctx context.Context, height uint64, script []byte, arguments []cadence.Value) (cadence.Value, error) { ret := _m.Called(ctx, height, script, arguments) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockHeight") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64, []byte, []cadence.Value) (cadence.Value, error)); ok { @@ -62,6 +70,10 @@ func (_m *Client) ExecuteScriptAtBlockHeight(ctx context.Context, height uint64, func (_m *Client) ExecuteScriptAtBlockID(ctx context.Context, blockID flow.Identifier, script []byte, arguments []cadence.Value) (cadence.Value, error) { ret := _m.Called(ctx, blockID, script, arguments) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockID") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, []cadence.Value) (cadence.Value, error)); ok { @@ -88,6 +100,10 @@ func (_m *Client) ExecuteScriptAtBlockID(ctx context.Context, blockID flow.Ident func (_m *Client) ExecuteScriptAtLatestBlock(ctx context.Context, script []byte, arguments []cadence.Value) (cadence.Value, error) { ret := _m.Called(ctx, script, arguments) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtLatestBlock") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(context.Context, []byte, []cadence.Value) (cadence.Value, error)); ok { @@ -114,6 +130,10 @@ func (_m *Client) ExecuteScriptAtLatestBlock(ctx context.Context, script []byte, func (_m *Client) GetAccount(ctx context.Context, address flow.Address) (*flow.Account, error) { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { @@ -140,6 +160,10 @@ func (_m *Client) GetAccount(ctx context.Context, address flow.Address) (*flow.A func (_m *Client) GetAccountAtBlockHeight(ctx context.Context, address flow.Address, blockHeight uint64) (*flow.Account, error) { ret := _m.Called(ctx, address, blockHeight) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtBlockHeight") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address, uint64) (*flow.Account, error)); ok { @@ -166,6 +190,10 @@ func (_m *Client) GetAccountAtBlockHeight(ctx context.Context, address flow.Addr func (_m *Client) GetAccountAtLatestBlock(ctx context.Context, address flow.Address) (*flow.Account, error) { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtLatestBlock") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { @@ -192,6 +220,10 @@ func (_m *Client) GetAccountAtLatestBlock(ctx context.Context, address flow.Addr func (_m *Client) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Block, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for GetBlockByHeight") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (*flow.Block, error)); ok { @@ -218,6 +250,10 @@ func (_m *Client) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Bl func (_m *Client) GetBlockByID(ctx context.Context, blockID flow.Identifier) (*flow.Block, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetBlockByID") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Block, error)); ok { @@ -244,6 +280,10 @@ func (_m *Client) GetBlockByID(ctx context.Context, blockID flow.Identifier) (*f func (_m *Client) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow.BlockHeader, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByHeight") + } + var r0 *flow.BlockHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (*flow.BlockHeader, error)); ok { @@ -270,6 +310,10 @@ func (_m *Client) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*f func (_m *Client) GetBlockHeaderByID(ctx context.Context, blockID flow.Identifier) (*flow.BlockHeader, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeaderByID") + } + var r0 *flow.BlockHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.BlockHeader, error)); ok { @@ -296,6 +340,10 @@ func (_m *Client) GetBlockHeaderByID(ctx context.Context, blockID flow.Identifie func (_m *Client) GetCollection(ctx context.Context, colID flow.Identifier) (*flow.Collection, error) { ret := _m.Called(ctx, colID) + if len(ret) == 0 { + panic("no return value specified for GetCollection") + } + var r0 *flow.Collection var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Collection, error)); ok { @@ -322,6 +370,10 @@ func (_m *Client) GetCollection(ctx context.Context, colID flow.Identifier) (*fl func (_m *Client) GetEventsForBlockIDs(ctx context.Context, eventType string, blockIDs []flow.Identifier) ([]flow.BlockEvents, error) { ret := _m.Called(ctx, eventType, blockIDs) + if len(ret) == 0 { + panic("no return value specified for GetEventsForBlockIDs") + } + var r0 []flow.BlockEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, []flow.Identifier) ([]flow.BlockEvents, error)); ok { @@ -348,6 +400,10 @@ func (_m *Client) GetEventsForBlockIDs(ctx context.Context, eventType string, bl func (_m *Client) GetEventsForHeightRange(ctx context.Context, eventType string, startHeight uint64, endHeight uint64) ([]flow.BlockEvents, error) { ret := _m.Called(ctx, eventType, startHeight, endHeight) + if len(ret) == 0 { + panic("no return value specified for GetEventsForHeightRange") + } + var r0 []flow.BlockEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, uint64, uint64) ([]flow.BlockEvents, error)); ok { @@ -374,6 +430,10 @@ func (_m *Client) GetEventsForHeightRange(ctx context.Context, eventType string, func (_m *Client) GetExecutionDataByBlockID(ctx context.Context, blockID flow.Identifier) (*flow.ExecutionData, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetExecutionDataByBlockID") + } + var r0 *flow.ExecutionData var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.ExecutionData, error)); ok { @@ -400,6 +460,10 @@ func (_m *Client) GetExecutionDataByBlockID(ctx context.Context, blockID flow.Id func (_m *Client) GetExecutionResultForBlockID(ctx context.Context, blockID flow.Identifier) (*flow.ExecutionResult, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetExecutionResultForBlockID") + } + var r0 *flow.ExecutionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.ExecutionResult, error)); ok { @@ -426,6 +490,10 @@ func (_m *Client) GetExecutionResultForBlockID(ctx context.Context, blockID flow func (_m *Client) GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Block, error) { ret := _m.Called(ctx, isSealed) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlock") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (*flow.Block, error)); ok { @@ -452,6 +520,10 @@ func (_m *Client) GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Bloc func (_m *Client) GetLatestBlockHeader(ctx context.Context, isSealed bool) (*flow.BlockHeader, error) { ret := _m.Called(ctx, isSealed) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + var r0 *flow.BlockHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (*flow.BlockHeader, error)); ok { @@ -478,6 +550,10 @@ func (_m *Client) GetLatestBlockHeader(ctx context.Context, isSealed bool) (*flo func (_m *Client) GetLatestProtocolStateSnapshot(ctx context.Context) ([]byte, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetLatestProtocolStateSnapshot") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]byte, error)); ok { @@ -504,6 +580,10 @@ func (_m *Client) GetLatestProtocolStateSnapshot(ctx context.Context) ([]byte, e func (_m *Client) GetNetworkParameters(ctx context.Context) (*flow.NetworkParameters, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNetworkParameters") + } + var r0 *flow.NetworkParameters var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*flow.NetworkParameters, error)); ok { @@ -530,6 +610,10 @@ func (_m *Client) GetNetworkParameters(ctx context.Context) (*flow.NetworkParame func (_m *Client) GetNodeVersionInfo(ctx context.Context) (*flow.NodeVersionInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNodeVersionInfo") + } + var r0 *flow.NodeVersionInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*flow.NodeVersionInfo, error)); ok { @@ -556,6 +640,10 @@ func (_m *Client) GetNodeVersionInfo(ctx context.Context) (*flow.NodeVersionInfo func (_m *Client) GetTransaction(ctx context.Context, txID flow.Identifier) (*flow.Transaction, error) { ret := _m.Called(ctx, txID) + if len(ret) == 0 { + panic("no return value specified for GetTransaction") + } + var r0 *flow.Transaction var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Transaction, error)); ok { @@ -582,6 +670,10 @@ func (_m *Client) GetTransaction(ctx context.Context, txID flow.Identifier) (*fl func (_m *Client) GetTransactionResult(ctx context.Context, txID flow.Identifier) (*flow.TransactionResult, error) { ret := _m.Called(ctx, txID) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResult") + } + var r0 *flow.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.TransactionResult, error)); ok { @@ -608,6 +700,10 @@ func (_m *Client) GetTransactionResult(ctx context.Context, txID flow.Identifier func (_m *Client) GetTransactionResultsByBlockID(ctx context.Context, blockID flow.Identifier) ([]*flow.TransactionResult, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResultsByBlockID") + } + var r0 []*flow.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) ([]*flow.TransactionResult, error)); ok { @@ -634,6 +730,10 @@ func (_m *Client) GetTransactionResultsByBlockID(ctx context.Context, blockID fl func (_m *Client) GetTransactionsByBlockID(ctx context.Context, blockID flow.Identifier) ([]*flow.Transaction, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetTransactionsByBlockID") + } + var r0 []*flow.Transaction var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) ([]*flow.Transaction, error)); ok { @@ -660,6 +760,10 @@ func (_m *Client) GetTransactionsByBlockID(ctx context.Context, blockID flow.Ide func (_m *Client) Ping(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -674,6 +778,10 @@ func (_m *Client) Ping(ctx context.Context) error { func (_m *Client) SendTransaction(ctx context.Context, tx flow.Transaction) error { ret := _m.Called(ctx, tx) + if len(ret) == 0 { + panic("no return value specified for SendTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, flow.Transaction) error); ok { r0 = rf(ctx, tx) @@ -695,6 +803,10 @@ func (_m *Client) SubscribeEventsByBlockHeight(ctx context.Context, startHeight _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeEventsByBlockHeight") + } + var r0 <-chan flow.BlockEvents var r1 <-chan error var r2 error @@ -737,6 +849,10 @@ func (_m *Client) SubscribeEventsByBlockID(ctx context.Context, startBlockID flo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for SubscribeEventsByBlockID") + } + var r0 <-chan flow.BlockEvents var r1 <-chan error var r2 error @@ -772,6 +888,10 @@ func (_m *Client) SubscribeEventsByBlockID(ctx context.Context, startBlockID flo func (_m *Client) SubscribeExecutionDataByBlockHeight(ctx context.Context, startHeight uint64) (<-chan flow.ExecutionDataStreamResponse, <-chan error, error) { ret := _m.Called(ctx, startHeight) + if len(ret) == 0 { + panic("no return value specified for SubscribeExecutionDataByBlockHeight") + } + var r0 <-chan flow.ExecutionDataStreamResponse var r1 <-chan error var r2 error @@ -807,6 +927,10 @@ func (_m *Client) SubscribeExecutionDataByBlockHeight(ctx context.Context, start func (_m *Client) SubscribeExecutionDataByBlockID(ctx context.Context, startBlockID flow.Identifier) (<-chan flow.ExecutionDataStreamResponse, <-chan error, error) { ret := _m.Called(ctx, startBlockID) + if len(ret) == 0 { + panic("no return value specified for SubscribeExecutionDataByBlockID") + } + var r0 <-chan flow.ExecutionDataStreamResponse var r1 <-chan error var r2 error @@ -838,13 +962,12 @@ func (_m *Client) SubscribeExecutionDataByBlockID(ctx context.Context, startBloc return r0, r1, r2 } -type mockConstructorTestingTNewClient interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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. -func NewClient(t mockConstructorTestingTNewClient) *Client { +}) *Client { mock := &Client{} mock.Mock.Test(t) diff --git a/ledger/mock/ledger.go b/ledger/mock/ledger.go index 552dd9b7719..9714d17d2d6 100644 --- a/ledger/mock/ledger.go +++ b/ledger/mock/ledger.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Ledger struct { func (_m *Ledger) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Ledger) Done() <-chan struct{} { func (_m *Ledger) Get(query *ledger.Query) ([]ledger.Value, error) { ret := _m.Called(query) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 []ledger.Value var r1 error if rf, ok := ret.Get(0).(func(*ledger.Query) ([]ledger.Value, error)); ok { @@ -58,6 +66,10 @@ func (_m *Ledger) Get(query *ledger.Query) ([]ledger.Value, error) { func (_m *Ledger) GetSingleValue(query *ledger.QuerySingleValue) (ledger.Value, error) { ret := _m.Called(query) + if len(ret) == 0 { + panic("no return value specified for GetSingleValue") + } + var r0 ledger.Value var r1 error if rf, ok := ret.Get(0).(func(*ledger.QuerySingleValue) (ledger.Value, error)); ok { @@ -84,6 +96,10 @@ func (_m *Ledger) GetSingleValue(query *ledger.QuerySingleValue) (ledger.Value, func (_m *Ledger) HasState(state ledger.State) bool { ret := _m.Called(state) + if len(ret) == 0 { + panic("no return value specified for HasState") + } + var r0 bool if rf, ok := ret.Get(0).(func(ledger.State) bool); ok { r0 = rf(state) @@ -98,6 +114,10 @@ func (_m *Ledger) HasState(state ledger.State) bool { func (_m *Ledger) InitialState() ledger.State { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InitialState") + } + var r0 ledger.State if rf, ok := ret.Get(0).(func() ledger.State); ok { r0 = rf() @@ -114,6 +134,10 @@ func (_m *Ledger) InitialState() ledger.State { func (_m *Ledger) Prove(query *ledger.Query) (ledger.Proof, error) { ret := _m.Called(query) + if len(ret) == 0 { + panic("no return value specified for Prove") + } + var r0 ledger.Proof var r1 error if rf, ok := ret.Get(0).(func(*ledger.Query) (ledger.Proof, error)); ok { @@ -140,6 +164,10 @@ func (_m *Ledger) Prove(query *ledger.Query) (ledger.Proof, error) { func (_m *Ledger) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -156,6 +184,10 @@ func (_m *Ledger) Ready() <-chan struct{} { func (_m *Ledger) Set(update *ledger.Update) (ledger.State, *ledger.TrieUpdate, error) { ret := _m.Called(update) + if len(ret) == 0 { + panic("no return value specified for Set") + } + var r0 ledger.State var r1 *ledger.TrieUpdate var r2 error @@ -187,13 +219,12 @@ func (_m *Ledger) Set(update *ledger.Update) (ledger.State, *ledger.TrieUpdate, return r0, r1, r2 } -type mockConstructorTestingTNewLedger interface { +// NewLedger creates a new instance of Ledger. 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 NewLedger(t interface { mock.TestingT Cleanup(func()) -} - -// NewLedger creates a new instance of Ledger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLedger(t mockConstructorTestingTNewLedger) *Ledger { +}) *Ledger { mock := &Ledger{} mock.Mock.Test(t) diff --git a/ledger/mock/migration.go b/ledger/mock/migration.go index f93dde47113..b34ea5e7fb9 100644 --- a/ledger/mock/migration.go +++ b/ledger/mock/migration.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Migration struct { func (_m *Migration) Execute(payloads []*ledger.Payload) ([]*ledger.Payload, error) { ret := _m.Called(payloads) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 []*ledger.Payload var r1 error if rf, ok := ret.Get(0).(func([]*ledger.Payload) ([]*ledger.Payload, error)); ok { @@ -38,13 +42,12 @@ func (_m *Migration) Execute(payloads []*ledger.Payload) ([]*ledger.Payload, err return r0, r1 } -type mockConstructorTestingTNewMigration interface { +// NewMigration creates a new instance of Migration. 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 NewMigration(t interface { mock.TestingT Cleanup(func()) -} - -// NewMigration creates a new instance of Migration. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMigration(t mockConstructorTestingTNewMigration) *Migration { +}) *Migration { mock := &Migration{} mock.Mock.Test(t) diff --git a/ledger/mock/reporter.go b/ledger/mock/reporter.go index 5d5e05c4bed..b84fef78cc3 100644 --- a/ledger/mock/reporter.go +++ b/ledger/mock/reporter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Reporter struct { func (_m *Reporter) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *Reporter) Name() string { func (_m *Reporter) Report(payloads []ledger.Payload, statecommitment ledger.State) error { ret := _m.Called(payloads, statecommitment) + if len(ret) == 0 { + panic("no return value specified for Report") + } + var r0 error if rf, ok := ret.Get(0).(func([]ledger.Payload, ledger.State) error); ok { r0 = rf(payloads, statecommitment) @@ -40,13 +48,12 @@ func (_m *Reporter) Report(payloads []ledger.Payload, statecommitment ledger.Sta return r0 } -type mockConstructorTestingTNewReporter interface { +// NewReporter creates a new instance of Reporter. 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 NewReporter(t interface { mock.TestingT Cleanup(func()) -} - -// NewReporter creates a new instance of Reporter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReporter(t mockConstructorTestingTNewReporter) *Reporter { +}) *Reporter { mock := &Reporter{} mock.Mock.Test(t) diff --git a/model/fingerprint/mock/fingerprinter.go b/model/fingerprint/mock/fingerprinter.go index d4ddc59ab9d..f1864c85b0b 100644 --- a/model/fingerprint/mock/fingerprinter.go +++ b/model/fingerprint/mock/fingerprinter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type Fingerprinter struct { func (_m *Fingerprinter) Fingerprint() []byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Fingerprint") + } + var r0 []byte if rf, ok := ret.Get(0).(func() []byte); ok { r0 = rf() @@ -25,13 +29,12 @@ func (_m *Fingerprinter) Fingerprint() []byte { return r0 } -type mockConstructorTestingTNewFingerprinter interface { +// NewFingerprinter creates a new instance of Fingerprinter. 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 NewFingerprinter(t interface { mock.TestingT Cleanup(func()) -} - -// NewFingerprinter creates a new instance of Fingerprinter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFingerprinter(t mockConstructorTestingTNewFingerprinter) *Fingerprinter { +}) *Fingerprinter { mock := &Fingerprinter{} mock.Mock.Test(t) diff --git a/module/component/mock/component.go b/module/component/mock/component.go index f93cc95799d..f752f764cfe 100644 --- a/module/component/mock/component.go +++ b/module/component/mock/component.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package component @@ -16,6 +16,10 @@ type Component struct { func (_m *Component) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Component) Done() <-chan struct{} { func (_m *Component) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -49,13 +57,12 @@ func (_m *Component) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewComponent interface { +// NewComponent creates a new instance of Component. 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 NewComponent(t interface { mock.TestingT Cleanup(func()) -} - -// NewComponent creates a new instance of Component. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewComponent(t mockConstructorTestingTNewComponent) *Component { +}) *Component { mock := &Component{} mock.Mock.Test(t) diff --git a/module/component/mock/component_factory.go b/module/component/mock/component_factory.go index 2bba231ddb1..37966a29435 100644 --- a/module/component/mock/component_factory.go +++ b/module/component/mock/component_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package component @@ -16,6 +16,10 @@ type ComponentFactory struct { func (_m *ComponentFactory) Execute() (component.Component, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 component.Component var r1 error if rf, ok := ret.Get(0).(func() (component.Component, error)); ok { @@ -38,13 +42,12 @@ func (_m *ComponentFactory) Execute() (component.Component, error) { return r0, r1 } -type mockConstructorTestingTNewComponentFactory interface { +// NewComponentFactory creates a new instance of ComponentFactory. 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 NewComponentFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewComponentFactory creates a new instance of ComponentFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewComponentFactory(t mockConstructorTestingTNewComponentFactory) *ComponentFactory { +}) *ComponentFactory { mock := &ComponentFactory{} mock.Mock.Test(t) diff --git a/module/component/mock/component_manager_builder.go b/module/component/mock/component_manager_builder.go index c414ddc6663..a84da321d38 100644 --- a/module/component/mock/component_manager_builder.go +++ b/module/component/mock/component_manager_builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package component @@ -16,6 +16,10 @@ type ComponentManagerBuilder struct { func (_m *ComponentManagerBuilder) AddWorker(_a0 component.ComponentWorker) component.ComponentManagerBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for AddWorker") + } + var r0 component.ComponentManagerBuilder if rf, ok := ret.Get(0).(func(component.ComponentWorker) component.ComponentManagerBuilder); ok { r0 = rf(_a0) @@ -32,6 +36,10 @@ func (_m *ComponentManagerBuilder) AddWorker(_a0 component.ComponentWorker) comp func (_m *ComponentManagerBuilder) Build() *component.ComponentManager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Build") + } + var r0 *component.ComponentManager if rf, ok := ret.Get(0).(func() *component.ComponentManager); ok { r0 = rf() @@ -44,13 +52,12 @@ func (_m *ComponentManagerBuilder) Build() *component.ComponentManager { return r0 } -type mockConstructorTestingTNewComponentManagerBuilder interface { +// NewComponentManagerBuilder creates a new instance of ComponentManagerBuilder. 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 NewComponentManagerBuilder(t interface { mock.TestingT Cleanup(func()) -} - -// NewComponentManagerBuilder creates a new instance of ComponentManagerBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewComponentManagerBuilder(t mockConstructorTestingTNewComponentManagerBuilder) *ComponentManagerBuilder { +}) *ComponentManagerBuilder { mock := &ComponentManagerBuilder{} mock.Mock.Test(t) diff --git a/module/component/mock/component_worker.go b/module/component/mock/component_worker.go index acdf93a3908..9d5eb835a5e 100644 --- a/module/component/mock/component_worker.go +++ b/module/component/mock/component_worker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package component @@ -19,13 +19,12 @@ func (_m *ComponentWorker) Execute(ctx irrecoverable.SignalerContext, ready comp _m.Called(ctx, ready) } -type mockConstructorTestingTNewComponentWorker interface { +// NewComponentWorker creates a new instance of ComponentWorker. 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 NewComponentWorker(t interface { mock.TestingT Cleanup(func()) -} - -// NewComponentWorker creates a new instance of ComponentWorker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewComponentWorker(t mockConstructorTestingTNewComponentWorker) *ComponentWorker { +}) *ComponentWorker { mock := &ComponentWorker{} mock.Mock.Test(t) diff --git a/module/component/mock/ready_func.go b/module/component/mock/ready_func.go index 57e61098bba..d9b7906d43f 100644 --- a/module/component/mock/ready_func.go +++ b/module/component/mock/ready_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package component @@ -14,13 +14,12 @@ func (_m *ReadyFunc) Execute() { _m.Called() } -type mockConstructorTestingTNewReadyFunc interface { +// NewReadyFunc creates a new instance of ReadyFunc. 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 NewReadyFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewReadyFunc creates a new instance of ReadyFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReadyFunc(t mockConstructorTestingTNewReadyFunc) *ReadyFunc { +}) *ReadyFunc { mock := &ReadyFunc{} mock.Mock.Test(t) diff --git a/module/execution/mock/script_executor.go b/module/execution/mock/script_executor.go index ad716744d72..113032aa4f7 100644 --- a/module/execution/mock/script_executor.go +++ b/module/execution/mock/script_executor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type ScriptExecutor struct { func (_m *ScriptExecutor) ExecuteAtBlockHeight(ctx context.Context, script []byte, arguments [][]byte, height uint64) ([]byte, error) { ret := _m.Called(ctx, script, arguments, height) + if len(ret) == 0 { + panic("no return value specified for ExecuteAtBlockHeight") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte, uint64) ([]byte, error)); ok { @@ -45,6 +49,10 @@ func (_m *ScriptExecutor) ExecuteAtBlockHeight(ctx context.Context, script []byt func (_m *ScriptExecutor) GetAccountAtBlockHeight(ctx context.Context, address flow.Address, height uint64) (*flow.Account, error) { ret := _m.Called(ctx, address, height) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtBlockHeight") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address, uint64) (*flow.Account, error)); ok { @@ -67,13 +75,12 @@ func (_m *ScriptExecutor) GetAccountAtBlockHeight(ctx context.Context, address f return r0, r1 } -type mockConstructorTestingTNewScriptExecutor interface { +// NewScriptExecutor creates a new instance of ScriptExecutor. 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 NewScriptExecutor(t interface { mock.TestingT Cleanup(func()) -} - -// NewScriptExecutor creates a new instance of ScriptExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewScriptExecutor(t mockConstructorTestingTNewScriptExecutor) *ScriptExecutor { +}) *ScriptExecutor { mock := &ScriptExecutor{} mock.Mock.Test(t) diff --git a/module/executiondatasync/execution_data/mock/downloader.go b/module/executiondatasync/execution_data/mock/downloader.go index dfeafeeffbe..8052fe09457 100644 --- a/module/executiondatasync/execution_data/mock/downloader.go +++ b/module/executiondatasync/execution_data/mock/downloader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type Downloader struct { func (_m *Downloader) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -36,6 +40,10 @@ func (_m *Downloader) Done() <-chan struct{} { func (_m *Downloader) Get(ctx context.Context, rootID flow.Identifier) (*execution_data.BlockExecutionData, error) { ret := _m.Called(ctx, rootID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *execution_data.BlockExecutionData var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*execution_data.BlockExecutionData, error)); ok { @@ -62,6 +70,10 @@ func (_m *Downloader) Get(ctx context.Context, rootID flow.Identifier) (*executi func (_m *Downloader) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -74,13 +86,12 @@ func (_m *Downloader) Ready() <-chan struct{} { return r0 } -type mockConstructorTestingTNewDownloader interface { +// NewDownloader creates a new instance of Downloader. 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 NewDownloader(t interface { mock.TestingT Cleanup(func()) -} - -// NewDownloader creates a new instance of Downloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDownloader(t mockConstructorTestingTNewDownloader) *Downloader { +}) *Downloader { mock := &Downloader{} mock.Mock.Test(t) diff --git a/module/executiondatasync/execution_data/mock/execution_data_store.go b/module/executiondatasync/execution_data/mock/execution_data_store.go index c11c0f1cbce..cc19c2a397f 100644 --- a/module/executiondatasync/execution_data/mock/execution_data_store.go +++ b/module/executiondatasync/execution_data/mock/execution_data_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type ExecutionDataStore struct { func (_m *ExecutionDataStore) Add(ctx context.Context, executionData *execution_data.BlockExecutionData) (flow.Identifier, error) { ret := _m.Called(ctx, executionData) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(context.Context, *execution_data.BlockExecutionData) (flow.Identifier, error)); ok { @@ -46,6 +50,10 @@ func (_m *ExecutionDataStore) Add(ctx context.Context, executionData *execution_ func (_m *ExecutionDataStore) Get(ctx context.Context, rootID flow.Identifier) (*execution_data.BlockExecutionData, error) { ret := _m.Called(ctx, rootID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *execution_data.BlockExecutionData var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*execution_data.BlockExecutionData, error)); ok { @@ -68,13 +76,12 @@ func (_m *ExecutionDataStore) Get(ctx context.Context, rootID flow.Identifier) ( return r0, r1 } -type mockConstructorTestingTNewExecutionDataStore interface { +// NewExecutionDataStore creates a new instance of ExecutionDataStore. 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 NewExecutionDataStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionDataStore creates a new instance of ExecutionDataStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionDataStore(t mockConstructorTestingTNewExecutionDataStore) *ExecutionDataStore { +}) *ExecutionDataStore { mock := &ExecutionDataStore{} mock.Mock.Test(t) diff --git a/module/executiondatasync/tracker/mock/storage.go b/module/executiondatasync/tracker/mock/storage.go index 6eef7092ffd..c9fd144785c 100644 --- a/module/executiondatasync/tracker/mock/storage.go +++ b/module/executiondatasync/tracker/mock/storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocktracker @@ -16,6 +16,10 @@ type Storage struct { func (_m *Storage) GetFulfilledHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetFulfilledHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -40,6 +44,10 @@ func (_m *Storage) GetFulfilledHeight() (uint64, error) { func (_m *Storage) GetPrunedHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetPrunedHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -64,6 +72,10 @@ func (_m *Storage) GetPrunedHeight() (uint64, error) { func (_m *Storage) PruneUpToHeight(height uint64) error { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for PruneUpToHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(height) @@ -78,6 +90,10 @@ func (_m *Storage) PruneUpToHeight(height uint64) error { func (_m *Storage) SetFulfilledHeight(height uint64) error { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for SetFulfilledHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(height) @@ -92,6 +108,10 @@ func (_m *Storage) SetFulfilledHeight(height uint64) error { func (_m *Storage) Update(_a0 tracker.UpdateFn) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 error if rf, ok := ret.Get(0).(func(tracker.UpdateFn) error); ok { r0 = rf(_a0) @@ -102,13 +122,12 @@ func (_m *Storage) Update(_a0 tracker.UpdateFn) error { return r0 } -type mockConstructorTestingTNewStorage interface { +// NewStorage creates a new instance of Storage. 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 NewStorage(t interface { mock.TestingT Cleanup(func()) -} - -// NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStorage(t mockConstructorTestingTNewStorage) *Storage { +}) *Storage { mock := &Storage{} mock.Mock.Test(t) diff --git a/module/forest/mock/vertex.go b/module/forest/mock/vertex.go index fb56bc9df53..a2207ded216 100644 --- a/module/forest/mock/vertex.go +++ b/module/forest/mock/vertex.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,6 +17,10 @@ type Vertex struct { func (_m *Vertex) Level() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Level") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -31,6 +35,10 @@ func (_m *Vertex) Level() uint64 { func (_m *Vertex) Parent() (flow.Identifier, uint64) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Parent") + } + var r0 flow.Identifier var r1 uint64 if rf, ok := ret.Get(0).(func() (flow.Identifier, uint64)); ok { @@ -57,6 +65,10 @@ func (_m *Vertex) Parent() (flow.Identifier, uint64) { func (_m *Vertex) VertexID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VertexID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -69,13 +81,12 @@ func (_m *Vertex) VertexID() flow.Identifier { return r0 } -type mockConstructorTestingTNewVertex interface { +// NewVertex creates a new instance of Vertex. 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 NewVertex(t interface { mock.TestingT Cleanup(func()) -} - -// NewVertex creates a new instance of Vertex. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVertex(t mockConstructorTestingTNewVertex) *Vertex { +}) *Vertex { mock := &Vertex{} mock.Mock.Test(t) diff --git a/module/mempool/consensus/mock/exec_fork_actor.go b/module/mempool/consensus/mock/exec_fork_actor.go index ae567dd9e7c..7a03f545b44 100644 --- a/module/mempool/consensus/mock/exec_fork_actor.go +++ b/module/mempool/consensus/mock/exec_fork_actor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,13 +17,12 @@ func (_m *ExecForkActorMock) OnExecFork(_a0 []*flow.IncorporatedResultSeal) { _m.Called(_a0) } -type mockConstructorTestingTNewExecForkActorMock interface { +// NewExecForkActorMock creates a new instance of ExecForkActorMock. 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 NewExecForkActorMock(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecForkActorMock creates a new instance of ExecForkActorMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecForkActorMock(t mockConstructorTestingTNewExecForkActorMock) *ExecForkActorMock { +}) *ExecForkActorMock { mock := &ExecForkActorMock{} mock.Mock.Test(t) diff --git a/module/mempool/mock/assignments.go b/module/mempool/mock/assignments.go index e6b186ceabd..53c17cb1b2f 100644 --- a/module/mempool/mock/assignments.go +++ b/module/mempool/mock/assignments.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -18,6 +18,10 @@ type Assignments struct { func (_m *Assignments) Add(assignmentFingerprint flow.Identifier, assignment *chunks.Assignment) bool { ret := _m.Called(assignmentFingerprint, assignment) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier, *chunks.Assignment) bool); ok { r0 = rf(assignmentFingerprint, assignment) @@ -32,6 +36,10 @@ func (_m *Assignments) Add(assignmentFingerprint flow.Identifier, assignment *ch func (_m *Assignments) All() []*chunks.Assignment { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*chunks.Assignment if rf, ok := ret.Get(0).(func() []*chunks.Assignment); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *Assignments) All() []*chunks.Assignment { func (_m *Assignments) ByID(assignmentID flow.Identifier) (*chunks.Assignment, bool) { ret := _m.Called(assignmentID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *chunks.Assignment var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*chunks.Assignment, bool)); ok { @@ -74,6 +86,10 @@ func (_m *Assignments) ByID(assignmentID flow.Identifier) (*chunks.Assignment, b func (_m *Assignments) Has(assignmentID flow.Identifier) bool { ret := _m.Called(assignmentID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(assignmentID) @@ -88,6 +104,10 @@ func (_m *Assignments) Has(assignmentID flow.Identifier) bool { func (_m *Assignments) Remove(assignmentID flow.Identifier) bool { ret := _m.Called(assignmentID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(assignmentID) @@ -102,6 +122,10 @@ func (_m *Assignments) Remove(assignmentID flow.Identifier) bool { func (_m *Assignments) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -112,13 +136,12 @@ func (_m *Assignments) Size() uint { return r0 } -type mockConstructorTestingTNewAssignments interface { +// NewAssignments creates a new instance of Assignments. 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 NewAssignments(t interface { mock.TestingT Cleanup(func()) -} - -// NewAssignments creates a new instance of Assignments. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAssignments(t mockConstructorTestingTNewAssignments) *Assignments { +}) *Assignments { mock := &Assignments{} mock.Mock.Test(t) diff --git a/module/mempool/mock/back_data.go b/module/mempool/mock/back_data.go index a72f0d6da1f..ee3aa4976fe 100644 --- a/module/mempool/mock/back_data.go +++ b/module/mempool/mock/back_data.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type BackData struct { func (_m *BackData) Add(entityID flow.Identifier, entity flow.Entity) bool { ret := _m.Called(entityID, entity) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Entity) bool); ok { r0 = rf(entityID, entity) @@ -31,6 +35,10 @@ func (_m *BackData) Add(entityID flow.Identifier, entity flow.Entity) bool { func (_m *BackData) Adjust(entityID flow.Identifier, f func(flow.Entity) flow.Entity) (flow.Entity, bool) { ret := _m.Called(entityID, f) + if len(ret) == 0 { + panic("no return value specified for Adjust") + } + var r0 flow.Entity var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier, func(flow.Entity) flow.Entity) (flow.Entity, bool)); ok { @@ -57,6 +65,10 @@ func (_m *BackData) Adjust(entityID flow.Identifier, f func(flow.Entity) flow.En func (_m *BackData) AdjustWithInit(entityID flow.Identifier, adjust func(flow.Entity) flow.Entity, init func() flow.Entity) (flow.Entity, bool) { ret := _m.Called(entityID, adjust, init) + if len(ret) == 0 { + panic("no return value specified for AdjustWithInit") + } + var r0 flow.Entity var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier, func(flow.Entity) flow.Entity, func() flow.Entity) (flow.Entity, bool)); ok { @@ -83,6 +95,10 @@ func (_m *BackData) AdjustWithInit(entityID flow.Identifier, adjust func(flow.En func (_m *BackData) All() map[flow.Identifier]flow.Entity { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 map[flow.Identifier]flow.Entity if rf, ok := ret.Get(0).(func() map[flow.Identifier]flow.Entity); ok { r0 = rf() @@ -99,6 +115,10 @@ func (_m *BackData) All() map[flow.Identifier]flow.Entity { func (_m *BackData) ByID(entityID flow.Identifier) (flow.Entity, bool) { ret := _m.Called(entityID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 flow.Entity var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.Entity, bool)); ok { @@ -130,6 +150,10 @@ func (_m *BackData) Clear() { func (_m *BackData) Entities() []flow.Entity { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Entities") + } + var r0 []flow.Entity if rf, ok := ret.Get(0).(func() []flow.Entity); ok { r0 = rf() @@ -146,6 +170,10 @@ func (_m *BackData) Entities() []flow.Entity { func (_m *BackData) GetWithInit(entityID flow.Identifier, init func() flow.Entity) (flow.Entity, bool) { ret := _m.Called(entityID, init) + if len(ret) == 0 { + panic("no return value specified for GetWithInit") + } + var r0 flow.Entity var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier, func() flow.Entity) (flow.Entity, bool)); ok { @@ -172,6 +200,10 @@ func (_m *BackData) GetWithInit(entityID flow.Identifier, init func() flow.Entit func (_m *BackData) Has(entityID flow.Identifier) bool { ret := _m.Called(entityID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(entityID) @@ -186,6 +218,10 @@ func (_m *BackData) Has(entityID flow.Identifier) bool { func (_m *BackData) Identifiers() flow.IdentifierList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Identifiers") + } + var r0 flow.IdentifierList if rf, ok := ret.Get(0).(func() flow.IdentifierList); ok { r0 = rf() @@ -202,6 +238,10 @@ func (_m *BackData) Identifiers() flow.IdentifierList { func (_m *BackData) Remove(entityID flow.Identifier) (flow.Entity, bool) { ret := _m.Called(entityID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 flow.Entity var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.Entity, bool)); ok { @@ -228,6 +268,10 @@ func (_m *BackData) Remove(entityID flow.Identifier) (flow.Entity, bool) { func (_m *BackData) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -238,13 +282,12 @@ func (_m *BackData) Size() uint { return r0 } -type mockConstructorTestingTNewBackData interface { +// NewBackData creates a new instance of BackData. 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 NewBackData(t interface { mock.TestingT Cleanup(func()) -} - -// NewBackData creates a new instance of BackData. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBackData(t mockConstructorTestingTNewBackData) *BackData { +}) *BackData { mock := &BackData{} mock.Mock.Test(t) diff --git a/module/mempool/mock/block_filter.go b/module/mempool/mock/block_filter.go index 61bb7df32b8..721fc857705 100644 --- a/module/mempool/mock/block_filter.go +++ b/module/mempool/mock/block_filter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type BlockFilter struct { func (_m *BlockFilter) Execute(header *flow.Header) bool { ret := _m.Called(header) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.Header) bool); ok { r0 = rf(header) @@ -27,13 +31,12 @@ func (_m *BlockFilter) Execute(header *flow.Header) bool { return r0 } -type mockConstructorTestingTNewBlockFilter interface { +// NewBlockFilter creates a new instance of BlockFilter. 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 NewBlockFilter(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockFilter creates a new instance of BlockFilter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockFilter(t mockConstructorTestingTNewBlockFilter) *BlockFilter { +}) *BlockFilter { mock := &BlockFilter{} mock.Mock.Test(t) diff --git a/module/mempool/mock/blocks.go b/module/mempool/mock/blocks.go index 470e27d19d2..80f5aa827fe 100644 --- a/module/mempool/mock/blocks.go +++ b/module/mempool/mock/blocks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type Blocks struct { func (_m *Blocks) Add(block *flow.Block) bool { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.Block) bool); ok { r0 = rf(block) @@ -31,6 +35,10 @@ func (_m *Blocks) Add(block *flow.Block) bool { func (_m *Blocks) All() []*flow.Block { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*flow.Block if rf, ok := ret.Get(0).(func() []*flow.Block); ok { r0 = rf() @@ -47,6 +55,10 @@ func (_m *Blocks) All() []*flow.Block { func (_m *Blocks) ByID(blockID flow.Identifier) (*flow.Block, bool) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.Block var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Block, bool)); ok { @@ -73,6 +85,10 @@ func (_m *Blocks) ByID(blockID flow.Identifier) (*flow.Block, bool) { func (_m *Blocks) Has(blockID flow.Identifier) bool { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(blockID) @@ -87,6 +103,10 @@ func (_m *Blocks) Has(blockID flow.Identifier) bool { func (_m *Blocks) Hash() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Hash") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -103,6 +123,10 @@ func (_m *Blocks) Hash() flow.Identifier { func (_m *Blocks) Remove(blockID flow.Identifier) bool { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(blockID) @@ -117,6 +141,10 @@ func (_m *Blocks) Remove(blockID flow.Identifier) bool { func (_m *Blocks) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -127,13 +155,12 @@ func (_m *Blocks) Size() uint { return r0 } -type mockConstructorTestingTNewBlocks interface { +// NewBlocks creates a new instance of Blocks. 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 NewBlocks(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlocks creates a new instance of Blocks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlocks(t mockConstructorTestingTNewBlocks) *Blocks { +}) *Blocks { mock := &Blocks{} mock.Mock.Test(t) diff --git a/module/mempool/mock/chunk_data_packs.go b/module/mempool/mock/chunk_data_packs.go index 01b5b22bf9e..d9eebf0de82 100644 --- a/module/mempool/mock/chunk_data_packs.go +++ b/module/mempool/mock/chunk_data_packs.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type ChunkDataPacks struct { func (_m *ChunkDataPacks) Add(cdp *flow.ChunkDataPack) bool { ret := _m.Called(cdp) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.ChunkDataPack) bool); ok { r0 = rf(cdp) @@ -31,6 +35,10 @@ func (_m *ChunkDataPacks) Add(cdp *flow.ChunkDataPack) bool { func (_m *ChunkDataPacks) All() []*flow.ChunkDataPack { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*flow.ChunkDataPack if rf, ok := ret.Get(0).(func() []*flow.ChunkDataPack); ok { r0 = rf() @@ -47,6 +55,10 @@ func (_m *ChunkDataPacks) All() []*flow.ChunkDataPack { func (_m *ChunkDataPacks) ByChunkID(chunkID flow.Identifier) (*flow.ChunkDataPack, bool) { ret := _m.Called(chunkID) + if len(ret) == 0 { + panic("no return value specified for ByChunkID") + } + var r0 *flow.ChunkDataPack var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ChunkDataPack, bool)); ok { @@ -73,6 +85,10 @@ func (_m *ChunkDataPacks) ByChunkID(chunkID flow.Identifier) (*flow.ChunkDataPac func (_m *ChunkDataPacks) Has(chunkID flow.Identifier) bool { ret := _m.Called(chunkID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(chunkID) @@ -87,6 +103,10 @@ func (_m *ChunkDataPacks) Has(chunkID flow.Identifier) bool { func (_m *ChunkDataPacks) Remove(chunkID flow.Identifier) bool { ret := _m.Called(chunkID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(chunkID) @@ -101,6 +121,10 @@ func (_m *ChunkDataPacks) Remove(chunkID flow.Identifier) bool { func (_m *ChunkDataPacks) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -111,13 +135,12 @@ func (_m *ChunkDataPacks) Size() uint { return r0 } -type mockConstructorTestingTNewChunkDataPacks interface { +// NewChunkDataPacks creates a new instance of ChunkDataPacks. 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 NewChunkDataPacks(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkDataPacks creates a new instance of ChunkDataPacks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkDataPacks(t mockConstructorTestingTNewChunkDataPacks) *ChunkDataPacks { +}) *ChunkDataPacks { mock := &ChunkDataPacks{} mock.Mock.Test(t) diff --git a/module/mempool/mock/chunk_request_history_updater_func.go b/module/mempool/mock/chunk_request_history_updater_func.go index ee733755bb7..3764a58aa32 100644 --- a/module/mempool/mock/chunk_request_history_updater_func.go +++ b/module/mempool/mock/chunk_request_history_updater_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type ChunkRequestHistoryUpdaterFunc struct { func (_m *ChunkRequestHistoryUpdaterFunc) Execute(_a0 uint64, _a1 time.Duration) (uint64, time.Duration, bool) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 uint64 var r1 time.Duration var r2 bool @@ -44,13 +48,12 @@ func (_m *ChunkRequestHistoryUpdaterFunc) Execute(_a0 uint64, _a1 time.Duration) return r0, r1, r2 } -type mockConstructorTestingTNewChunkRequestHistoryUpdaterFunc interface { +// NewChunkRequestHistoryUpdaterFunc creates a new instance of ChunkRequestHistoryUpdaterFunc. 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 NewChunkRequestHistoryUpdaterFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkRequestHistoryUpdaterFunc creates a new instance of ChunkRequestHistoryUpdaterFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkRequestHistoryUpdaterFunc(t mockConstructorTestingTNewChunkRequestHistoryUpdaterFunc) *ChunkRequestHistoryUpdaterFunc { +}) *ChunkRequestHistoryUpdaterFunc { mock := &ChunkRequestHistoryUpdaterFunc{} mock.Mock.Test(t) diff --git a/module/mempool/mock/chunk_requests.go b/module/mempool/mock/chunk_requests.go index 9d5924da359..328640348bc 100644 --- a/module/mempool/mock/chunk_requests.go +++ b/module/mempool/mock/chunk_requests.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -24,6 +24,10 @@ type ChunkRequests struct { func (_m *ChunkRequests) Add(request *verification.ChunkDataPackRequest) bool { ret := _m.Called(request) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*verification.ChunkDataPackRequest) bool); ok { r0 = rf(request) @@ -38,6 +42,10 @@ func (_m *ChunkRequests) Add(request *verification.ChunkDataPackRequest) bool { func (_m *ChunkRequests) All() verification.ChunkDataPackRequestInfoList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 verification.ChunkDataPackRequestInfoList if rf, ok := ret.Get(0).(func() verification.ChunkDataPackRequestInfoList); ok { r0 = rf() @@ -54,6 +62,10 @@ func (_m *ChunkRequests) All() verification.ChunkDataPackRequestInfoList { func (_m *ChunkRequests) IncrementAttempt(chunkID flow.Identifier) bool { ret := _m.Called(chunkID) + if len(ret) == 0 { + panic("no return value specified for IncrementAttempt") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(chunkID) @@ -68,6 +80,10 @@ func (_m *ChunkRequests) IncrementAttempt(chunkID flow.Identifier) bool { func (_m *ChunkRequests) PopAll(chunkID flow.Identifier) (chunks.LocatorMap, bool) { ret := _m.Called(chunkID) + if len(ret) == 0 { + panic("no return value specified for PopAll") + } + var r0 chunks.LocatorMap var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (chunks.LocatorMap, bool)); ok { @@ -94,6 +110,10 @@ func (_m *ChunkRequests) PopAll(chunkID flow.Identifier) (chunks.LocatorMap, boo func (_m *ChunkRequests) Remove(chunkID flow.Identifier) bool { ret := _m.Called(chunkID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(chunkID) @@ -108,6 +128,10 @@ func (_m *ChunkRequests) Remove(chunkID flow.Identifier) bool { func (_m *ChunkRequests) RequestHistory(chunkID flow.Identifier) (uint64, time.Time, time.Duration, bool) { ret := _m.Called(chunkID) + if len(ret) == 0 { + panic("no return value specified for RequestHistory") + } + var r0 uint64 var r1 time.Time var r2 time.Duration @@ -146,6 +170,10 @@ func (_m *ChunkRequests) RequestHistory(chunkID flow.Identifier) (uint64, time.T func (_m *ChunkRequests) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -160,6 +188,10 @@ func (_m *ChunkRequests) Size() uint { func (_m *ChunkRequests) UpdateRequestHistory(chunkID flow.Identifier, updater mempool.ChunkRequestHistoryUpdaterFunc) (uint64, time.Time, time.Duration, bool) { ret := _m.Called(chunkID, updater) + if len(ret) == 0 { + panic("no return value specified for UpdateRequestHistory") + } + var r0 uint64 var r1 time.Time var r2 time.Duration @@ -194,13 +226,12 @@ func (_m *ChunkRequests) UpdateRequestHistory(chunkID flow.Identifier, updater m return r0, r1, r2, r3 } -type mockConstructorTestingTNewChunkRequests interface { +// NewChunkRequests creates a new instance of ChunkRequests. 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 NewChunkRequests(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkRequests creates a new instance of ChunkRequests. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkRequests(t mockConstructorTestingTNewChunkRequests) *ChunkRequests { +}) *ChunkRequests { mock := &ChunkRequests{} mock.Mock.Test(t) diff --git a/module/mempool/mock/chunk_statuses.go b/module/mempool/mock/chunk_statuses.go index a3fbffe6ca7..8174a28c301 100644 --- a/module/mempool/mock/chunk_statuses.go +++ b/module/mempool/mock/chunk_statuses.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -19,6 +19,10 @@ type ChunkStatuses struct { func (_m *ChunkStatuses) Add(status *verification.ChunkStatus) bool { ret := _m.Called(status) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*verification.ChunkStatus) bool); ok { r0 = rf(status) @@ -33,6 +37,10 @@ func (_m *ChunkStatuses) Add(status *verification.ChunkStatus) bool { func (_m *ChunkStatuses) All() []*verification.ChunkStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*verification.ChunkStatus if rf, ok := ret.Get(0).(func() []*verification.ChunkStatus); ok { r0 = rf() @@ -49,6 +57,10 @@ func (_m *ChunkStatuses) All() []*verification.ChunkStatus { func (_m *ChunkStatuses) Get(chunkIndex uint64, resultID flow.Identifier) (*verification.ChunkStatus, bool) { ret := _m.Called(chunkIndex, resultID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *verification.ChunkStatus var r1 bool if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (*verification.ChunkStatus, bool)); ok { @@ -75,6 +87,10 @@ func (_m *ChunkStatuses) Get(chunkIndex uint64, resultID flow.Identifier) (*veri func (_m *ChunkStatuses) Remove(chunkIndex uint64, resultID flow.Identifier) bool { ret := _m.Called(chunkIndex, resultID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) bool); ok { r0 = rf(chunkIndex, resultID) @@ -89,6 +105,10 @@ func (_m *ChunkStatuses) Remove(chunkIndex uint64, resultID flow.Identifier) boo func (_m *ChunkStatuses) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -99,13 +119,12 @@ func (_m *ChunkStatuses) Size() uint { return r0 } -type mockConstructorTestingTNewChunkStatuses interface { +// NewChunkStatuses creates a new instance of ChunkStatuses. 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 NewChunkStatuses(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkStatuses creates a new instance of ChunkStatuses. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkStatuses(t mockConstructorTestingTNewChunkStatuses) *ChunkStatuses { +}) *ChunkStatuses { mock := &ChunkStatuses{} mock.Mock.Test(t) diff --git a/module/mempool/mock/collections.go b/module/mempool/mock/collections.go index 04d143f8773..d6d8d477b81 100644 --- a/module/mempool/mock/collections.go +++ b/module/mempool/mock/collections.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type Collections struct { func (_m *Collections) Add(coll *flow.Collection) bool { ret := _m.Called(coll) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.Collection) bool); ok { r0 = rf(coll) @@ -31,6 +35,10 @@ func (_m *Collections) Add(coll *flow.Collection) bool { func (_m *Collections) All() []*flow.Collection { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*flow.Collection if rf, ok := ret.Get(0).(func() []*flow.Collection); ok { r0 = rf() @@ -47,6 +55,10 @@ func (_m *Collections) All() []*flow.Collection { func (_m *Collections) ByID(collID flow.Identifier) (*flow.Collection, bool) { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.Collection var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Collection, bool)); ok { @@ -73,6 +85,10 @@ func (_m *Collections) ByID(collID flow.Identifier) (*flow.Collection, bool) { func (_m *Collections) Has(collID flow.Identifier) bool { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(collID) @@ -87,6 +103,10 @@ func (_m *Collections) Has(collID flow.Identifier) bool { func (_m *Collections) Remove(collID flow.Identifier) bool { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(collID) @@ -101,6 +121,10 @@ func (_m *Collections) Remove(collID flow.Identifier) bool { func (_m *Collections) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -111,13 +135,12 @@ func (_m *Collections) Size() uint { return r0 } -type mockConstructorTestingTNewCollections interface { +// NewCollections creates a new instance of Collections. 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 NewCollections(t interface { mock.TestingT Cleanup(func()) -} - -// NewCollections creates a new instance of Collections. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCollections(t mockConstructorTestingTNewCollections) *Collections { +}) *Collections { mock := &Collections{} mock.Mock.Test(t) diff --git a/module/mempool/mock/dns_cache.go b/module/mempool/mock/dns_cache.go index b95edca4789..80f6f17dd54 100644 --- a/module/mempool/mock/dns_cache.go +++ b/module/mempool/mock/dns_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -18,6 +18,10 @@ type DNSCache struct { func (_m *DNSCache) GetDomainIp(_a0 string) (*mempool.IpRecord, bool) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetDomainIp") + } + var r0 *mempool.IpRecord var r1 bool if rf, ok := ret.Get(0).(func(string) (*mempool.IpRecord, bool)); ok { @@ -44,6 +48,10 @@ func (_m *DNSCache) GetDomainIp(_a0 string) (*mempool.IpRecord, bool) { func (_m *DNSCache) GetTxtRecord(_a0 string) (*mempool.TxtRecord, bool) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetTxtRecord") + } + var r0 *mempool.TxtRecord var r1 bool if rf, ok := ret.Get(0).(func(string) (*mempool.TxtRecord, bool)); ok { @@ -70,6 +78,10 @@ func (_m *DNSCache) GetTxtRecord(_a0 string) (*mempool.TxtRecord, bool) { func (_m *DNSCache) LockIPDomain(_a0 string) (bool, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LockIPDomain") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -94,6 +106,10 @@ func (_m *DNSCache) LockIPDomain(_a0 string) (bool, error) { func (_m *DNSCache) LockTxtRecord(_a0 string) (bool, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LockTxtRecord") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(string) (bool, error)); ok { @@ -118,6 +134,10 @@ func (_m *DNSCache) LockTxtRecord(_a0 string) (bool, error) { func (_m *DNSCache) PutIpDomain(_a0 string, _a1 []net.IPAddr, _a2 int64) bool { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for PutIpDomain") + } + var r0 bool if rf, ok := ret.Get(0).(func(string, []net.IPAddr, int64) bool); ok { r0 = rf(_a0, _a1, _a2) @@ -132,6 +152,10 @@ func (_m *DNSCache) PutIpDomain(_a0 string, _a1 []net.IPAddr, _a2 int64) bool { func (_m *DNSCache) PutTxtRecord(_a0 string, _a1 []string, _a2 int64) bool { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for PutTxtRecord") + } + var r0 bool if rf, ok := ret.Get(0).(func(string, []string, int64) bool); ok { r0 = rf(_a0, _a1, _a2) @@ -146,6 +170,10 @@ func (_m *DNSCache) PutTxtRecord(_a0 string, _a1 []string, _a2 int64) bool { func (_m *DNSCache) RemoveIp(_a0 string) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for RemoveIp") + } + var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(_a0) @@ -160,6 +188,10 @@ func (_m *DNSCache) RemoveIp(_a0 string) bool { func (_m *DNSCache) RemoveTxt(_a0 string) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for RemoveTxt") + } + var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(_a0) @@ -174,6 +206,10 @@ func (_m *DNSCache) RemoveTxt(_a0 string) bool { func (_m *DNSCache) Size() (uint, uint) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint var r1 uint if rf, ok := ret.Get(0).(func() (uint, uint)); ok { @@ -198,6 +234,10 @@ func (_m *DNSCache) Size() (uint, uint) { func (_m *DNSCache) UpdateIPDomain(_a0 string, _a1 []net.IPAddr, _a2 int64) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for UpdateIPDomain") + } + var r0 error if rf, ok := ret.Get(0).(func(string, []net.IPAddr, int64) error); ok { r0 = rf(_a0, _a1, _a2) @@ -212,6 +252,10 @@ func (_m *DNSCache) UpdateIPDomain(_a0 string, _a1 []net.IPAddr, _a2 int64) erro func (_m *DNSCache) UpdateTxtRecord(_a0 string, _a1 []string, _a2 int64) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for UpdateTxtRecord") + } + var r0 error if rf, ok := ret.Get(0).(func(string, []string, int64) error); ok { r0 = rf(_a0, _a1, _a2) @@ -222,13 +266,12 @@ func (_m *DNSCache) UpdateTxtRecord(_a0 string, _a1 []string, _a2 int64) error { return r0 } -type mockConstructorTestingTNewDNSCache interface { +// NewDNSCache creates a new instance of DNSCache. 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 NewDNSCache(t interface { mock.TestingT Cleanup(func()) -} - -// NewDNSCache creates a new instance of DNSCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDNSCache(t mockConstructorTestingTNewDNSCache) *DNSCache { +}) *DNSCache { mock := &DNSCache{} mock.Mock.Test(t) diff --git a/module/mempool/mock/execution_data.go b/module/mempool/mock/execution_data.go index 9a9b1669daf..ac71d51b99d 100644 --- a/module/mempool/mock/execution_data.go +++ b/module/mempool/mock/execution_data.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -18,6 +18,10 @@ type ExecutionData struct { func (_m *ExecutionData) Add(_a0 *execution_data.BlockExecutionDataEntity) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*execution_data.BlockExecutionDataEntity) bool); ok { r0 = rf(_a0) @@ -32,6 +36,10 @@ func (_m *ExecutionData) Add(_a0 *execution_data.BlockExecutionDataEntity) bool func (_m *ExecutionData) All() []*execution_data.BlockExecutionDataEntity { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*execution_data.BlockExecutionDataEntity if rf, ok := ret.Get(0).(func() []*execution_data.BlockExecutionDataEntity); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *ExecutionData) All() []*execution_data.BlockExecutionDataEntity { func (_m *ExecutionData) ByID(_a0 flow.Identifier) (*execution_data.BlockExecutionDataEntity, bool) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *execution_data.BlockExecutionDataEntity var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*execution_data.BlockExecutionDataEntity, bool)); ok { @@ -79,6 +91,10 @@ func (_m *ExecutionData) Clear() { func (_m *ExecutionData) Has(_a0 flow.Identifier) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(_a0) @@ -93,6 +109,10 @@ func (_m *ExecutionData) Has(_a0 flow.Identifier) bool { func (_m *ExecutionData) Remove(_a0 flow.Identifier) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(_a0) @@ -107,6 +127,10 @@ func (_m *ExecutionData) Remove(_a0 flow.Identifier) bool { func (_m *ExecutionData) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -117,13 +141,12 @@ func (_m *ExecutionData) Size() uint { return r0 } -type mockConstructorTestingTNewExecutionData interface { +// NewExecutionData creates a new instance of ExecutionData. 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 NewExecutionData(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionData creates a new instance of ExecutionData. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionData(t mockConstructorTestingTNewExecutionData) *ExecutionData { +}) *ExecutionData { mock := &ExecutionData{} mock.Mock.Test(t) diff --git a/module/mempool/mock/execution_tree.go b/module/mempool/mock/execution_tree.go index f3bb8c4d90d..4afb4186aed 100644 --- a/module/mempool/mock/execution_tree.go +++ b/module/mempool/mock/execution_tree.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -18,6 +18,10 @@ type ExecutionTree struct { func (_m *ExecutionTree) AddReceipt(receipt *flow.ExecutionReceipt, block *flow.Header) (bool, error) { ret := _m.Called(receipt, block) + if len(ret) == 0 { + panic("no return value specified for AddReceipt") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt, *flow.Header) (bool, error)); ok { @@ -42,6 +46,10 @@ func (_m *ExecutionTree) AddReceipt(receipt *flow.ExecutionReceipt, block *flow. func (_m *ExecutionTree) AddResult(result *flow.ExecutionResult, block *flow.Header) error { ret := _m.Called(result, block) + if len(ret) == 0 { + panic("no return value specified for AddResult") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionResult, *flow.Header) error); ok { r0 = rf(result, block) @@ -56,6 +64,10 @@ func (_m *ExecutionTree) AddResult(result *flow.ExecutionResult, block *flow.Hea func (_m *ExecutionTree) HasReceipt(receipt *flow.ExecutionReceipt) bool { ret := _m.Called(receipt) + if len(ret) == 0 { + panic("no return value specified for HasReceipt") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) bool); ok { r0 = rf(receipt) @@ -70,6 +82,10 @@ func (_m *ExecutionTree) HasReceipt(receipt *flow.ExecutionReceipt) bool { func (_m *ExecutionTree) LowestHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LowestHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -84,6 +100,10 @@ func (_m *ExecutionTree) LowestHeight() uint64 { func (_m *ExecutionTree) PruneUpToHeight(newLowestHeight uint64) error { ret := _m.Called(newLowestHeight) + if len(ret) == 0 { + panic("no return value specified for PruneUpToHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(newLowestHeight) @@ -98,6 +118,10 @@ func (_m *ExecutionTree) PruneUpToHeight(newLowestHeight uint64) error { func (_m *ExecutionTree) ReachableReceipts(resultID flow.Identifier, blockFilter mempool.BlockFilter, receiptFilter mempool.ReceiptFilter) ([]*flow.ExecutionReceipt, error) { ret := _m.Called(resultID, blockFilter, receiptFilter) + if len(ret) == 0 { + panic("no return value specified for ReachableReceipts") + } + var r0 []*flow.ExecutionReceipt var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, mempool.BlockFilter, mempool.ReceiptFilter) ([]*flow.ExecutionReceipt, error)); ok { @@ -124,6 +148,10 @@ func (_m *ExecutionTree) ReachableReceipts(resultID flow.Identifier, blockFilter func (_m *ExecutionTree) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -134,13 +162,12 @@ func (_m *ExecutionTree) Size() uint { return r0 } -type mockConstructorTestingTNewExecutionTree interface { +// NewExecutionTree creates a new instance of ExecutionTree. 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 NewExecutionTree(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionTree creates a new instance of ExecutionTree. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionTree(t mockConstructorTestingTNewExecutionTree) *ExecutionTree { +}) *ExecutionTree { mock := &ExecutionTree{} mock.Mock.Test(t) diff --git a/module/mempool/mock/guarantees.go b/module/mempool/mock/guarantees.go index 18a83de6979..9d7cfb49425 100644 --- a/module/mempool/mock/guarantees.go +++ b/module/mempool/mock/guarantees.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type Guarantees struct { func (_m *Guarantees) Add(guarantee *flow.CollectionGuarantee) bool { ret := _m.Called(guarantee) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.CollectionGuarantee) bool); ok { r0 = rf(guarantee) @@ -31,6 +35,10 @@ func (_m *Guarantees) Add(guarantee *flow.CollectionGuarantee) bool { func (_m *Guarantees) All() []*flow.CollectionGuarantee { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*flow.CollectionGuarantee if rf, ok := ret.Get(0).(func() []*flow.CollectionGuarantee); ok { r0 = rf() @@ -47,6 +55,10 @@ func (_m *Guarantees) All() []*flow.CollectionGuarantee { func (_m *Guarantees) ByID(collID flow.Identifier) (*flow.CollectionGuarantee, bool) { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.CollectionGuarantee var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.CollectionGuarantee, bool)); ok { @@ -73,6 +85,10 @@ func (_m *Guarantees) ByID(collID flow.Identifier) (*flow.CollectionGuarantee, b func (_m *Guarantees) Has(collID flow.Identifier) bool { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(collID) @@ -87,6 +103,10 @@ func (_m *Guarantees) Has(collID flow.Identifier) bool { func (_m *Guarantees) Remove(collID flow.Identifier) bool { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(collID) @@ -101,6 +121,10 @@ func (_m *Guarantees) Remove(collID flow.Identifier) bool { func (_m *Guarantees) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -111,13 +135,12 @@ func (_m *Guarantees) Size() uint { return r0 } -type mockConstructorTestingTNewGuarantees interface { +// NewGuarantees creates a new instance of Guarantees. 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 NewGuarantees(t interface { mock.TestingT Cleanup(func()) -} - -// NewGuarantees creates a new instance of Guarantees. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGuarantees(t mockConstructorTestingTNewGuarantees) *Guarantees { +}) *Guarantees { mock := &Guarantees{} mock.Mock.Test(t) diff --git a/module/mempool/mock/identifier_map.go b/module/mempool/mock/identifier_map.go index 6ab8567fda5..6423a8e8a76 100644 --- a/module/mempool/mock/identifier_map.go +++ b/module/mempool/mock/identifier_map.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type IdentifierMap struct { func (_m *IdentifierMap) Append(key flow.Identifier, id flow.Identifier) error { ret := _m.Called(key, id) + if len(ret) == 0 { + panic("no return value specified for Append") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { r0 = rf(key, id) @@ -31,6 +35,10 @@ func (_m *IdentifierMap) Append(key flow.Identifier, id flow.Identifier) error { func (_m *IdentifierMap) Get(key flow.Identifier) ([]flow.Identifier, bool) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 []flow.Identifier var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.Identifier, bool)); ok { @@ -57,6 +65,10 @@ func (_m *IdentifierMap) Get(key flow.Identifier) ([]flow.Identifier, bool) { func (_m *IdentifierMap) Has(key flow.Identifier) bool { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(key) @@ -71,6 +83,10 @@ func (_m *IdentifierMap) Has(key flow.Identifier) bool { func (_m *IdentifierMap) Keys() ([]flow.Identifier, bool) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Keys") + } + var r0 []flow.Identifier var r1 bool if rf, ok := ret.Get(0).(func() ([]flow.Identifier, bool)); ok { @@ -97,6 +113,10 @@ func (_m *IdentifierMap) Keys() ([]flow.Identifier, bool) { func (_m *IdentifierMap) Remove(key flow.Identifier) bool { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(key) @@ -111,6 +131,10 @@ func (_m *IdentifierMap) Remove(key flow.Identifier) bool { func (_m *IdentifierMap) RemoveIdFromKey(key flow.Identifier, id flow.Identifier) error { ret := _m.Called(key, id) + if len(ret) == 0 { + panic("no return value specified for RemoveIdFromKey") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { r0 = rf(key, id) @@ -125,6 +149,10 @@ func (_m *IdentifierMap) RemoveIdFromKey(key flow.Identifier, id flow.Identifier func (_m *IdentifierMap) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -135,13 +163,12 @@ func (_m *IdentifierMap) Size() uint { return r0 } -type mockConstructorTestingTNewIdentifierMap interface { +// NewIdentifierMap creates a new instance of IdentifierMap. 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 NewIdentifierMap(t interface { mock.TestingT Cleanup(func()) -} - -// NewIdentifierMap creates a new instance of IdentifierMap. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIdentifierMap(t mockConstructorTestingTNewIdentifierMap) *IdentifierMap { +}) *IdentifierMap { mock := &IdentifierMap{} mock.Mock.Test(t) diff --git a/module/mempool/mock/incorporated_result_seals.go b/module/mempool/mock/incorporated_result_seals.go index dafe6d7bb03..528a7e8d802 100644 --- a/module/mempool/mock/incorporated_result_seals.go +++ b/module/mempool/mock/incorporated_result_seals.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type IncorporatedResultSeals struct { func (_m *IncorporatedResultSeals) Add(irSeal *flow.IncorporatedResultSeal) (bool, error) { ret := _m.Called(irSeal) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*flow.IncorporatedResultSeal) (bool, error)); ok { @@ -41,6 +45,10 @@ func (_m *IncorporatedResultSeals) Add(irSeal *flow.IncorporatedResultSeal) (boo func (_m *IncorporatedResultSeals) All() []*flow.IncorporatedResultSeal { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*flow.IncorporatedResultSeal if rf, ok := ret.Get(0).(func() []*flow.IncorporatedResultSeal); ok { r0 = rf() @@ -57,6 +65,10 @@ func (_m *IncorporatedResultSeals) All() []*flow.IncorporatedResultSeal { func (_m *IncorporatedResultSeals) ByID(_a0 flow.Identifier) (*flow.IncorporatedResultSeal, bool) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.IncorporatedResultSeal var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.IncorporatedResultSeal, bool)); ok { @@ -88,6 +100,10 @@ func (_m *IncorporatedResultSeals) Clear() { func (_m *IncorporatedResultSeals) Limit() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Limit") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -102,6 +118,10 @@ func (_m *IncorporatedResultSeals) Limit() uint { func (_m *IncorporatedResultSeals) PruneUpToHeight(height uint64) error { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for PruneUpToHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(height) @@ -116,6 +136,10 @@ func (_m *IncorporatedResultSeals) PruneUpToHeight(height uint64) error { func (_m *IncorporatedResultSeals) Remove(incorporatedResultID flow.Identifier) bool { ret := _m.Called(incorporatedResultID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(incorporatedResultID) @@ -130,6 +154,10 @@ func (_m *IncorporatedResultSeals) Remove(incorporatedResultID flow.Identifier) func (_m *IncorporatedResultSeals) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -140,13 +168,12 @@ func (_m *IncorporatedResultSeals) Size() uint { return r0 } -type mockConstructorTestingTNewIncorporatedResultSeals interface { +// NewIncorporatedResultSeals creates a new instance of IncorporatedResultSeals. 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 NewIncorporatedResultSeals(t interface { mock.TestingT Cleanup(func()) -} - -// NewIncorporatedResultSeals creates a new instance of IncorporatedResultSeals. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIncorporatedResultSeals(t mockConstructorTestingTNewIncorporatedResultSeals) *IncorporatedResultSeals { +}) *IncorporatedResultSeals { mock := &IncorporatedResultSeals{} mock.Mock.Test(t) diff --git a/module/mempool/mock/on_ejection.go b/module/mempool/mock/on_ejection.go index 266c44b076c..8794dcb9e5b 100644 --- a/module/mempool/mock/on_ejection.go +++ b/module/mempool/mock/on_ejection.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -18,13 +18,12 @@ func (_m *OnEjection) Execute(_a0 flow.Entity) { _m.Called(_a0) } -type mockConstructorTestingTNewOnEjection interface { +// NewOnEjection creates a new instance of OnEjection. 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 NewOnEjection(t interface { mock.TestingT Cleanup(func()) -} - -// NewOnEjection creates a new instance of OnEjection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOnEjection(t mockConstructorTestingTNewOnEjection) *OnEjection { +}) *OnEjection { mock := &OnEjection{} mock.Mock.Test(t) diff --git a/module/mempool/mock/pending_receipts.go b/module/mempool/mock/pending_receipts.go index 9ad0910aea4..5d98ed46d2c 100644 --- a/module/mempool/mock/pending_receipts.go +++ b/module/mempool/mock/pending_receipts.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type PendingReceipts struct { func (_m *PendingReceipts) Add(receipt *flow.ExecutionReceipt) bool { ret := _m.Called(receipt) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) bool); ok { r0 = rf(receipt) @@ -31,6 +35,10 @@ func (_m *PendingReceipts) Add(receipt *flow.ExecutionReceipt) bool { func (_m *PendingReceipts) ByPreviousResultID(previousReusltID flow.Identifier) []*flow.ExecutionReceipt { ret := _m.Called(previousReusltID) + if len(ret) == 0 { + panic("no return value specified for ByPreviousResultID") + } + var r0 []*flow.ExecutionReceipt if rf, ok := ret.Get(0).(func(flow.Identifier) []*flow.ExecutionReceipt); ok { r0 = rf(previousReusltID) @@ -47,6 +55,10 @@ func (_m *PendingReceipts) ByPreviousResultID(previousReusltID flow.Identifier) func (_m *PendingReceipts) PruneUpToHeight(height uint64) error { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for PruneUpToHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(height) @@ -61,6 +73,10 @@ func (_m *PendingReceipts) PruneUpToHeight(height uint64) error { func (_m *PendingReceipts) Remove(receiptID flow.Identifier) bool { ret := _m.Called(receiptID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(receiptID) @@ -71,13 +87,12 @@ func (_m *PendingReceipts) Remove(receiptID flow.Identifier) bool { return r0 } -type mockConstructorTestingTNewPendingReceipts interface { +// NewPendingReceipts creates a new instance of PendingReceipts. 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 NewPendingReceipts(t interface { mock.TestingT Cleanup(func()) -} - -// NewPendingReceipts creates a new instance of PendingReceipts. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPendingReceipts(t mockConstructorTestingTNewPendingReceipts) *PendingReceipts { +}) *PendingReceipts { mock := &PendingReceipts{} mock.Mock.Test(t) diff --git a/module/mempool/mock/receipt_filter.go b/module/mempool/mock/receipt_filter.go index f3cdcec50c1..78d306b751f 100644 --- a/module/mempool/mock/receipt_filter.go +++ b/module/mempool/mock/receipt_filter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type ReceiptFilter struct { func (_m *ReceiptFilter) Execute(receipt *flow.ExecutionReceipt) bool { ret := _m.Called(receipt) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) bool); ok { r0 = rf(receipt) @@ -27,13 +31,12 @@ func (_m *ReceiptFilter) Execute(receipt *flow.ExecutionReceipt) bool { return r0 } -type mockConstructorTestingTNewReceiptFilter interface { +// NewReceiptFilter creates a new instance of ReceiptFilter. 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 NewReceiptFilter(t interface { mock.TestingT Cleanup(func()) -} - -// NewReceiptFilter creates a new instance of ReceiptFilter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReceiptFilter(t mockConstructorTestingTNewReceiptFilter) *ReceiptFilter { +}) *ReceiptFilter { mock := &ReceiptFilter{} mock.Mock.Test(t) diff --git a/module/mempool/mock/results.go b/module/mempool/mock/results.go index 199f146b512..5af473bba21 100644 --- a/module/mempool/mock/results.go +++ b/module/mempool/mock/results.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type Results struct { func (_m *Results) Add(result *flow.ExecutionResult) bool { ret := _m.Called(result) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.ExecutionResult) bool); ok { r0 = rf(result) @@ -31,6 +35,10 @@ func (_m *Results) Add(result *flow.ExecutionResult) bool { func (_m *Results) All() []*flow.ExecutionResult { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*flow.ExecutionResult if rf, ok := ret.Get(0).(func() []*flow.ExecutionResult); ok { r0 = rf() @@ -47,6 +55,10 @@ func (_m *Results) All() []*flow.ExecutionResult { func (_m *Results) ByID(resultID flow.Identifier) (*flow.ExecutionResult, bool) { ret := _m.Called(resultID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.ExecutionResult var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ExecutionResult, bool)); ok { @@ -73,6 +85,10 @@ func (_m *Results) ByID(resultID flow.Identifier) (*flow.ExecutionResult, bool) func (_m *Results) Has(resultID flow.Identifier) bool { ret := _m.Called(resultID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(resultID) @@ -87,6 +103,10 @@ func (_m *Results) Has(resultID flow.Identifier) bool { func (_m *Results) Remove(resultID flow.Identifier) bool { ret := _m.Called(resultID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(resultID) @@ -101,6 +121,10 @@ func (_m *Results) Remove(resultID flow.Identifier) bool { func (_m *Results) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -111,13 +135,12 @@ func (_m *Results) Size() uint { return r0 } -type mockConstructorTestingTNewResults interface { +// NewResults creates a new instance of Results. 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 NewResults(t interface { mock.TestingT Cleanup(func()) -} - -// NewResults creates a new instance of Results. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewResults(t mockConstructorTestingTNewResults) *Results { +}) *Results { mock := &Results{} mock.Mock.Test(t) diff --git a/module/mempool/mock/transaction_timings.go b/module/mempool/mock/transaction_timings.go index 69ba557458d..8c622697fab 100644 --- a/module/mempool/mock/transaction_timings.go +++ b/module/mempool/mock/transaction_timings.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type TransactionTimings struct { func (_m *TransactionTimings) Add(tx *flow.TransactionTiming) bool { ret := _m.Called(tx) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.TransactionTiming) bool); ok { r0 = rf(tx) @@ -31,6 +35,10 @@ func (_m *TransactionTimings) Add(tx *flow.TransactionTiming) bool { func (_m *TransactionTimings) Adjust(txID flow.Identifier, f func(*flow.TransactionTiming) *flow.TransactionTiming) (*flow.TransactionTiming, bool) { ret := _m.Called(txID, f) + if len(ret) == 0 { + panic("no return value specified for Adjust") + } + var r0 *flow.TransactionTiming var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier, func(*flow.TransactionTiming) *flow.TransactionTiming) (*flow.TransactionTiming, bool)); ok { @@ -57,6 +65,10 @@ func (_m *TransactionTimings) Adjust(txID flow.Identifier, f func(*flow.Transact func (_m *TransactionTimings) All() []*flow.TransactionTiming { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*flow.TransactionTiming if rf, ok := ret.Get(0).(func() []*flow.TransactionTiming); ok { r0 = rf() @@ -73,6 +85,10 @@ func (_m *TransactionTimings) All() []*flow.TransactionTiming { func (_m *TransactionTimings) ByID(txID flow.Identifier) (*flow.TransactionTiming, bool) { ret := _m.Called(txID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.TransactionTiming var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.TransactionTiming, bool)); ok { @@ -99,6 +115,10 @@ func (_m *TransactionTimings) ByID(txID flow.Identifier) (*flow.TransactionTimin func (_m *TransactionTimings) Remove(txID flow.Identifier) bool { ret := _m.Called(txID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(txID) @@ -109,13 +129,12 @@ func (_m *TransactionTimings) Remove(txID flow.Identifier) bool { return r0 } -type mockConstructorTestingTNewTransactionTimings interface { +// NewTransactionTimings creates a new instance of TransactionTimings. 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 NewTransactionTimings(t interface { mock.TestingT Cleanup(func()) -} - -// NewTransactionTimings creates a new instance of TransactionTimings. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransactionTimings(t mockConstructorTestingTNewTransactionTimings) *TransactionTimings { +}) *TransactionTimings { mock := &TransactionTimings{} mock.Mock.Test(t) diff --git a/module/mempool/mock/transactions.go b/module/mempool/mock/transactions.go index 96a14fc3b19..e79b6b3fef5 100644 --- a/module/mempool/mock/transactions.go +++ b/module/mempool/mock/transactions.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mempool @@ -17,6 +17,10 @@ type Transactions struct { func (_m *Transactions) Add(tx *flow.TransactionBody) bool { ret := _m.Called(tx) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.TransactionBody) bool); ok { r0 = rf(tx) @@ -31,6 +35,10 @@ func (_m *Transactions) Add(tx *flow.TransactionBody) bool { func (_m *Transactions) All() []*flow.TransactionBody { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []*flow.TransactionBody if rf, ok := ret.Get(0).(func() []*flow.TransactionBody); ok { r0 = rf() @@ -47,6 +55,10 @@ func (_m *Transactions) All() []*flow.TransactionBody { func (_m *Transactions) ByID(txID flow.Identifier) (*flow.TransactionBody, bool) { ret := _m.Called(txID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.TransactionBody var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.TransactionBody, bool)); ok { @@ -78,6 +90,10 @@ func (_m *Transactions) Clear() { func (_m *Transactions) Has(txID flow.Identifier) bool { ret := _m.Called(txID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(txID) @@ -92,6 +108,10 @@ func (_m *Transactions) Has(txID flow.Identifier) bool { func (_m *Transactions) Remove(txID flow.Identifier) bool { ret := _m.Called(txID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(txID) @@ -106,6 +126,10 @@ func (_m *Transactions) Remove(txID flow.Identifier) bool { func (_m *Transactions) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -116,13 +140,12 @@ func (_m *Transactions) Size() uint { return r0 } -type mockConstructorTestingTNewTransactions interface { +// NewTransactions creates a new instance of Transactions. 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 NewTransactions(t interface { mock.TestingT Cleanup(func()) -} - -// NewTransactions creates a new instance of Transactions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransactions(t mockConstructorTestingTNewTransactions) *Transactions { +}) *Transactions { mock := &Transactions{} mock.Mock.Test(t) diff --git a/module/mock/access_metrics.go b/module/mock/access_metrics.go index fa040b82154..9866ad90e02 100644 --- a/module/mock/access_metrics.go +++ b/module/mock/access_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -153,13 +153,12 @@ func (_m *AccessMetrics) UpdateLastFullBlockHeight(height uint64) { _m.Called(height) } -type mockConstructorTestingTNewAccessMetrics interface { +// NewAccessMetrics creates a new instance of AccessMetrics. 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 NewAccessMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewAccessMetrics creates a new instance of AccessMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAccessMetrics(t mockConstructorTestingTNewAccessMetrics) *AccessMetrics { +}) *AccessMetrics { mock := &AccessMetrics{} mock.Mock.Test(t) diff --git a/module/mock/alsp_metrics.go b/module/mock/alsp_metrics.go index 937a210d61a..a271ba15421 100644 --- a/module/mock/alsp_metrics.go +++ b/module/mock/alsp_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -14,13 +14,12 @@ func (_m *AlspMetrics) OnMisbehaviorReported(channel string, misbehaviorType str _m.Called(channel, misbehaviorType) } -type mockConstructorTestingTNewAlspMetrics interface { +// NewAlspMetrics creates a new instance of AlspMetrics. 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 NewAlspMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewAlspMetrics creates a new instance of AlspMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewAlspMetrics(t mockConstructorTestingTNewAlspMetrics) *AlspMetrics { +}) *AlspMetrics { mock := &AlspMetrics{} mock.Mock.Test(t) diff --git a/module/mock/backend_scripts_metrics.go b/module/mock/backend_scripts_metrics.go index 9af058f104e..c4ad1ea08a9 100644 --- a/module/mock/backend_scripts_metrics.go +++ b/module/mock/backend_scripts_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -53,13 +53,12 @@ func (_m *BackendScriptsMetrics) ScriptExecutionResultMismatch() { _m.Called() } -type mockConstructorTestingTNewBackendScriptsMetrics interface { +// NewBackendScriptsMetrics creates a new instance of BackendScriptsMetrics. 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 NewBackendScriptsMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewBackendScriptsMetrics creates a new instance of BackendScriptsMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBackendScriptsMetrics(t mockConstructorTestingTNewBackendScriptsMetrics) *BackendScriptsMetrics { +}) *BackendScriptsMetrics { mock := &BackendScriptsMetrics{} mock.Mock.Test(t) diff --git a/module/mock/bitswap_metrics.go b/module/mock/bitswap_metrics.go index 146a3398144..315bb7c8654 100644 --- a/module/mock/bitswap_metrics.go +++ b/module/mock/bitswap_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -54,13 +54,12 @@ func (_m *BitswapMetrics) Wantlist(prefix string, n int) { _m.Called(prefix, n) } -type mockConstructorTestingTNewBitswapMetrics interface { +// NewBitswapMetrics creates a new instance of BitswapMetrics. 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 NewBitswapMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewBitswapMetrics creates a new instance of BitswapMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBitswapMetrics(t mockConstructorTestingTNewBitswapMetrics) *BitswapMetrics { +}) *BitswapMetrics { mock := &BitswapMetrics{} mock.Mock.Test(t) diff --git a/module/mock/block_requester.go b/module/mock/block_requester.go index f877a2fcdb0..61aee785299 100644 --- a/module/mock/block_requester.go +++ b/module/mock/block_requester.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -27,13 +27,12 @@ func (_m *BlockRequester) RequestHeight(height uint64) { _m.Called(height) } -type mockConstructorTestingTNewBlockRequester interface { +// NewBlockRequester creates a new instance of BlockRequester. 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 NewBlockRequester(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockRequester creates a new instance of BlockRequester. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockRequester(t mockConstructorTestingTNewBlockRequester) *BlockRequester { +}) *BlockRequester { mock := &BlockRequester{} mock.Mock.Test(t) diff --git a/module/mock/builder.go b/module/mock/builder.go index ef109ae5689..f7943259c91 100644 --- a/module/mock/builder.go +++ b/module/mock/builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Builder struct { func (_m *Builder) BuildOn(parentID flow.Identifier, setter func(*flow.Header) error, sign func(*flow.Header) error) (*flow.Header, error) { ret := _m.Called(parentID, setter, sign) + if len(ret) == 0 { + panic("no return value specified for BuildOn") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, func(*flow.Header) error, func(*flow.Header) error) (*flow.Header, error)); ok { @@ -38,13 +42,12 @@ func (_m *Builder) BuildOn(parentID flow.Identifier, setter func(*flow.Header) e return r0, r1 } -type mockConstructorTestingTNewBuilder interface { +// NewBuilder creates a new instance of Builder. 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 NewBuilder(t interface { mock.TestingT Cleanup(func()) -} - -// NewBuilder creates a new instance of Builder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBuilder(t mockConstructorTestingTNewBuilder) *Builder { +}) *Builder { mock := &Builder{} mock.Mock.Test(t) diff --git a/module/mock/cache_metrics.go b/module/mock/cache_metrics.go index 035f136bddc..278f6e030bb 100644 --- a/module/mock/cache_metrics.go +++ b/module/mock/cache_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -29,13 +29,12 @@ func (_m *CacheMetrics) CacheNotFound(resource string) { _m.Called(resource) } -type mockConstructorTestingTNewCacheMetrics interface { +// NewCacheMetrics creates a new instance of CacheMetrics. 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 NewCacheMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewCacheMetrics creates a new instance of CacheMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCacheMetrics(t mockConstructorTestingTNewCacheMetrics) *CacheMetrics { +}) *CacheMetrics { mock := &CacheMetrics{} mock.Mock.Test(t) diff --git a/module/mock/chain_sync_metrics.go b/module/mock/chain_sync_metrics.go index 47b2192ddb9..703e4a712af 100644 --- a/module/mock/chain_sync_metrics.go +++ b/module/mock/chain_sync_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -37,13 +37,12 @@ func (_m *ChainSyncMetrics) RangeRequested(ran chainsync.Range) { _m.Called(ran) } -type mockConstructorTestingTNewChainSyncMetrics interface { +// NewChainSyncMetrics creates a new instance of ChainSyncMetrics. 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 NewChainSyncMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewChainSyncMetrics creates a new instance of ChainSyncMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChainSyncMetrics(t mockConstructorTestingTNewChainSyncMetrics) *ChainSyncMetrics { +}) *ChainSyncMetrics { mock := &ChainSyncMetrics{} mock.Mock.Test(t) diff --git a/module/mock/chunk_assigner.go b/module/mock/chunk_assigner.go index 3acd354caf9..1e8ddad8c3e 100644 --- a/module/mock/chunk_assigner.go +++ b/module/mock/chunk_assigner.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ChunkAssigner struct { func (_m *ChunkAssigner) Assign(result *flow.ExecutionResult, blockID flow.Identifier) (*chunks.Assignment, error) { ret := _m.Called(result, blockID) + if len(ret) == 0 { + panic("no return value specified for Assign") + } + var r0 *chunks.Assignment var r1 error if rf, ok := ret.Get(0).(func(*flow.ExecutionResult, flow.Identifier) (*chunks.Assignment, error)); ok { @@ -40,13 +44,12 @@ func (_m *ChunkAssigner) Assign(result *flow.ExecutionResult, blockID flow.Ident return r0, r1 } -type mockConstructorTestingTNewChunkAssigner interface { +// NewChunkAssigner creates a new instance of ChunkAssigner. 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 NewChunkAssigner(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkAssigner creates a new instance of ChunkAssigner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkAssigner(t mockConstructorTestingTNewChunkAssigner) *ChunkAssigner { +}) *ChunkAssigner { mock := &ChunkAssigner{} mock.Mock.Test(t) diff --git a/module/mock/chunk_verifier.go b/module/mock/chunk_verifier.go index e9840b378b3..a2a1fa5d7db 100644 --- a/module/mock/chunk_verifier.go +++ b/module/mock/chunk_verifier.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,6 +17,10 @@ type ChunkVerifier struct { func (_m *ChunkVerifier) Verify(ch *verification.VerifiableChunkData) ([]byte, error) { ret := _m.Called(ch) + if len(ret) == 0 { + panic("no return value specified for Verify") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(*verification.VerifiableChunkData) ([]byte, error)); ok { @@ -39,13 +43,12 @@ func (_m *ChunkVerifier) Verify(ch *verification.VerifiableChunkData) ([]byte, e return r0, r1 } -type mockConstructorTestingTNewChunkVerifier interface { +// NewChunkVerifier creates a new instance of ChunkVerifier. 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 NewChunkVerifier(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkVerifier creates a new instance of ChunkVerifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkVerifier(t mockConstructorTestingTNewChunkVerifier) *ChunkVerifier { +}) *ChunkVerifier { mock := &ChunkVerifier{} mock.Mock.Test(t) diff --git a/module/mock/cleaner_metrics.go b/module/mock/cleaner_metrics.go index ad42918506e..3c5a6b6d8fd 100644 --- a/module/mock/cleaner_metrics.go +++ b/module/mock/cleaner_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,13 +18,12 @@ func (_m *CleanerMetrics) RanGC(took time.Duration) { _m.Called(took) } -type mockConstructorTestingTNewCleanerMetrics interface { +// NewCleanerMetrics creates a new instance of CleanerMetrics. 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 NewCleanerMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewCleanerMetrics creates a new instance of CleanerMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCleanerMetrics(t mockConstructorTestingTNewCleanerMetrics) *CleanerMetrics { +}) *CleanerMetrics { mock := &CleanerMetrics{} mock.Mock.Test(t) diff --git a/module/mock/cluster_root_qc_voter.go b/module/mock/cluster_root_qc_voter.go index a2b709459af..3006f4d33ab 100644 --- a/module/mock/cluster_root_qc_voter.go +++ b/module/mock/cluster_root_qc_voter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,6 +19,10 @@ type ClusterRootQCVoter struct { func (_m *ClusterRootQCVoter) Vote(_a0 context.Context, _a1 protocol.Epoch) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Vote") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, protocol.Epoch) error); ok { r0 = rf(_a0, _a1) @@ -29,13 +33,12 @@ func (_m *ClusterRootQCVoter) Vote(_a0 context.Context, _a1 protocol.Epoch) erro return r0 } -type mockConstructorTestingTNewClusterRootQCVoter interface { +// NewClusterRootQCVoter creates a new instance of ClusterRootQCVoter. 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 NewClusterRootQCVoter(t interface { mock.TestingT Cleanup(func()) -} - -// NewClusterRootQCVoter creates a new instance of ClusterRootQCVoter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClusterRootQCVoter(t mockConstructorTestingTNewClusterRootQCVoter) *ClusterRootQCVoter { +}) *ClusterRootQCVoter { mock := &ClusterRootQCVoter{} mock.Mock.Test(t) diff --git a/module/mock/collection_executed_metric.go b/module/mock/collection_executed_metric.go index 9cfe11a9767..5ff62872d97 100644 --- a/module/mock/collection_executed_metric.go +++ b/module/mock/collection_executed_metric.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -37,13 +37,12 @@ func (_m *CollectionExecutedMetric) UpdateLastFullBlockHeight(height uint64) { _m.Called(height) } -type mockConstructorTestingTNewCollectionExecutedMetric interface { +// NewCollectionExecutedMetric creates a new instance of CollectionExecutedMetric. 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 NewCollectionExecutedMetric(t interface { mock.TestingT Cleanup(func()) -} - -// NewCollectionExecutedMetric creates a new instance of CollectionExecutedMetric. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCollectionExecutedMetric(t mockConstructorTestingTNewCollectionExecutedMetric) *CollectionExecutedMetric { +}) *CollectionExecutedMetric { mock := &CollectionExecutedMetric{} mock.Mock.Test(t) diff --git a/module/mock/collection_metrics.go b/module/mock/collection_metrics.go index 3d1e0da64b6..bde071e902e 100644 --- a/module/mock/collection_metrics.go +++ b/module/mock/collection_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -29,13 +29,12 @@ func (_m *CollectionMetrics) TransactionIngested(txID flow.Identifier) { _m.Called(txID) } -type mockConstructorTestingTNewCollectionMetrics interface { +// NewCollectionMetrics creates a new instance of CollectionMetrics. 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 NewCollectionMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewCollectionMetrics creates a new instance of CollectionMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCollectionMetrics(t mockConstructorTestingTNewCollectionMetrics) *CollectionMetrics { +}) *CollectionMetrics { mock := &CollectionMetrics{} mock.Mock.Test(t) diff --git a/module/mock/compliance_metrics.go b/module/mock/compliance_metrics.go index 489d02d8d0d..137c00f96fa 100644 --- a/module/mock/compliance_metrics.go +++ b/module/mock/compliance_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -72,13 +72,12 @@ func (_m *ComplianceMetrics) SealedHeight(height uint64) { _m.Called(height) } -type mockConstructorTestingTNewComplianceMetrics interface { +// NewComplianceMetrics creates a new instance of ComplianceMetrics. 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 NewComplianceMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewComplianceMetrics creates a new instance of ComplianceMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewComplianceMetrics(t mockConstructorTestingTNewComplianceMetrics) *ComplianceMetrics { +}) *ComplianceMetrics { mock := &ComplianceMetrics{} mock.Mock.Test(t) diff --git a/module/mock/consensus_metrics.go b/module/mock/consensus_metrics.go index 776b8d7315c..4dbe6adda23 100644 --- a/module/mock/consensus_metrics.go +++ b/module/mock/consensus_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -54,13 +54,12 @@ func (_m *ConsensusMetrics) StartCollectionToFinalized(collectionID flow.Identif _m.Called(collectionID) } -type mockConstructorTestingTNewConsensusMetrics interface { +// NewConsensusMetrics creates a new instance of ConsensusMetrics. 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 NewConsensusMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewConsensusMetrics creates a new instance of ConsensusMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConsensusMetrics(t mockConstructorTestingTNewConsensusMetrics) *ConsensusMetrics { +}) *ConsensusMetrics { mock := &ConsensusMetrics{} mock.Mock.Test(t) diff --git a/module/mock/cruise_ctl_metrics.go b/module/mock/cruise_ctl_metrics.go index efe71f11aef..1a47561ccef 100644 --- a/module/mock/cruise_ctl_metrics.go +++ b/module/mock/cruise_ctl_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -33,13 +33,12 @@ func (_m *CruiseCtlMetrics) TargetProposalDuration(duration time.Duration) { _m.Called(duration) } -type mockConstructorTestingTNewCruiseCtlMetrics interface { +// NewCruiseCtlMetrics creates a new instance of CruiseCtlMetrics. 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 NewCruiseCtlMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewCruiseCtlMetrics creates a new instance of CruiseCtlMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCruiseCtlMetrics(t mockConstructorTestingTNewCruiseCtlMetrics) *CruiseCtlMetrics { +}) *CruiseCtlMetrics { mock := &CruiseCtlMetrics{} mock.Mock.Test(t) diff --git a/module/mock/dht_metrics.go b/module/mock/dht_metrics.go index 7edd231020f..dee607615db 100644 --- a/module/mock/dht_metrics.go +++ b/module/mock/dht_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,13 +19,12 @@ func (_m *DHTMetrics) RoutingTablePeerRemoved() { _m.Called() } -type mockConstructorTestingTNewDHTMetrics interface { +// NewDHTMetrics creates a new instance of DHTMetrics. 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 NewDHTMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewDHTMetrics creates a new instance of DHTMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDHTMetrics(t mockConstructorTestingTNewDHTMetrics) *DHTMetrics { +}) *DHTMetrics { mock := &DHTMetrics{} mock.Mock.Test(t) diff --git a/module/mock/dkg_broker.go b/module/mock/dkg_broker.go index f2b6372519c..016f0bb6fbb 100644 --- a/module/mock/dkg_broker.go +++ b/module/mock/dkg_broker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -35,6 +35,10 @@ func (_m *DKGBroker) FlagMisbehavior(participant int, log string) { func (_m *DKGBroker) GetBroadcastMsgCh() <-chan messages.BroadcastDKGMessage { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetBroadcastMsgCh") + } + var r0 <-chan messages.BroadcastDKGMessage if rf, ok := ret.Get(0).(func() <-chan messages.BroadcastDKGMessage); ok { r0 = rf() @@ -51,6 +55,10 @@ func (_m *DKGBroker) GetBroadcastMsgCh() <-chan messages.BroadcastDKGMessage { func (_m *DKGBroker) GetIndex() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetIndex") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -65,6 +73,10 @@ func (_m *DKGBroker) GetIndex() int { func (_m *DKGBroker) GetPrivateMsgCh() <-chan messages.PrivDKGMessageIn { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetPrivateMsgCh") + } + var r0 <-chan messages.PrivDKGMessageIn if rf, ok := ret.Get(0).(func() <-chan messages.PrivDKGMessageIn); ok { r0 = rf() @@ -81,6 +93,10 @@ func (_m *DKGBroker) GetPrivateMsgCh() <-chan messages.PrivDKGMessageIn { func (_m *DKGBroker) Poll(referenceBlock flow.Identifier) error { ret := _m.Called(referenceBlock) + if len(ret) == 0 { + panic("no return value specified for Poll") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { r0 = rf(referenceBlock) @@ -105,6 +121,10 @@ func (_m *DKGBroker) Shutdown() { func (_m *DKGBroker) SubmitResult(_a0 crypto.PublicKey, _a1 []crypto.PublicKey) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubmitResult") + } + var r0 error if rf, ok := ret.Get(0).(func(crypto.PublicKey, []crypto.PublicKey) error); ok { r0 = rf(_a0, _a1) @@ -115,13 +135,12 @@ func (_m *DKGBroker) SubmitResult(_a0 crypto.PublicKey, _a1 []crypto.PublicKey) return r0 } -type mockConstructorTestingTNewDKGBroker interface { +// NewDKGBroker creates a new instance of DKGBroker. 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 NewDKGBroker(t interface { mock.TestingT Cleanup(func()) -} - -// NewDKGBroker creates a new instance of DKGBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDKGBroker(t mockConstructorTestingTNewDKGBroker) *DKGBroker { +}) *DKGBroker { mock := &DKGBroker{} mock.Mock.Test(t) diff --git a/module/mock/dkg_contract_client.go b/module/mock/dkg_contract_client.go index 3a685819a34..3f5c6e72ed3 100644 --- a/module/mock/dkg_contract_client.go +++ b/module/mock/dkg_contract_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type DKGContractClient struct { func (_m *DKGContractClient) Broadcast(msg messages.BroadcastDKGMessage) error { ret := _m.Called(msg) + if len(ret) == 0 { + panic("no return value specified for Broadcast") + } + var r0 error if rf, ok := ret.Get(0).(func(messages.BroadcastDKGMessage) error); ok { r0 = rf(msg) @@ -34,6 +38,10 @@ func (_m *DKGContractClient) Broadcast(msg messages.BroadcastDKGMessage) error { func (_m *DKGContractClient) ReadBroadcast(fromIndex uint, referenceBlock flow.Identifier) ([]messages.BroadcastDKGMessage, error) { ret := _m.Called(fromIndex, referenceBlock) + if len(ret) == 0 { + panic("no return value specified for ReadBroadcast") + } + var r0 []messages.BroadcastDKGMessage var r1 error if rf, ok := ret.Get(0).(func(uint, flow.Identifier) ([]messages.BroadcastDKGMessage, error)); ok { @@ -60,6 +68,10 @@ func (_m *DKGContractClient) ReadBroadcast(fromIndex uint, referenceBlock flow.I func (_m *DKGContractClient) SubmitResult(_a0 crypto.PublicKey, _a1 []crypto.PublicKey) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SubmitResult") + } + var r0 error if rf, ok := ret.Get(0).(func(crypto.PublicKey, []crypto.PublicKey) error); ok { r0 = rf(_a0, _a1) @@ -70,13 +82,12 @@ func (_m *DKGContractClient) SubmitResult(_a0 crypto.PublicKey, _a1 []crypto.Pub return r0 } -type mockConstructorTestingTNewDKGContractClient interface { +// NewDKGContractClient creates a new instance of DKGContractClient. 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 NewDKGContractClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewDKGContractClient creates a new instance of DKGContractClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDKGContractClient(t mockConstructorTestingTNewDKGContractClient) *DKGContractClient { +}) *DKGContractClient { mock := &DKGContractClient{} mock.Mock.Test(t) diff --git a/module/mock/dkg_controller.go b/module/mock/dkg_controller.go index cf751c602f6..c9e5d330e36 100644 --- a/module/mock/dkg_controller.go +++ b/module/mock/dkg_controller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type DKGController struct { func (_m *DKGController) End() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for End") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *DKGController) End() error { func (_m *DKGController) EndPhase1() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EndPhase1") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -46,6 +54,10 @@ func (_m *DKGController) EndPhase1() error { func (_m *DKGController) EndPhase2() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EndPhase2") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -60,6 +72,10 @@ func (_m *DKGController) EndPhase2() error { func (_m *DKGController) GetArtifacts() (crypto.PrivateKey, crypto.PublicKey, []crypto.PublicKey) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetArtifacts") + } + var r0 crypto.PrivateKey var r1 crypto.PublicKey var r2 []crypto.PublicKey @@ -97,6 +113,10 @@ func (_m *DKGController) GetArtifacts() (crypto.PrivateKey, crypto.PublicKey, [] func (_m *DKGController) GetIndex() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetIndex") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -111,6 +131,10 @@ func (_m *DKGController) GetIndex() int { func (_m *DKGController) Poll(blockReference flow.Identifier) error { ret := _m.Called(blockReference) + if len(ret) == 0 { + panic("no return value specified for Poll") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { r0 = rf(blockReference) @@ -125,6 +149,10 @@ func (_m *DKGController) Poll(blockReference flow.Identifier) error { func (_m *DKGController) Run() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Run") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -144,6 +172,10 @@ func (_m *DKGController) Shutdown() { func (_m *DKGController) SubmitResult() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SubmitResult") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -154,13 +186,12 @@ func (_m *DKGController) SubmitResult() error { return r0 } -type mockConstructorTestingTNewDKGController interface { +// NewDKGController creates a new instance of DKGController. 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 NewDKGController(t interface { mock.TestingT Cleanup(func()) -} - -// NewDKGController creates a new instance of DKGController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDKGController(t mockConstructorTestingTNewDKGController) *DKGController { +}) *DKGController { mock := &DKGController{} mock.Mock.Test(t) diff --git a/module/mock/dkg_controller_factory.go b/module/mock/dkg_controller_factory.go index b2253370f52..2a00726ba8c 100644 --- a/module/mock/dkg_controller_factory.go +++ b/module/mock/dkg_controller_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type DKGControllerFactory struct { func (_m *DKGControllerFactory) Create(dkgInstanceID string, participants flow.GenericIdentityList[flow.IdentitySkeleton], seed []byte) (module.DKGController, error) { ret := _m.Called(dkgInstanceID, participants, seed) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 module.DKGController var r1 error if rf, ok := ret.Get(0).(func(string, flow.GenericIdentityList[flow.IdentitySkeleton], []byte) (module.DKGController, error)); ok { @@ -40,13 +44,12 @@ func (_m *DKGControllerFactory) Create(dkgInstanceID string, participants flow.G return r0, r1 } -type mockConstructorTestingTNewDKGControllerFactory interface { +// NewDKGControllerFactory creates a new instance of DKGControllerFactory. 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 NewDKGControllerFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewDKGControllerFactory creates a new instance of DKGControllerFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDKGControllerFactory(t mockConstructorTestingTNewDKGControllerFactory) *DKGControllerFactory { +}) *DKGControllerFactory { mock := &DKGControllerFactory{} mock.Mock.Test(t) diff --git a/module/mock/engine_metrics.go b/module/mock/engine_metrics.go index 739ca717e56..edd605c0196 100644 --- a/module/mock/engine_metrics.go +++ b/module/mock/engine_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -34,13 +34,12 @@ func (_m *EngineMetrics) OutboundMessageDropped(engine string, messages string) _m.Called(engine, messages) } -type mockConstructorTestingTNewEngineMetrics interface { +// NewEngineMetrics creates a new instance of EngineMetrics. 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 NewEngineMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewEngineMetrics creates a new instance of EngineMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEngineMetrics(t mockConstructorTestingTNewEngineMetrics) *EngineMetrics { +}) *EngineMetrics { mock := &EngineMetrics{} mock.Mock.Test(t) diff --git a/module/mock/entries_func.go b/module/mock/entries_func.go index 11371fee7dd..326a7ff72bf 100644 --- a/module/mock/entries_func.go +++ b/module/mock/entries_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type EntriesFunc struct { func (_m *EntriesFunc) Execute() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -23,13 +27,12 @@ func (_m *EntriesFunc) Execute() uint { return r0 } -type mockConstructorTestingTNewEntriesFunc interface { +// NewEntriesFunc creates a new instance of EntriesFunc. 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 NewEntriesFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewEntriesFunc creates a new instance of EntriesFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEntriesFunc(t mockConstructorTestingTNewEntriesFunc) *EntriesFunc { +}) *EntriesFunc { mock := &EntriesFunc{} mock.Mock.Test(t) diff --git a/module/mock/epoch_lookup.go b/module/mock/epoch_lookup.go index 4f62fcd88af..5b092552472 100644 --- a/module/mock/epoch_lookup.go +++ b/module/mock/epoch_lookup.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type EpochLookup struct { func (_m *EpochLookup) EpochForViewWithFallback(view uint64) (uint64, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for EpochForViewWithFallback") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(uint64) (uint64, error)); ok { @@ -33,13 +37,12 @@ func (_m *EpochLookup) EpochForViewWithFallback(view uint64) (uint64, error) { return r0, r1 } -type mockConstructorTestingTNewEpochLookup interface { +// NewEpochLookup creates a new instance of EpochLookup. 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 NewEpochLookup(t interface { mock.TestingT Cleanup(func()) -} - -// NewEpochLookup creates a new instance of EpochLookup. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEpochLookup(t mockConstructorTestingTNewEpochLookup) *EpochLookup { +}) *EpochLookup { mock := &EpochLookup{} mock.Mock.Test(t) diff --git a/module/mock/execution_data_provider_metrics.go b/module/mock/execution_data_provider_metrics.go index 58714e372e9..8f315f31184 100644 --- a/module/mock/execution_data_provider_metrics.go +++ b/module/mock/execution_data_provider_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -28,13 +28,12 @@ func (_m *ExecutionDataProviderMetrics) RootIDComputed(duration time.Duration, n _m.Called(duration, numberOfChunks) } -type mockConstructorTestingTNewExecutionDataProviderMetrics interface { +// NewExecutionDataProviderMetrics creates a new instance of ExecutionDataProviderMetrics. 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 NewExecutionDataProviderMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionDataProviderMetrics creates a new instance of ExecutionDataProviderMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionDataProviderMetrics(t mockConstructorTestingTNewExecutionDataProviderMetrics) *ExecutionDataProviderMetrics { +}) *ExecutionDataProviderMetrics { mock := &ExecutionDataProviderMetrics{} mock.Mock.Test(t) diff --git a/module/mock/execution_data_pruner_metrics.go b/module/mock/execution_data_pruner_metrics.go index 28176f7df01..fd658d7630f 100644 --- a/module/mock/execution_data_pruner_metrics.go +++ b/module/mock/execution_data_pruner_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,13 +18,12 @@ func (_m *ExecutionDataPrunerMetrics) Pruned(height uint64, duration time.Durati _m.Called(height, duration) } -type mockConstructorTestingTNewExecutionDataPrunerMetrics interface { +// NewExecutionDataPrunerMetrics creates a new instance of ExecutionDataPrunerMetrics. 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 NewExecutionDataPrunerMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionDataPrunerMetrics creates a new instance of ExecutionDataPrunerMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionDataPrunerMetrics(t mockConstructorTestingTNewExecutionDataPrunerMetrics) *ExecutionDataPrunerMetrics { +}) *ExecutionDataPrunerMetrics { mock := &ExecutionDataPrunerMetrics{} mock.Mock.Test(t) diff --git a/module/mock/execution_data_requester_metrics.go b/module/mock/execution_data_requester_metrics.go index 804d52c8362..02ee431fc30 100644 --- a/module/mock/execution_data_requester_metrics.go +++ b/module/mock/execution_data_requester_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -33,13 +33,12 @@ func (_m *ExecutionDataRequesterMetrics) NotificationSent(height uint64) { _m.Called(height) } -type mockConstructorTestingTNewExecutionDataRequesterMetrics interface { +// NewExecutionDataRequesterMetrics creates a new instance of ExecutionDataRequesterMetrics. 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 NewExecutionDataRequesterMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionDataRequesterMetrics creates a new instance of ExecutionDataRequesterMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionDataRequesterMetrics(t mockConstructorTestingTNewExecutionDataRequesterMetrics) *ExecutionDataRequesterMetrics { +}) *ExecutionDataRequesterMetrics { mock := &ExecutionDataRequesterMetrics{} mock.Mock.Test(t) diff --git a/module/mock/execution_data_requester_v2_metrics.go b/module/mock/execution_data_requester_v2_metrics.go index 9119153196c..d9a7c0ce119 100644 --- a/module/mock/execution_data_requester_v2_metrics.go +++ b/module/mock/execution_data_requester_v2_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -43,13 +43,12 @@ func (_m *ExecutionDataRequesterV2Metrics) ResponseDropped() { _m.Called() } -type mockConstructorTestingTNewExecutionDataRequesterV2Metrics interface { +// NewExecutionDataRequesterV2Metrics creates a new instance of ExecutionDataRequesterV2Metrics. 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 NewExecutionDataRequesterV2Metrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionDataRequesterV2Metrics creates a new instance of ExecutionDataRequesterV2Metrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionDataRequesterV2Metrics(t mockConstructorTestingTNewExecutionDataRequesterV2Metrics) *ExecutionDataRequesterV2Metrics { +}) *ExecutionDataRequesterV2Metrics { mock := &ExecutionDataRequesterV2Metrics{} mock.Mock.Test(t) diff --git a/module/mock/execution_metrics.go b/module/mock/execution_metrics.go index cb9f6b632dc..1ccb6e50364 100644 --- a/module/mock/execution_metrics.go +++ b/module/mock/execution_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -241,13 +241,12 @@ func (_m *ExecutionMetrics) UpdateValuesSize(byte uint64) { _m.Called(byte) } -type mockConstructorTestingTNewExecutionMetrics interface { +// NewExecutionMetrics creates a new instance of ExecutionMetrics. 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 NewExecutionMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionMetrics creates a new instance of ExecutionMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionMetrics(t mockConstructorTestingTNewExecutionMetrics) *ExecutionMetrics { +}) *ExecutionMetrics { mock := &ExecutionMetrics{} mock.Mock.Test(t) diff --git a/module/mock/execution_state_indexer_metrics.go b/module/mock/execution_state_indexer_metrics.go index f3a2586bfaf..d52dc1c6f3b 100644 --- a/module/mock/execution_state_indexer_metrics.go +++ b/module/mock/execution_state_indexer_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -28,13 +28,12 @@ func (_m *ExecutionStateIndexerMetrics) InitializeLatestHeight(height uint64) { _m.Called(height) } -type mockConstructorTestingTNewExecutionStateIndexerMetrics interface { +// NewExecutionStateIndexerMetrics creates a new instance of ExecutionStateIndexerMetrics. 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 NewExecutionStateIndexerMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionStateIndexerMetrics creates a new instance of ExecutionStateIndexerMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionStateIndexerMetrics(t mockConstructorTestingTNewExecutionStateIndexerMetrics) *ExecutionStateIndexerMetrics { +}) *ExecutionStateIndexerMetrics { mock := &ExecutionStateIndexerMetrics{} mock.Mock.Test(t) diff --git a/module/mock/finalized_header_cache.go b/module/mock/finalized_header_cache.go index 018981fb347..0b447f5a058 100644 --- a/module/mock/finalized_header_cache.go +++ b/module/mock/finalized_header_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type FinalizedHeaderCache struct { func (_m *FinalizedHeaderCache) Get() *flow.Header { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *flow.Header if rf, ok := ret.Get(0).(func() *flow.Header); ok { r0 = rf() @@ -28,13 +32,12 @@ func (_m *FinalizedHeaderCache) Get() *flow.Header { return r0 } -type mockConstructorTestingTNewFinalizedHeaderCache interface { +// NewFinalizedHeaderCache creates a new instance of FinalizedHeaderCache. 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 NewFinalizedHeaderCache(t interface { mock.TestingT Cleanup(func()) -} - -// NewFinalizedHeaderCache creates a new instance of FinalizedHeaderCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFinalizedHeaderCache(t mockConstructorTestingTNewFinalizedHeaderCache) *FinalizedHeaderCache { +}) *FinalizedHeaderCache { mock := &FinalizedHeaderCache{} mock.Mock.Test(t) diff --git a/module/mock/finalizer.go b/module/mock/finalizer.go index d3f933199db..08a603abfad 100644 --- a/module/mock/finalizer.go +++ b/module/mock/finalizer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Finalizer struct { func (_m *Finalizer) MakeFinal(blockID flow.Identifier) error { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for MakeFinal") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { r0 = rf(blockID) @@ -26,13 +30,12 @@ func (_m *Finalizer) MakeFinal(blockID flow.Identifier) error { return r0 } -type mockConstructorTestingTNewFinalizer interface { +// NewFinalizer creates a new instance of Finalizer. 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 NewFinalizer(t interface { mock.TestingT Cleanup(func()) -} - -// NewFinalizer creates a new instance of Finalizer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFinalizer(t mockConstructorTestingTNewFinalizer) *Finalizer { +}) *Finalizer { mock := &Finalizer{} mock.Mock.Test(t) diff --git a/module/mock/gossip_sub_metrics.go b/module/mock/gossip_sub_metrics.go index 99700b47e92..0ae56889279 100644 --- a/module/mock/gossip_sub_metrics.go +++ b/module/mock/gossip_sub_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -281,13 +281,12 @@ func (_m *GossipSubMetrics) SetWarningStateCount(_a0 uint) { _m.Called(_a0) } -type mockConstructorTestingTNewGossipSubMetrics interface { +// NewGossipSubMetrics creates a new instance of GossipSubMetrics. 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 NewGossipSubMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubMetrics creates a new instance of GossipSubMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubMetrics(t mockConstructorTestingTNewGossipSubMetrics) *GossipSubMetrics { +}) *GossipSubMetrics { mock := &GossipSubMetrics{} mock.Mock.Test(t) diff --git a/module/mock/gossip_sub_rpc_inspector_metrics.go b/module/mock/gossip_sub_rpc_inspector_metrics.go index d972e9193e0..b12bcf55b85 100644 --- a/module/mock/gossip_sub_rpc_inspector_metrics.go +++ b/module/mock/gossip_sub_rpc_inspector_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -24,13 +24,12 @@ func (_m *GossipSubRpcInspectorMetrics) OnIncomingRpcReceived(iHaveCount int, iW _m.Called(iHaveCount, iWantCount, graftCount, pruneCount, msgCount) } -type mockConstructorTestingTNewGossipSubRpcInspectorMetrics interface { +// NewGossipSubRpcInspectorMetrics creates a new instance of GossipSubRpcInspectorMetrics. 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 NewGossipSubRpcInspectorMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubRpcInspectorMetrics creates a new instance of GossipSubRpcInspectorMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubRpcInspectorMetrics(t mockConstructorTestingTNewGossipSubRpcInspectorMetrics) *GossipSubRpcInspectorMetrics { +}) *GossipSubRpcInspectorMetrics { mock := &GossipSubRpcInspectorMetrics{} mock.Mock.Test(t) diff --git a/module/mock/gossip_sub_rpc_validation_inspector_metrics.go b/module/mock/gossip_sub_rpc_validation_inspector_metrics.go index ac15e512fd7..807619283ed 100644 --- a/module/mock/gossip_sub_rpc_validation_inspector_metrics.go +++ b/module/mock/gossip_sub_rpc_validation_inspector_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -155,13 +155,12 @@ func (_m *GossipSubRpcValidationInspectorMetrics) OnUnstakedPeerInspectionFailed _m.Called() } -type mockConstructorTestingTNewGossipSubRpcValidationInspectorMetrics interface { +// NewGossipSubRpcValidationInspectorMetrics creates a new instance of GossipSubRpcValidationInspectorMetrics. 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 NewGossipSubRpcValidationInspectorMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubRpcValidationInspectorMetrics creates a new instance of GossipSubRpcValidationInspectorMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubRpcValidationInspectorMetrics(t mockConstructorTestingTNewGossipSubRpcValidationInspectorMetrics) *GossipSubRpcValidationInspectorMetrics { +}) *GossipSubRpcValidationInspectorMetrics { mock := &GossipSubRpcValidationInspectorMetrics{} mock.Mock.Test(t) diff --git a/module/mock/gossip_sub_scoring_metrics.go b/module/mock/gossip_sub_scoring_metrics.go index 63484e7bf4d..41011fa15cd 100644 --- a/module/mock/gossip_sub_scoring_metrics.go +++ b/module/mock/gossip_sub_scoring_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -59,13 +59,12 @@ func (_m *GossipSubScoringMetrics) SetWarningStateCount(_a0 uint) { _m.Called(_a0) } -type mockConstructorTestingTNewGossipSubScoringMetrics interface { +// NewGossipSubScoringMetrics creates a new instance of GossipSubScoringMetrics. 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 NewGossipSubScoringMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubScoringMetrics creates a new instance of GossipSubScoringMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubScoringMetrics(t mockConstructorTestingTNewGossipSubScoringMetrics) *GossipSubScoringMetrics { +}) *GossipSubScoringMetrics { mock := &GossipSubScoringMetrics{} mock.Mock.Test(t) diff --git a/module/mock/gossip_sub_scoring_registry_metrics.go b/module/mock/gossip_sub_scoring_registry_metrics.go index 02aacd79cfe..b2c6b474793 100644 --- a/module/mock/gossip_sub_scoring_registry_metrics.go +++ b/module/mock/gossip_sub_scoring_registry_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,13 +19,12 @@ func (_m *GossipSubScoringRegistryMetrics) DuplicateMessagesCounts(count float64 _m.Called(count) } -type mockConstructorTestingTNewGossipSubScoringRegistryMetrics interface { +// NewGossipSubScoringRegistryMetrics creates a new instance of GossipSubScoringRegistryMetrics. 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 NewGossipSubScoringRegistryMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubScoringRegistryMetrics creates a new instance of GossipSubScoringRegistryMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubScoringRegistryMetrics(t mockConstructorTestingTNewGossipSubScoringRegistryMetrics) *GossipSubScoringRegistryMetrics { +}) *GossipSubScoringRegistryMetrics { mock := &GossipSubScoringRegistryMetrics{} mock.Mock.Test(t) diff --git a/module/mock/grpc_connection_pool_metrics.go b/module/mock/grpc_connection_pool_metrics.go index 2eddb3cf002..135ea5691a4 100644 --- a/module/mock/grpc_connection_pool_metrics.go +++ b/module/mock/grpc_connection_pool_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -44,13 +44,12 @@ func (_m *GRPCConnectionPoolMetrics) TotalConnectionsInPool(connectionCount uint _m.Called(connectionCount, connectionPoolSize) } -type mockConstructorTestingTNewGRPCConnectionPoolMetrics interface { +// NewGRPCConnectionPoolMetrics creates a new instance of GRPCConnectionPoolMetrics. 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 NewGRPCConnectionPoolMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewGRPCConnectionPoolMetrics creates a new instance of GRPCConnectionPoolMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGRPCConnectionPoolMetrics(t mockConstructorTestingTNewGRPCConnectionPoolMetrics) *GRPCConnectionPoolMetrics { +}) *GRPCConnectionPoolMetrics { mock := &GRPCConnectionPoolMetrics{} mock.Mock.Test(t) diff --git a/module/mock/hero_cache_metrics.go b/module/mock/hero_cache_metrics.go index 139cca95b2a..4096ec3ca30 100644 --- a/module/mock/hero_cache_metrics.go +++ b/module/mock/hero_cache_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -59,13 +59,12 @@ func (_m *HeroCacheMetrics) OnKeyRemoved(size uint32) { _m.Called(size) } -type mockConstructorTestingTNewHeroCacheMetrics interface { +// NewHeroCacheMetrics creates a new instance of HeroCacheMetrics. 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 NewHeroCacheMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewHeroCacheMetrics creates a new instance of HeroCacheMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHeroCacheMetrics(t mockConstructorTestingTNewHeroCacheMetrics) *HeroCacheMetrics { +}) *HeroCacheMetrics { mock := &HeroCacheMetrics{} mock.Mock.Test(t) diff --git a/module/mock/hot_stuff.go b/module/mock/hot_stuff.go index af949a227e8..4801da856c7 100644 --- a/module/mock/hot_stuff.go +++ b/module/mock/hot_stuff.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type HotStuff struct { func (_m *HotStuff) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *HotStuff) Done() <-chan struct{} { func (_m *HotStuff) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -56,13 +64,12 @@ func (_m *HotStuff) SubmitProposal(proposal *model.Proposal) { _m.Called(proposal) } -type mockConstructorTestingTNewHotStuff interface { +// NewHotStuff creates a new instance of HotStuff. 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 NewHotStuff(t interface { mock.TestingT Cleanup(func()) -} - -// NewHotStuff creates a new instance of HotStuff. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHotStuff(t mockConstructorTestingTNewHotStuff) *HotStuff { +}) *HotStuff { mock := &HotStuff{} mock.Mock.Test(t) diff --git a/module/mock/hot_stuff_follower.go b/module/mock/hot_stuff_follower.go index 23c43d387cd..5fc7b827a3d 100644 --- a/module/mock/hot_stuff_follower.go +++ b/module/mock/hot_stuff_follower.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -23,6 +23,10 @@ func (_m *HotStuffFollower) AddCertifiedBlock(certifiedBlock *model.CertifiedBlo func (_m *HotStuffFollower) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -39,6 +43,10 @@ func (_m *HotStuffFollower) Done() <-chan struct{} { func (_m *HotStuffFollower) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -56,13 +64,12 @@ func (_m *HotStuffFollower) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewHotStuffFollower interface { +// NewHotStuffFollower creates a new instance of HotStuffFollower. 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 NewHotStuffFollower(t interface { mock.TestingT Cleanup(func()) -} - -// NewHotStuffFollower creates a new instance of HotStuffFollower. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHotStuffFollower(t mockConstructorTestingTNewHotStuffFollower) *HotStuffFollower { +}) *HotStuffFollower { mock := &HotStuffFollower{} mock.Mock.Test(t) diff --git a/module/mock/hotstuff_metrics.go b/module/mock/hotstuff_metrics.go index e3a82ca4040..7cce179ecfb 100644 --- a/module/mock/hotstuff_metrics.go +++ b/module/mock/hotstuff_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -98,13 +98,12 @@ func (_m *HotstuffMetrics) VoteProcessingDuration(duration time.Duration) { _m.Called(duration) } -type mockConstructorTestingTNewHotstuffMetrics interface { +// NewHotstuffMetrics creates a new instance of HotstuffMetrics. 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 NewHotstuffMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewHotstuffMetrics creates a new instance of HotstuffMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHotstuffMetrics(t mockConstructorTestingTNewHotstuffMetrics) *HotstuffMetrics { +}) *HotstuffMetrics { mock := &HotstuffMetrics{} mock.Mock.Test(t) diff --git a/module/mock/identifier_provider.go b/module/mock/identifier_provider.go index 8aad36e546c..a9a37089656 100644 --- a/module/mock/identifier_provider.go +++ b/module/mock/identifier_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type IdentifierProvider struct { func (_m *IdentifierProvider) Identifiers() flow.IdentifierList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Identifiers") + } + var r0 flow.IdentifierList if rf, ok := ret.Get(0).(func() flow.IdentifierList); ok { r0 = rf() @@ -28,13 +32,12 @@ func (_m *IdentifierProvider) Identifiers() flow.IdentifierList { return r0 } -type mockConstructorTestingTNewIdentifierProvider interface { +// NewIdentifierProvider creates a new instance of IdentifierProvider. 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 NewIdentifierProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewIdentifierProvider creates a new instance of IdentifierProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIdentifierProvider(t mockConstructorTestingTNewIdentifierProvider) *IdentifierProvider { +}) *IdentifierProvider { mock := &IdentifierProvider{} mock.Mock.Test(t) diff --git a/module/mock/identity_provider.go b/module/mock/identity_provider.go index 8711a8e8efb..ea7c10abd87 100644 --- a/module/mock/identity_provider.go +++ b/module/mock/identity_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type IdentityProvider struct { func (_m *IdentityProvider) ByNodeID(_a0 flow.Identifier) (*flow.Identity, bool) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ByNodeID") + } + var r0 *flow.Identity var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Identity, bool)); ok { @@ -44,6 +48,10 @@ func (_m *IdentityProvider) ByNodeID(_a0 flow.Identifier) (*flow.Identity, bool) func (_m *IdentityProvider) ByPeerID(_a0 peer.ID) (*flow.Identity, bool) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ByPeerID") + } + var r0 *flow.Identity var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (*flow.Identity, bool)); ok { @@ -70,6 +78,10 @@ func (_m *IdentityProvider) ByPeerID(_a0 peer.ID) (*flow.Identity, bool) { func (_m *IdentityProvider) Identities(_a0 flow.IdentityFilter[flow.Identity]) flow.GenericIdentityList[flow.Identity] { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Identities") + } + var r0 flow.GenericIdentityList[flow.Identity] if rf, ok := ret.Get(0).(func(flow.IdentityFilter[flow.Identity]) flow.GenericIdentityList[flow.Identity]); ok { r0 = rf(_a0) @@ -82,13 +94,12 @@ func (_m *IdentityProvider) Identities(_a0 flow.IdentityFilter[flow.Identity]) f return r0 } -type mockConstructorTestingTNewIdentityProvider interface { +// NewIdentityProvider creates a new instance of IdentityProvider. 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 NewIdentityProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewIdentityProvider creates a new instance of IdentityProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIdentityProvider(t mockConstructorTestingTNewIdentityProvider) *IdentityProvider { +}) *IdentityProvider { mock := &IdentityProvider{} mock.Mock.Test(t) diff --git a/module/mock/job.go b/module/mock/job.go index 5f7a390fc33..0950e21e748 100644 --- a/module/mock/job.go +++ b/module/mock/job.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Job struct { func (_m *Job) ID() module.JobID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 module.JobID if rf, ok := ret.Get(0).(func() module.JobID); ok { r0 = rf() @@ -26,13 +30,12 @@ func (_m *Job) ID() module.JobID { return r0 } -type mockConstructorTestingTNewJob interface { +// NewJob creates a new instance of Job. 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 NewJob(t interface { mock.TestingT Cleanup(func()) -} - -// NewJob creates a new instance of Job. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewJob(t mockConstructorTestingTNewJob) *Job { +}) *Job { mock := &Job{} mock.Mock.Test(t) diff --git a/module/mock/job_consumer.go b/module/mock/job_consumer.go index 9c4ebb17d04..b438e4aaf60 100644 --- a/module/mock/job_consumer.go +++ b/module/mock/job_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -21,6 +21,10 @@ func (_m *JobConsumer) Check() { func (_m *JobConsumer) LastProcessedIndex() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LastProcessedIndex") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -35,6 +39,10 @@ func (_m *JobConsumer) LastProcessedIndex() uint64 { func (_m *JobConsumer) NotifyJobIsDone(_a0 module.JobID) uint64 { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NotifyJobIsDone") + } + var r0 uint64 if rf, ok := ret.Get(0).(func(module.JobID) uint64); ok { r0 = rf(_a0) @@ -49,6 +57,10 @@ func (_m *JobConsumer) NotifyJobIsDone(_a0 module.JobID) uint64 { func (_m *JobConsumer) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -63,6 +75,10 @@ func (_m *JobConsumer) Size() uint { func (_m *JobConsumer) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -78,13 +94,12 @@ func (_m *JobConsumer) Stop() { _m.Called() } -type mockConstructorTestingTNewJobConsumer interface { +// NewJobConsumer creates a new instance of JobConsumer. 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 NewJobConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewJobConsumer creates a new instance of JobConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewJobConsumer(t mockConstructorTestingTNewJobConsumer) *JobConsumer { +}) *JobConsumer { mock := &JobConsumer{} mock.Mock.Test(t) diff --git a/module/mock/job_queue.go b/module/mock/job_queue.go index d54249370c3..6ebc4d0627a 100644 --- a/module/mock/job_queue.go +++ b/module/mock/job_queue.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type JobQueue struct { func (_m *JobQueue) Add(job module.Job) error { ret := _m.Called(job) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 error if rf, ok := ret.Get(0).(func(module.Job) error); ok { r0 = rf(job) @@ -26,13 +30,12 @@ func (_m *JobQueue) Add(job module.Job) error { return r0 } -type mockConstructorTestingTNewJobQueue interface { +// NewJobQueue creates a new instance of JobQueue. 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 NewJobQueue(t interface { mock.TestingT Cleanup(func()) -} - -// NewJobQueue creates a new instance of JobQueue. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewJobQueue(t mockConstructorTestingTNewJobQueue) *JobQueue { +}) *JobQueue { mock := &JobQueue{} mock.Mock.Test(t) diff --git a/module/mock/jobs.go b/module/mock/jobs.go index 65e73327476..cbb2d1ba96f 100644 --- a/module/mock/jobs.go +++ b/module/mock/jobs.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Jobs struct { func (_m *Jobs) AtIndex(index uint64) (module.Job, error) { ret := _m.Called(index) + if len(ret) == 0 { + panic("no return value specified for AtIndex") + } + var r0 module.Job var r1 error if rf, ok := ret.Get(0).(func(uint64) (module.Job, error)); ok { @@ -42,6 +46,10 @@ func (_m *Jobs) AtIndex(index uint64) (module.Job, error) { func (_m *Jobs) Head() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Head") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -62,13 +70,12 @@ func (_m *Jobs) Head() (uint64, error) { return r0, r1 } -type mockConstructorTestingTNewJobs interface { +// NewJobs creates a new instance of Jobs. 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 NewJobs(t interface { mock.TestingT Cleanup(func()) -} - -// NewJobs creates a new instance of Jobs. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewJobs(t mockConstructorTestingTNewJobs) *Jobs { +}) *Jobs { mock := &Jobs{} mock.Mock.Test(t) diff --git a/module/mock/ledger_metrics.go b/module/mock/ledger_metrics.go index 9f0fbbbc1d8..80f6645cb38 100644 --- a/module/mock/ledger_metrics.go +++ b/module/mock/ledger_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -98,13 +98,12 @@ func (_m *LedgerMetrics) UpdateValuesSize(byte uint64) { _m.Called(byte) } -type mockConstructorTestingTNewLedgerMetrics interface { +// NewLedgerMetrics creates a new instance of LedgerMetrics. 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 NewLedgerMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewLedgerMetrics creates a new instance of LedgerMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLedgerMetrics(t mockConstructorTestingTNewLedgerMetrics) *LedgerMetrics { +}) *LedgerMetrics { mock := &LedgerMetrics{} mock.Mock.Test(t) diff --git a/module/mock/lib_p2_p_connection_metrics.go b/module/mock/lib_p2_p_connection_metrics.go index 8e0bf8366de..55dba300bd5 100644 --- a/module/mock/lib_p2_p_connection_metrics.go +++ b/module/mock/lib_p2_p_connection_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -19,13 +19,12 @@ func (_m *LibP2PConnectionMetrics) OutboundConnections(connectionCount uint) { _m.Called(connectionCount) } -type mockConstructorTestingTNewLibP2PConnectionMetrics interface { +// NewLibP2PConnectionMetrics creates a new instance of LibP2PConnectionMetrics. 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 NewLibP2PConnectionMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewLibP2PConnectionMetrics creates a new instance of LibP2PConnectionMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLibP2PConnectionMetrics(t mockConstructorTestingTNewLibP2PConnectionMetrics) *LibP2PConnectionMetrics { +}) *LibP2PConnectionMetrics { mock := &LibP2PConnectionMetrics{} mock.Mock.Test(t) diff --git a/module/mock/lib_p2_p_metrics.go b/module/mock/lib_p2_p_metrics.go index fb64a2764c2..943bd9fb8fd 100644 --- a/module/mock/lib_p2_p_metrics.go +++ b/module/mock/lib_p2_p_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -462,13 +462,12 @@ func (_m *LibP2PMetrics) SetWarningStateCount(_a0 uint) { _m.Called(_a0) } -type mockConstructorTestingTNewLibP2PMetrics interface { +// NewLibP2PMetrics creates a new instance of LibP2PMetrics. 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 NewLibP2PMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewLibP2PMetrics creates a new instance of LibP2PMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLibP2PMetrics(t mockConstructorTestingTNewLibP2PMetrics) *LibP2PMetrics { +}) *LibP2PMetrics { mock := &LibP2PMetrics{} mock.Mock.Test(t) diff --git a/module/mock/local.go b/module/mock/local.go index 2bf8212f85b..1b5f2e5e4e2 100644 --- a/module/mock/local.go +++ b/module/mock/local.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type Local struct { func (_m *Local) Address() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Address") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *Local) Address() string { func (_m *Local) NodeID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NodeID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -50,6 +58,10 @@ func (_m *Local) NodeID() flow.Identifier { func (_m *Local) NotMeFilter() flow.IdentityFilter[flow.Identity] { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NotMeFilter") + } + var r0 flow.IdentityFilter[flow.Identity] if rf, ok := ret.Get(0).(func() flow.IdentityFilter[flow.Identity]); ok { r0 = rf() @@ -66,6 +78,10 @@ func (_m *Local) NotMeFilter() flow.IdentityFilter[flow.Identity] { func (_m *Local) Sign(_a0 []byte, _a1 hash.Hasher) (crypto.Signature, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Sign") + } + var r0 crypto.Signature var r1 error if rf, ok := ret.Get(0).(func([]byte, hash.Hasher) (crypto.Signature, error)); ok { @@ -92,6 +108,10 @@ func (_m *Local) Sign(_a0 []byte, _a1 hash.Hasher) (crypto.Signature, error) { func (_m *Local) SignFunc(_a0 []byte, _a1 hash.Hasher, _a2 func(crypto.PrivateKey, []byte, hash.Hasher) (crypto.Signature, error)) (crypto.Signature, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for SignFunc") + } + var r0 crypto.Signature var r1 error if rf, ok := ret.Get(0).(func([]byte, hash.Hasher, func(crypto.PrivateKey, []byte, hash.Hasher) (crypto.Signature, error)) (crypto.Signature, error)); ok { @@ -114,13 +134,12 @@ func (_m *Local) SignFunc(_a0 []byte, _a1 hash.Hasher, _a2 func(crypto.PrivateKe return r0, r1 } -type mockConstructorTestingTNewLocal interface { +// NewLocal creates a new instance of Local. 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 NewLocal(t interface { mock.TestingT Cleanup(func()) -} - -// NewLocal creates a new instance of Local. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLocal(t mockConstructorTestingTNewLocal) *Local { +}) *Local { mock := &Local{} mock.Mock.Test(t) diff --git a/module/mock/local_gossip_sub_router_metrics.go b/module/mock/local_gossip_sub_router_metrics.go index 491d542f1f2..a2b0f43cf09 100644 --- a/module/mock/local_gossip_sub_router_metrics.go +++ b/module/mock/local_gossip_sub_router_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -89,13 +89,12 @@ func (_m *LocalGossipSubRouterMetrics) OnUndeliveredMessage() { _m.Called() } -type mockConstructorTestingTNewLocalGossipSubRouterMetrics interface { +// NewLocalGossipSubRouterMetrics creates a new instance of LocalGossipSubRouterMetrics. 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 NewLocalGossipSubRouterMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewLocalGossipSubRouterMetrics creates a new instance of LocalGossipSubRouterMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLocalGossipSubRouterMetrics(t mockConstructorTestingTNewLocalGossipSubRouterMetrics) *LocalGossipSubRouterMetrics { +}) *LocalGossipSubRouterMetrics { mock := &LocalGossipSubRouterMetrics{} mock.Mock.Test(t) diff --git a/module/mock/machine_account_metrics.go b/module/mock/machine_account_metrics.go index 14420e8a173..643752ddb15 100644 --- a/module/mock/machine_account_metrics.go +++ b/module/mock/machine_account_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -24,13 +24,12 @@ func (_m *MachineAccountMetrics) RecommendedMinBalance(bal float64) { _m.Called(bal) } -type mockConstructorTestingTNewMachineAccountMetrics interface { +// NewMachineAccountMetrics creates a new instance of MachineAccountMetrics. 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 NewMachineAccountMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewMachineAccountMetrics creates a new instance of MachineAccountMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMachineAccountMetrics(t mockConstructorTestingTNewMachineAccountMetrics) *MachineAccountMetrics { +}) *MachineAccountMetrics { mock := &MachineAccountMetrics{} mock.Mock.Test(t) diff --git a/module/mock/mempool_metrics.go b/module/mock/mempool_metrics.go index 29de10c7b7c..25696d30f2e 100644 --- a/module/mock/mempool_metrics.go +++ b/module/mock/mempool_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -21,6 +21,10 @@ func (_m *MempoolMetrics) MempoolEntries(resource string, entries uint) { func (_m *MempoolMetrics) Register(resource string, entriesFunc module.EntriesFunc) error { ret := _m.Called(resource, entriesFunc) + if len(ret) == 0 { + panic("no return value specified for Register") + } + var r0 error if rf, ok := ret.Get(0).(func(string, module.EntriesFunc) error); ok { r0 = rf(resource, entriesFunc) @@ -31,13 +35,12 @@ func (_m *MempoolMetrics) Register(resource string, entriesFunc module.EntriesFu return r0 } -type mockConstructorTestingTNewMempoolMetrics interface { +// NewMempoolMetrics creates a new instance of MempoolMetrics. 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 NewMempoolMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewMempoolMetrics creates a new instance of MempoolMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMempoolMetrics(t mockConstructorTestingTNewMempoolMetrics) *MempoolMetrics { +}) *MempoolMetrics { mock := &MempoolMetrics{} mock.Mock.Test(t) diff --git a/module/mock/network_core_metrics.go b/module/mock/network_core_metrics.go index d78c3355449..aa09aa80d64 100644 --- a/module/mock/network_core_metrics.go +++ b/module/mock/network_core_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -85,13 +85,12 @@ func (_m *NetworkCoreMetrics) UnicastMessageSendingStarted(topic string) { _m.Called(topic) } -type mockConstructorTestingTNewNetworkCoreMetrics interface { +// NewNetworkCoreMetrics creates a new instance of NetworkCoreMetrics. 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 NewNetworkCoreMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewNetworkCoreMetrics creates a new instance of NetworkCoreMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNetworkCoreMetrics(t mockConstructorTestingTNewNetworkCoreMetrics) *NetworkCoreMetrics { +}) *NetworkCoreMetrics { mock := &NetworkCoreMetrics{} mock.Mock.Test(t) diff --git a/module/mock/network_inbound_queue_metrics.go b/module/mock/network_inbound_queue_metrics.go index ed6c4d78f45..5999cab808a 100644 --- a/module/mock/network_inbound_queue_metrics.go +++ b/module/mock/network_inbound_queue_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -28,13 +28,12 @@ func (_m *NetworkInboundQueueMetrics) QueueDuration(duration time.Duration, prio _m.Called(duration, priority) } -type mockConstructorTestingTNewNetworkInboundQueueMetrics interface { +// NewNetworkInboundQueueMetrics creates a new instance of NetworkInboundQueueMetrics. 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 NewNetworkInboundQueueMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewNetworkInboundQueueMetrics creates a new instance of NetworkInboundQueueMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNetworkInboundQueueMetrics(t mockConstructorTestingTNewNetworkInboundQueueMetrics) *NetworkInboundQueueMetrics { +}) *NetworkInboundQueueMetrics { mock := &NetworkInboundQueueMetrics{} mock.Mock.Test(t) diff --git a/module/mock/network_metrics.go b/module/mock/network_metrics.go index 534150b24d1..42984425620 100644 --- a/module/mock/network_metrics.go +++ b/module/mock/network_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -532,13 +532,12 @@ func (_m *NetworkMetrics) UnicastMessageSendingStarted(topic string) { _m.Called(topic) } -type mockConstructorTestingTNewNetworkMetrics interface { +// NewNetworkMetrics creates a new instance of NetworkMetrics. 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 NewNetworkMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewNetworkMetrics creates a new instance of NetworkMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNetworkMetrics(t mockConstructorTestingTNewNetworkMetrics) *NetworkMetrics { +}) *NetworkMetrics { mock := &NetworkMetrics{} mock.Mock.Test(t) diff --git a/module/mock/network_security_metrics.go b/module/mock/network_security_metrics.go index a48a693c0ab..9bc9e49cb02 100644 --- a/module/mock/network_security_metrics.go +++ b/module/mock/network_security_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -28,13 +28,12 @@ func (_m *NetworkSecurityMetrics) OnViolationReportSkipped() { _m.Called() } -type mockConstructorTestingTNewNetworkSecurityMetrics interface { +// NewNetworkSecurityMetrics creates a new instance of NetworkSecurityMetrics. 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 NewNetworkSecurityMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewNetworkSecurityMetrics creates a new instance of NetworkSecurityMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNetworkSecurityMetrics(t mockConstructorTestingTNewNetworkSecurityMetrics) *NetworkSecurityMetrics { +}) *NetworkSecurityMetrics { mock := &NetworkSecurityMetrics{} mock.Mock.Test(t) diff --git a/module/mock/new_job_listener.go b/module/mock/new_job_listener.go index 9f89325743d..4e1609aa701 100644 --- a/module/mock/new_job_listener.go +++ b/module/mock/new_job_listener.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -14,13 +14,12 @@ func (_m *NewJobListener) Check() { _m.Called() } -type mockConstructorTestingTNewNewJobListener interface { +// NewNewJobListener creates a new instance of NewJobListener. 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 NewNewJobListener(t interface { mock.TestingT Cleanup(func()) -} - -// NewNewJobListener creates a new instance of NewJobListener. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNewJobListener(t mockConstructorTestingTNewNewJobListener) *NewJobListener { +}) *NewJobListener { mock := &NewJobListener{} mock.Mock.Test(t) diff --git a/module/mock/pending_block_buffer.go b/module/mock/pending_block_buffer.go index a49acafce8d..49478bd219a 100644 --- a/module/mock/pending_block_buffer.go +++ b/module/mock/pending_block_buffer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type PendingBlockBuffer struct { func (_m *PendingBlockBuffer) Add(block flow.Slashable[*flow.Block]) bool { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Slashable[*flow.Block]) bool); ok { r0 = rf(block) @@ -30,6 +34,10 @@ func (_m *PendingBlockBuffer) Add(block flow.Slashable[*flow.Block]) bool { func (_m *PendingBlockBuffer) ByID(blockID flow.Identifier) (flow.Slashable[*flow.Block], bool) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 flow.Slashable[*flow.Block] var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.Slashable[*flow.Block], bool)); ok { @@ -54,6 +62,10 @@ func (_m *PendingBlockBuffer) ByID(blockID flow.Identifier) (flow.Slashable[*flo func (_m *PendingBlockBuffer) ByParentID(parentID flow.Identifier) ([]flow.Slashable[*flow.Block], bool) { ret := _m.Called(parentID) + if len(ret) == 0 { + panic("no return value specified for ByParentID") + } + var r0 []flow.Slashable[*flow.Block] var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.Slashable[*flow.Block], bool)); ok { @@ -90,6 +102,10 @@ func (_m *PendingBlockBuffer) PruneByView(view uint64) { func (_m *PendingBlockBuffer) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -100,13 +116,12 @@ func (_m *PendingBlockBuffer) Size() uint { return r0 } -type mockConstructorTestingTNewPendingBlockBuffer interface { +// NewPendingBlockBuffer creates a new instance of PendingBlockBuffer. 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 NewPendingBlockBuffer(t interface { mock.TestingT Cleanup(func()) -} - -// NewPendingBlockBuffer creates a new instance of PendingBlockBuffer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPendingBlockBuffer(t mockConstructorTestingTNewPendingBlockBuffer) *PendingBlockBuffer { +}) *PendingBlockBuffer { mock := &PendingBlockBuffer{} mock.Mock.Test(t) diff --git a/module/mock/pending_cluster_block_buffer.go b/module/mock/pending_cluster_block_buffer.go index 686c0d9cbf0..af14d2465e6 100644 --- a/module/mock/pending_cluster_block_buffer.go +++ b/module/mock/pending_cluster_block_buffer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type PendingClusterBlockBuffer struct { func (_m *PendingClusterBlockBuffer) Add(block flow.Slashable[*cluster.Block]) bool { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Slashable[*cluster.Block]) bool); ok { r0 = rf(block) @@ -32,6 +36,10 @@ func (_m *PendingClusterBlockBuffer) Add(block flow.Slashable[*cluster.Block]) b func (_m *PendingClusterBlockBuffer) ByID(blockID flow.Identifier) (flow.Slashable[*cluster.Block], bool) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 flow.Slashable[*cluster.Block] var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.Slashable[*cluster.Block], bool)); ok { @@ -56,6 +64,10 @@ func (_m *PendingClusterBlockBuffer) ByID(blockID flow.Identifier) (flow.Slashab func (_m *PendingClusterBlockBuffer) ByParentID(parentID flow.Identifier) ([]flow.Slashable[*cluster.Block], bool) { ret := _m.Called(parentID) + if len(ret) == 0 { + panic("no return value specified for ByParentID") + } + var r0 []flow.Slashable[*cluster.Block] var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.Slashable[*cluster.Block], bool)); ok { @@ -92,6 +104,10 @@ func (_m *PendingClusterBlockBuffer) PruneByView(view uint64) { func (_m *PendingClusterBlockBuffer) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -102,13 +118,12 @@ func (_m *PendingClusterBlockBuffer) Size() uint { return r0 } -type mockConstructorTestingTNewPendingClusterBlockBuffer interface { +// NewPendingClusterBlockBuffer creates a new instance of PendingClusterBlockBuffer. 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 NewPendingClusterBlockBuffer(t interface { mock.TestingT Cleanup(func()) -} - -// NewPendingClusterBlockBuffer creates a new instance of PendingClusterBlockBuffer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPendingClusterBlockBuffer(t mockConstructorTestingTNewPendingClusterBlockBuffer) *PendingClusterBlockBuffer { +}) *PendingClusterBlockBuffer { mock := &PendingClusterBlockBuffer{} mock.Mock.Test(t) diff --git a/module/mock/ping_metrics.go b/module/mock/ping_metrics.go index d278cbda096..ec52ef836c5 100644 --- a/module/mock/ping_metrics.go +++ b/module/mock/ping_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -24,13 +24,12 @@ func (_m *PingMetrics) NodeReachable(node *flow.Identity, nodeInfo string, rtt t _m.Called(node, nodeInfo, rtt) } -type mockConstructorTestingTNewPingMetrics interface { +// NewPingMetrics creates a new instance of PingMetrics. 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 NewPingMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewPingMetrics creates a new instance of PingMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPingMetrics(t mockConstructorTestingTNewPingMetrics) *PingMetrics { +}) *PingMetrics { mock := &PingMetrics{} mock.Mock.Test(t) diff --git a/module/mock/processing_notifier.go b/module/mock/processing_notifier.go index b09e9efa03b..42c59fcf008 100644 --- a/module/mock/processing_notifier.go +++ b/module/mock/processing_notifier.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,13 +17,12 @@ func (_m *ProcessingNotifier) Notify(entityID flow.Identifier) { _m.Called(entityID) } -type mockConstructorTestingTNewProcessingNotifier interface { +// NewProcessingNotifier creates a new instance of ProcessingNotifier. 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 NewProcessingNotifier(t interface { mock.TestingT Cleanup(func()) -} - -// NewProcessingNotifier creates a new instance of ProcessingNotifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProcessingNotifier(t mockConstructorTestingTNewProcessingNotifier) *ProcessingNotifier { +}) *ProcessingNotifier { mock := &ProcessingNotifier{} mock.Mock.Test(t) diff --git a/module/mock/provider_metrics.go b/module/mock/provider_metrics.go index d02f0d73a57..b7773eeefed 100644 --- a/module/mock/provider_metrics.go +++ b/module/mock/provider_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -14,13 +14,12 @@ func (_m *ProviderMetrics) ChunkDataPackRequestProcessed() { _m.Called() } -type mockConstructorTestingTNewProviderMetrics interface { +// NewProviderMetrics creates a new instance of ProviderMetrics. 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 NewProviderMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewProviderMetrics creates a new instance of ProviderMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProviderMetrics(t mockConstructorTestingTNewProviderMetrics) *ProviderMetrics { +}) *ProviderMetrics { mock := &ProviderMetrics{} mock.Mock.Test(t) diff --git a/module/mock/qc_contract_client.go b/module/mock/qc_contract_client.go index 4802370d2bb..619665ed554 100644 --- a/module/mock/qc_contract_client.go +++ b/module/mock/qc_contract_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type QCContractClient struct { func (_m *QCContractClient) SubmitVote(ctx context.Context, vote *model.Vote) error { ret := _m.Called(ctx, vote) + if len(ret) == 0 { + panic("no return value specified for SubmitVote") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *model.Vote) error); ok { r0 = rf(ctx, vote) @@ -32,6 +36,10 @@ func (_m *QCContractClient) SubmitVote(ctx context.Context, vote *model.Vote) er func (_m *QCContractClient) Voted(ctx context.Context) (bool, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Voted") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bool, error)); ok { @@ -52,13 +60,12 @@ func (_m *QCContractClient) Voted(ctx context.Context) (bool, error) { return r0, r1 } -type mockConstructorTestingTNewQCContractClient interface { +// NewQCContractClient creates a new instance of QCContractClient. 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 NewQCContractClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewQCContractClient creates a new instance of QCContractClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewQCContractClient(t mockConstructorTestingTNewQCContractClient) *QCContractClient { +}) *QCContractClient { mock := &QCContractClient{} mock.Mock.Test(t) diff --git a/module/mock/random_beacon_key_store.go b/module/mock/random_beacon_key_store.go index b247339bf96..2e693fe9a69 100644 --- a/module/mock/random_beacon_key_store.go +++ b/module/mock/random_beacon_key_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type RandomBeaconKeyStore struct { func (_m *RandomBeaconKeyStore) ByView(view uint64) (crypto.PrivateKey, error) { ret := _m.Called(view) + if len(ret) == 0 { + panic("no return value specified for ByView") + } + var r0 crypto.PrivateKey var r1 error if rf, ok := ret.Get(0).(func(uint64) (crypto.PrivateKey, error)); ok { @@ -38,13 +42,12 @@ func (_m *RandomBeaconKeyStore) ByView(view uint64) (crypto.PrivateKey, error) { return r0, r1 } -type mockConstructorTestingTNewRandomBeaconKeyStore interface { +// NewRandomBeaconKeyStore creates a new instance of RandomBeaconKeyStore. 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 NewRandomBeaconKeyStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewRandomBeaconKeyStore creates a new instance of RandomBeaconKeyStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRandomBeaconKeyStore(t mockConstructorTestingTNewRandomBeaconKeyStore) *RandomBeaconKeyStore { +}) *RandomBeaconKeyStore { mock := &RandomBeaconKeyStore{} mock.Mock.Test(t) diff --git a/module/mock/rate_limited_blockstore_metrics.go b/module/mock/rate_limited_blockstore_metrics.go index f804e0824a8..e9ccb26c3c5 100644 --- a/module/mock/rate_limited_blockstore_metrics.go +++ b/module/mock/rate_limited_blockstore_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -14,13 +14,12 @@ func (_m *RateLimitedBlockstoreMetrics) BytesRead(_a0 int) { _m.Called(_a0) } -type mockConstructorTestingTNewRateLimitedBlockstoreMetrics interface { +// NewRateLimitedBlockstoreMetrics creates a new instance of RateLimitedBlockstoreMetrics. 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 NewRateLimitedBlockstoreMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewRateLimitedBlockstoreMetrics creates a new instance of RateLimitedBlockstoreMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRateLimitedBlockstoreMetrics(t mockConstructorTestingTNewRateLimitedBlockstoreMetrics) *RateLimitedBlockstoreMetrics { +}) *RateLimitedBlockstoreMetrics { mock := &RateLimitedBlockstoreMetrics{} mock.Mock.Test(t) diff --git a/module/mock/ready_done_aware.go b/module/mock/ready_done_aware.go index df4856d7c68..fa9cfc2517b 100644 --- a/module/mock/ready_done_aware.go +++ b/module/mock/ready_done_aware.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type ReadyDoneAware struct { func (_m *ReadyDoneAware) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -29,6 +33,10 @@ func (_m *ReadyDoneAware) Done() <-chan struct{} { func (_m *ReadyDoneAware) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -41,13 +49,12 @@ func (_m *ReadyDoneAware) Ready() <-chan struct{} { return r0 } -type mockConstructorTestingTNewReadyDoneAware interface { +// NewReadyDoneAware creates a new instance of ReadyDoneAware. 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 NewReadyDoneAware(t interface { mock.TestingT Cleanup(func()) -} - -// NewReadyDoneAware creates a new instance of ReadyDoneAware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReadyDoneAware(t mockConstructorTestingTNewReadyDoneAware) *ReadyDoneAware { +}) *ReadyDoneAware { mock := &ReadyDoneAware{} mock.Mock.Test(t) diff --git a/module/mock/receipt_validator.go b/module/mock/receipt_validator.go index a219f78ae84..fd217a91b10 100644 --- a/module/mock/receipt_validator.go +++ b/module/mock/receipt_validator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type ReceiptValidator struct { func (_m *ReceiptValidator) Validate(receipt *flow.ExecutionReceipt) error { ret := _m.Called(receipt) + if len(ret) == 0 { + panic("no return value specified for Validate") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) error); ok { r0 = rf(receipt) @@ -30,6 +34,10 @@ func (_m *ReceiptValidator) Validate(receipt *flow.ExecutionReceipt) error { func (_m *ReceiptValidator) ValidatePayload(candidate *flow.Block) error { ret := _m.Called(candidate) + if len(ret) == 0 { + panic("no return value specified for ValidatePayload") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.Block) error); ok { r0 = rf(candidate) @@ -40,13 +48,12 @@ func (_m *ReceiptValidator) ValidatePayload(candidate *flow.Block) error { return r0 } -type mockConstructorTestingTNewReceiptValidator interface { +// NewReceiptValidator creates a new instance of ReceiptValidator. 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 NewReceiptValidator(t interface { mock.TestingT Cleanup(func()) -} - -// NewReceiptValidator creates a new instance of ReceiptValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewReceiptValidator(t mockConstructorTestingTNewReceiptValidator) *ReceiptValidator { +}) *ReceiptValidator { mock := &ReceiptValidator{} mock.Mock.Test(t) diff --git a/module/mock/requester.go b/module/mock/requester.go index 47256ecf8bf..ef142827dbb 100644 --- a/module/mock/requester.go +++ b/module/mock/requester.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -27,13 +27,12 @@ func (_m *Requester) Query(key flow.Identifier, selector flow.IdentityFilter[flo _m.Called(key, selector) } -type mockConstructorTestingTNewRequester interface { +// NewRequester creates a new instance of Requester. 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 NewRequester(t interface { mock.TestingT Cleanup(func()) -} - -// NewRequester creates a new instance of Requester. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRequester(t mockConstructorTestingTNewRequester) *Requester { +}) *Requester { mock := &Requester{} mock.Mock.Test(t) diff --git a/module/mock/resolver_metrics.go b/module/mock/resolver_metrics.go index a2473e7bf03..39816b582fe 100644 --- a/module/mock/resolver_metrics.go +++ b/module/mock/resolver_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -38,13 +38,12 @@ func (_m *ResolverMetrics) OnDNSLookupRequestDropped() { _m.Called() } -type mockConstructorTestingTNewResolverMetrics interface { +// NewResolverMetrics creates a new instance of ResolverMetrics. 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 NewResolverMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewResolverMetrics creates a new instance of ResolverMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewResolverMetrics(t mockConstructorTestingTNewResolverMetrics) *ResolverMetrics { +}) *ResolverMetrics { mock := &ResolverMetrics{} mock.Mock.Test(t) diff --git a/module/mock/rest_metrics.go b/module/mock/rest_metrics.go index b5fbd8bc50a..687d4f3159c 100644 --- a/module/mock/rest_metrics.go +++ b/module/mock/rest_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -36,13 +36,12 @@ func (_m *RestMetrics) ObserveHTTPResponseSize(ctx context.Context, props metric _m.Called(ctx, props, sizeBytes) } -type mockConstructorTestingTNewRestMetrics interface { +// NewRestMetrics creates a new instance of RestMetrics. 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 NewRestMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewRestMetrics creates a new instance of RestMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRestMetrics(t mockConstructorTestingTNewRestMetrics) *RestMetrics { +}) *RestMetrics { mock := &RestMetrics{} mock.Mock.Test(t) diff --git a/module/mock/runtime_metrics.go b/module/mock/runtime_metrics.go index 4cb356b27e1..1f13e52b27f 100644 --- a/module/mock/runtime_metrics.go +++ b/module/mock/runtime_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -43,13 +43,12 @@ func (_m *RuntimeMetrics) RuntimeTransactionProgramsCacheMiss() { _m.Called() } -type mockConstructorTestingTNewRuntimeMetrics interface { +// NewRuntimeMetrics creates a new instance of RuntimeMetrics. 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 NewRuntimeMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewRuntimeMetrics creates a new instance of RuntimeMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRuntimeMetrics(t mockConstructorTestingTNewRuntimeMetrics) *RuntimeMetrics { +}) *RuntimeMetrics { mock := &RuntimeMetrics{} mock.Mock.Test(t) diff --git a/module/mock/sdk_client_wrapper.go b/module/mock/sdk_client_wrapper.go index 90d3a2db32e..2078655512f 100644 --- a/module/mock/sdk_client_wrapper.go +++ b/module/mock/sdk_client_wrapper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -21,6 +21,10 @@ type SDKClientWrapper struct { func (_m *SDKClientWrapper) ExecuteScriptAtBlockID(_a0 context.Context, _a1 flow.Identifier, _a2 []byte, _a3 []cadence.Value) (cadence.Value, error) { ret := _m.Called(_a0, _a1, _a2, _a3) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtBlockID") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, []cadence.Value) (cadence.Value, error)); ok { @@ -47,6 +51,10 @@ func (_m *SDKClientWrapper) ExecuteScriptAtBlockID(_a0 context.Context, _a1 flow func (_m *SDKClientWrapper) ExecuteScriptAtLatestBlock(_a0 context.Context, _a1 []byte, _a2 []cadence.Value) (cadence.Value, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for ExecuteScriptAtLatestBlock") + } + var r0 cadence.Value var r1 error if rf, ok := ret.Get(0).(func(context.Context, []byte, []cadence.Value) (cadence.Value, error)); ok { @@ -73,6 +81,10 @@ func (_m *SDKClientWrapper) ExecuteScriptAtLatestBlock(_a0 context.Context, _a1 func (_m *SDKClientWrapper) GetAccount(_a0 context.Context, _a1 flow.Address) (*flow.Account, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetAccount") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { @@ -99,6 +111,10 @@ func (_m *SDKClientWrapper) GetAccount(_a0 context.Context, _a1 flow.Address) (* func (_m *SDKClientWrapper) GetAccountAtLatestBlock(_a0 context.Context, _a1 flow.Address) (*flow.Account, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetAccountAtLatestBlock") + } + var r0 *flow.Account var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { @@ -125,6 +141,10 @@ func (_m *SDKClientWrapper) GetAccountAtLatestBlock(_a0 context.Context, _a1 flo func (_m *SDKClientWrapper) GetLatestBlock(_a0 context.Context, _a1 bool) (*flow.Block, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetLatestBlock") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (*flow.Block, error)); ok { @@ -151,6 +171,10 @@ func (_m *SDKClientWrapper) GetLatestBlock(_a0 context.Context, _a1 bool) (*flow func (_m *SDKClientWrapper) GetTransactionResult(_a0 context.Context, _a1 flow.Identifier) (*flow.TransactionResult, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetTransactionResult") + } + var r0 *flow.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.TransactionResult, error)); ok { @@ -177,6 +201,10 @@ func (_m *SDKClientWrapper) GetTransactionResult(_a0 context.Context, _a1 flow.I func (_m *SDKClientWrapper) SendTransaction(_a0 context.Context, _a1 flow.Transaction) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SendTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, flow.Transaction) error); ok { r0 = rf(_a0, _a1) @@ -187,13 +215,12 @@ func (_m *SDKClientWrapper) SendTransaction(_a0 context.Context, _a1 flow.Transa return r0 } -type mockConstructorTestingTNewSDKClientWrapper interface { +// NewSDKClientWrapper creates a new instance of SDKClientWrapper. 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 NewSDKClientWrapper(t interface { mock.TestingT Cleanup(func()) -} - -// NewSDKClientWrapper creates a new instance of SDKClientWrapper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSDKClientWrapper(t mockConstructorTestingTNewSDKClientWrapper) *SDKClientWrapper { +}) *SDKClientWrapper { mock := &SDKClientWrapper{} mock.Mock.Test(t) diff --git a/module/mock/seal_validator.go b/module/mock/seal_validator.go index 0661a6daabf..648d8363592 100644 --- a/module/mock/seal_validator.go +++ b/module/mock/seal_validator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type SealValidator struct { func (_m *SealValidator) Validate(candidate *flow.Block) (*flow.Seal, error) { ret := _m.Called(candidate) + if len(ret) == 0 { + panic("no return value specified for Validate") + } + var r0 *flow.Seal var r1 error if rf, ok := ret.Get(0).(func(*flow.Block) (*flow.Seal, error)); ok { @@ -38,13 +42,12 @@ func (_m *SealValidator) Validate(candidate *flow.Block) (*flow.Seal, error) { return r0, r1 } -type mockConstructorTestingTNewSealValidator interface { +// NewSealValidator creates a new instance of SealValidator. 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 NewSealValidator(t interface { mock.TestingT Cleanup(func()) -} - -// NewSealValidator creates a new instance of SealValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSealValidator(t mockConstructorTestingTNewSealValidator) *SealValidator { +}) *SealValidator { mock := &SealValidator{} mock.Mock.Test(t) diff --git a/module/mock/sealing_configs_getter.go b/module/mock/sealing_configs_getter.go index dfdf4179fd0..cd9c737c42a 100644 --- a/module/mock/sealing_configs_getter.go +++ b/module/mock/sealing_configs_getter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type SealingConfigsGetter struct { func (_m *SealingConfigsGetter) ApprovalRequestsThresholdConst() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ApprovalRequestsThresholdConst") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -27,6 +31,10 @@ func (_m *SealingConfigsGetter) ApprovalRequestsThresholdConst() uint64 { func (_m *SealingConfigsGetter) ChunkAlphaConst() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChunkAlphaConst") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -41,6 +49,10 @@ func (_m *SealingConfigsGetter) ChunkAlphaConst() uint { func (_m *SealingConfigsGetter) EmergencySealingActiveConst() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EmergencySealingActiveConst") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -55,6 +67,10 @@ func (_m *SealingConfigsGetter) EmergencySealingActiveConst() bool { func (_m *SealingConfigsGetter) RequireApprovalsForSealConstructionDynamicValue() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RequireApprovalsForSealConstructionDynamicValue") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -69,6 +85,10 @@ func (_m *SealingConfigsGetter) RequireApprovalsForSealConstructionDynamicValue( func (_m *SealingConfigsGetter) RequireApprovalsForSealVerificationConst() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RequireApprovalsForSealVerificationConst") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -79,13 +99,12 @@ func (_m *SealingConfigsGetter) RequireApprovalsForSealVerificationConst() uint return r0 } -type mockConstructorTestingTNewSealingConfigsGetter interface { +// NewSealingConfigsGetter creates a new instance of SealingConfigsGetter. 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 NewSealingConfigsGetter(t interface { mock.TestingT Cleanup(func()) -} - -// NewSealingConfigsGetter creates a new instance of SealingConfigsGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSealingConfigsGetter(t mockConstructorTestingTNewSealingConfigsGetter) *SealingConfigsGetter { +}) *SealingConfigsGetter { mock := &SealingConfigsGetter{} mock.Mock.Test(t) diff --git a/module/mock/sealing_configs_setter.go b/module/mock/sealing_configs_setter.go index db05378c24c..6022c86b248 100644 --- a/module/mock/sealing_configs_setter.go +++ b/module/mock/sealing_configs_setter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type SealingConfigsSetter struct { func (_m *SealingConfigsSetter) ApprovalRequestsThresholdConst() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ApprovalRequestsThresholdConst") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -27,6 +31,10 @@ func (_m *SealingConfigsSetter) ApprovalRequestsThresholdConst() uint64 { func (_m *SealingConfigsSetter) ChunkAlphaConst() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChunkAlphaConst") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -41,6 +49,10 @@ func (_m *SealingConfigsSetter) ChunkAlphaConst() uint { func (_m *SealingConfigsSetter) EmergencySealingActiveConst() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EmergencySealingActiveConst") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -55,6 +67,10 @@ func (_m *SealingConfigsSetter) EmergencySealingActiveConst() bool { func (_m *SealingConfigsSetter) RequireApprovalsForSealConstructionDynamicValue() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RequireApprovalsForSealConstructionDynamicValue") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -69,6 +85,10 @@ func (_m *SealingConfigsSetter) RequireApprovalsForSealConstructionDynamicValue( func (_m *SealingConfigsSetter) RequireApprovalsForSealVerificationConst() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RequireApprovalsForSealVerificationConst") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -83,6 +103,10 @@ func (_m *SealingConfigsSetter) RequireApprovalsForSealVerificationConst() uint func (_m *SealingConfigsSetter) SetRequiredApprovalsForSealingConstruction(newVal uint) error { ret := _m.Called(newVal) + if len(ret) == 0 { + panic("no return value specified for SetRequiredApprovalsForSealingConstruction") + } + var r0 error if rf, ok := ret.Get(0).(func(uint) error); ok { r0 = rf(newVal) @@ -93,13 +117,12 @@ func (_m *SealingConfigsSetter) SetRequiredApprovalsForSealingConstruction(newVa return r0 } -type mockConstructorTestingTNewSealingConfigsSetter interface { +// NewSealingConfigsSetter creates a new instance of SealingConfigsSetter. 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 NewSealingConfigsSetter(t interface { mock.TestingT Cleanup(func()) -} - -// NewSealingConfigsSetter creates a new instance of SealingConfigsSetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSealingConfigsSetter(t mockConstructorTestingTNewSealingConfigsSetter) *SealingConfigsSetter { +}) *SealingConfigsSetter { mock := &SealingConfigsSetter{} mock.Mock.Test(t) diff --git a/module/mock/startable.go b/module/mock/startable.go index ae29c392065..845f09f2696 100644 --- a/module/mock/startable.go +++ b/module/mock/startable.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,13 +17,12 @@ func (_m *Startable) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewStartable interface { +// NewStartable creates a new instance of Startable. 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 NewStartable(t interface { mock.TestingT Cleanup(func()) -} - -// NewStartable creates a new instance of Startable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStartable(t mockConstructorTestingTNewStartable) *Startable { +}) *Startable { mock := &Startable{} mock.Mock.Test(t) diff --git a/module/mock/sync_core.go b/module/mock/sync_core.go index cfcce6ccee5..fe629bb481d 100644 --- a/module/mock/sync_core.go +++ b/module/mock/sync_core.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -23,6 +23,10 @@ func (_m *SyncCore) BatchRequested(batch chainsync.Batch) { func (_m *SyncCore) HandleBlock(header *flow.Header) bool { ret := _m.Called(header) + if len(ret) == 0 { + panic("no return value specified for HandleBlock") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.Header) bool); ok { r0 = rf(header) @@ -47,6 +51,10 @@ func (_m *SyncCore) RangeRequested(ran chainsync.Range) { func (_m *SyncCore) ScanPending(final *flow.Header) ([]chainsync.Range, []chainsync.Batch) { ret := _m.Called(final) + if len(ret) == 0 { + panic("no return value specified for ScanPending") + } + var r0 []chainsync.Range var r1 []chainsync.Batch if rf, ok := ret.Get(0).(func(*flow.Header) ([]chainsync.Range, []chainsync.Batch)); ok { @@ -75,6 +83,10 @@ func (_m *SyncCore) ScanPending(final *flow.Header) ([]chainsync.Range, []chains func (_m *SyncCore) WithinTolerance(final *flow.Header, height uint64) bool { ret := _m.Called(final, height) + if len(ret) == 0 { + panic("no return value specified for WithinTolerance") + } + var r0 bool if rf, ok := ret.Get(0).(func(*flow.Header, uint64) bool); ok { r0 = rf(final, height) @@ -85,13 +97,12 @@ func (_m *SyncCore) WithinTolerance(final *flow.Header, height uint64) bool { return r0 } -type mockConstructorTestingTNewSyncCore interface { +// NewSyncCore creates a new instance of SyncCore. 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 NewSyncCore(t interface { mock.TestingT Cleanup(func()) -} - -// NewSyncCore creates a new instance of SyncCore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSyncCore(t mockConstructorTestingTNewSyncCore) *SyncCore { +}) *SyncCore { mock := &SyncCore{} mock.Mock.Test(t) diff --git a/module/mock/tracer.go b/module/mock/tracer.go index 65c7544ab5b..bd1610da88b 100644 --- a/module/mock/tracer.go +++ b/module/mock/tracer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -22,6 +22,10 @@ type Tracer struct { func (_m *Tracer) BlockRootSpan(blockID flow.Identifier) trace.Span { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for BlockRootSpan") + } + var r0 trace.Span if rf, ok := ret.Get(0).(func(flow.Identifier) trace.Span); ok { r0 = rf(blockID) @@ -38,6 +42,10 @@ func (_m *Tracer) BlockRootSpan(blockID flow.Identifier) trace.Span { func (_m *Tracer) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -54,6 +62,10 @@ func (_m *Tracer) Done() <-chan struct{} { func (_m *Tracer) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -70,6 +82,10 @@ func (_m *Tracer) Ready() <-chan struct{} { func (_m *Tracer) ShouldSample(entityID flow.Identifier) bool { ret := _m.Called(entityID) + if len(ret) == 0 { + panic("no return value specified for ShouldSample") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(entityID) @@ -91,6 +107,10 @@ func (_m *Tracer) StartBlockSpan(ctx context.Context, blockID flow.Identifier, s _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartBlockSpan") + } + var r0 trace.Span var r1 context.Context if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, moduletrace.SpanName, ...trace.SpanStartOption) (trace.Span, context.Context)); ok { @@ -126,6 +146,10 @@ func (_m *Tracer) StartCollectionSpan(ctx context.Context, collectionID flow.Ide _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartCollectionSpan") + } + var r0 trace.Span var r1 context.Context if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, moduletrace.SpanName, ...trace.SpanStartOption) (trace.Span, context.Context)); ok { @@ -161,6 +185,10 @@ func (_m *Tracer) StartSampledSpanFromParent(parentSpan trace.Span, entityID flo _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartSampledSpanFromParent") + } + var r0 trace.Span if rf, ok := ret.Get(0).(func(trace.Span, flow.Identifier, moduletrace.SpanName, ...trace.SpanStartOption) trace.Span); ok { r0 = rf(parentSpan, entityID, operationName, opts...) @@ -184,6 +212,10 @@ func (_m *Tracer) StartSpanFromContext(ctx context.Context, operationName module _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartSpanFromContext") + } + var r0 trace.Span var r1 context.Context if rf, ok := ret.Get(0).(func(context.Context, moduletrace.SpanName, ...trace.SpanStartOption) (trace.Span, context.Context)); ok { @@ -219,6 +251,10 @@ func (_m *Tracer) StartSpanFromParent(parentSpan trace.Span, operationName modul _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartSpanFromParent") + } + var r0 trace.Span if rf, ok := ret.Get(0).(func(trace.Span, moduletrace.SpanName, ...trace.SpanStartOption) trace.Span); ok { r0 = rf(parentSpan, operationName, opts...) @@ -243,13 +279,12 @@ func (_m *Tracer) WithSpanFromContext(ctx context.Context, operationName modulet _m.Called(_ca...) } -type mockConstructorTestingTNewTracer interface { +// NewTracer creates a new instance of Tracer. 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 NewTracer(t interface { mock.TestingT Cleanup(func()) -} - -// NewTracer creates a new instance of Tracer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTracer(t mockConstructorTestingTNewTracer) *Tracer { +}) *Tracer { mock := &Tracer{} mock.Mock.Test(t) diff --git a/module/mock/transaction_metrics.go b/module/mock/transaction_metrics.go index 06cfb5d8f9a..9345b934a9a 100644 --- a/module/mock/transaction_metrics.go +++ b/module/mock/transaction_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -44,13 +44,12 @@ func (_m *TransactionMetrics) TransactionSubmissionFailed() { _m.Called() } -type mockConstructorTestingTNewTransactionMetrics interface { +// NewTransactionMetrics creates a new instance of TransactionMetrics. 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 NewTransactionMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewTransactionMetrics creates a new instance of TransactionMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransactionMetrics(t mockConstructorTestingTNewTransactionMetrics) *TransactionMetrics { +}) *TransactionMetrics { mock := &TransactionMetrics{} mock.Mock.Test(t) diff --git a/module/mock/unicast_manager_metrics.go b/module/mock/unicast_manager_metrics.go index fec1e0b55d5..627ca3dd44e 100644 --- a/module/mock/unicast_manager_metrics.go +++ b/module/mock/unicast_manager_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -63,13 +63,12 @@ func (_m *UnicastManagerMetrics) OnStreamEstablished(duration time.Duration, att _m.Called(duration, attempts) } -type mockConstructorTestingTNewUnicastManagerMetrics interface { +// NewUnicastManagerMetrics creates a new instance of UnicastManagerMetrics. 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 NewUnicastManagerMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnicastManagerMetrics creates a new instance of UnicastManagerMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnicastManagerMetrics(t mockConstructorTestingTNewUnicastManagerMetrics) *UnicastManagerMetrics { +}) *UnicastManagerMetrics { mock := &UnicastManagerMetrics{} mock.Mock.Test(t) diff --git a/module/mock/verification_metrics.go b/module/mock/verification_metrics.go index 4b357a6b163..c8f6385eafd 100644 --- a/module/mock/verification_metrics.go +++ b/module/mock/verification_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -94,13 +94,12 @@ func (_m *VerificationMetrics) SetMaxChunkDataPackAttemptsForNextUnsealedHeightA _m.Called(attempts) } -type mockConstructorTestingTNewVerificationMetrics interface { +// NewVerificationMetrics creates a new instance of VerificationMetrics. 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 NewVerificationMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewVerificationMetrics creates a new instance of VerificationMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVerificationMetrics(t mockConstructorTestingTNewVerificationMetrics) *VerificationMetrics { +}) *VerificationMetrics { mock := &VerificationMetrics{} mock.Mock.Test(t) diff --git a/module/mock/wal_metrics.go b/module/mock/wal_metrics.go index 04806761950..39720d3f37d 100644 --- a/module/mock/wal_metrics.go +++ b/module/mock/wal_metrics.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -14,13 +14,12 @@ func (_m *WALMetrics) ExecutionCheckpointSize(bytes uint64) { _m.Called(bytes) } -type mockConstructorTestingTNewWALMetrics interface { +// NewWALMetrics creates a new instance of WALMetrics. 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 NewWALMetrics(t interface { mock.TestingT Cleanup(func()) -} - -// NewWALMetrics creates a new instance of WALMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWALMetrics(t mockConstructorTestingTNewWALMetrics) *WALMetrics { +}) *WALMetrics { mock := &WALMetrics{} mock.Mock.Test(t) diff --git a/module/state_synchronization/mock/execution_data_requester.go b/module/state_synchronization/mock/execution_data_requester.go index c65bdfc0004..ace0f28ff4f 100644 --- a/module/state_synchronization/mock/execution_data_requester.go +++ b/module/state_synchronization/mock/execution_data_requester.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package state_synchronization @@ -18,6 +18,10 @@ type ExecutionDataRequester struct { func (_m *ExecutionDataRequester) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *ExecutionDataRequester) Done() <-chan struct{} { func (_m *ExecutionDataRequester) HighestConsecutiveHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for HighestConsecutiveHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -63,6 +71,10 @@ func (_m *ExecutionDataRequester) OnBlockFinalized(_a0 *model.Block) { func (_m *ExecutionDataRequester) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -80,13 +92,12 @@ func (_m *ExecutionDataRequester) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewExecutionDataRequester interface { +// NewExecutionDataRequester creates a new instance of ExecutionDataRequester. 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 NewExecutionDataRequester(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionDataRequester creates a new instance of ExecutionDataRequester. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionDataRequester(t mockConstructorTestingTNewExecutionDataRequester) *ExecutionDataRequester { +}) *ExecutionDataRequester { mock := &ExecutionDataRequester{} mock.Mock.Test(t) diff --git a/module/state_synchronization/mock/index_reporter.go b/module/state_synchronization/mock/index_reporter.go index f8fce21feda..31993bb2cd7 100644 --- a/module/state_synchronization/mock/index_reporter.go +++ b/module/state_synchronization/mock/index_reporter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package state_synchronization @@ -13,6 +13,10 @@ type IndexReporter struct { func (_m *IndexReporter) HighestIndexedHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for HighestIndexedHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -37,6 +41,10 @@ func (_m *IndexReporter) HighestIndexedHeight() (uint64, error) { func (_m *IndexReporter) LowestIndexedHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LowestIndexedHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -57,13 +65,12 @@ func (_m *IndexReporter) LowestIndexedHeight() (uint64, error) { return r0, r1 } -type mockConstructorTestingTNewIndexReporter interface { +// NewIndexReporter creates a new instance of IndexReporter. 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 NewIndexReporter(t interface { mock.TestingT Cleanup(func()) -} - -// NewIndexReporter creates a new instance of IndexReporter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIndexReporter(t mockConstructorTestingTNewIndexReporter) *IndexReporter { +}) *IndexReporter { mock := &IndexReporter{} mock.Mock.Test(t) diff --git a/network/alsp/mock/misbehavior_report_opt.go b/network/alsp/mock/misbehavior_report_opt.go index e3fe6b57941..4403eb81b1f 100644 --- a/network/alsp/mock/misbehavior_report_opt.go +++ b/network/alsp/mock/misbehavior_report_opt.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockalsp @@ -16,6 +16,10 @@ type MisbehaviorReportOpt struct { func (_m *MisbehaviorReportOpt) Execute(r *alsp.MisbehaviorReport) error { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 error if rf, ok := ret.Get(0).(func(*alsp.MisbehaviorReport) error); ok { r0 = rf(r) @@ -26,13 +30,12 @@ func (_m *MisbehaviorReportOpt) Execute(r *alsp.MisbehaviorReport) error { return r0 } -type mockConstructorTestingTNewMisbehaviorReportOpt interface { +// NewMisbehaviorReportOpt creates a new instance of MisbehaviorReportOpt. 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 NewMisbehaviorReportOpt(t interface { mock.TestingT Cleanup(func()) -} - -// NewMisbehaviorReportOpt creates a new instance of MisbehaviorReportOpt. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMisbehaviorReportOpt(t mockConstructorTestingTNewMisbehaviorReportOpt) *MisbehaviorReportOpt { +}) *MisbehaviorReportOpt { mock := &MisbehaviorReportOpt{} mock.Mock.Test(t) diff --git a/network/alsp/mock/spam_record_cache.go b/network/alsp/mock/spam_record_cache.go index f9c7a6952bd..8b4b1c442f3 100644 --- a/network/alsp/mock/spam_record_cache.go +++ b/network/alsp/mock/spam_record_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockalsp @@ -18,6 +18,10 @@ type SpamRecordCache struct { func (_m *SpamRecordCache) AdjustWithInit(originId flow.Identifier, adjustFunc model.RecordAdjustFunc) (float64, error) { ret := _m.Called(originId, adjustFunc) + if len(ret) == 0 { + panic("no return value specified for AdjustWithInit") + } + var r0 float64 var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, model.RecordAdjustFunc) (float64, error)); ok { @@ -42,6 +46,10 @@ func (_m *SpamRecordCache) AdjustWithInit(originId flow.Identifier, adjustFunc m func (_m *SpamRecordCache) Get(originId flow.Identifier) (*model.ProtocolSpamRecord, bool) { ret := _m.Called(originId) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *model.ProtocolSpamRecord var r1 bool if rf, ok := ret.Get(0).(func(flow.Identifier) (*model.ProtocolSpamRecord, bool)); ok { @@ -68,6 +76,10 @@ func (_m *SpamRecordCache) Get(originId flow.Identifier) (*model.ProtocolSpamRec func (_m *SpamRecordCache) Identities() []flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Identities") + } + var r0 []flow.Identifier if rf, ok := ret.Get(0).(func() []flow.Identifier); ok { r0 = rf() @@ -84,6 +96,10 @@ func (_m *SpamRecordCache) Identities() []flow.Identifier { func (_m *SpamRecordCache) Remove(originId flow.Identifier) bool { ret := _m.Called(originId) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 bool if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { r0 = rf(originId) @@ -98,6 +114,10 @@ func (_m *SpamRecordCache) Remove(originId flow.Identifier) bool { func (_m *SpamRecordCache) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -108,13 +128,12 @@ func (_m *SpamRecordCache) Size() uint { return r0 } -type mockConstructorTestingTNewSpamRecordCache interface { +// NewSpamRecordCache creates a new instance of SpamRecordCache. 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 NewSpamRecordCache(t interface { mock.TestingT Cleanup(func()) -} - -// NewSpamRecordCache creates a new instance of SpamRecordCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSpamRecordCache(t mockConstructorTestingTNewSpamRecordCache) *SpamRecordCache { +}) *SpamRecordCache { mock := &SpamRecordCache{} mock.Mock.Test(t) diff --git a/network/mocknetwork/basic_resolver.go b/network/mocknetwork/basic_resolver.go index 9cf9f6bcbde..8acd24f2c79 100644 --- a/network/mocknetwork/basic_resolver.go +++ b/network/mocknetwork/basic_resolver.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type BasicResolver struct { func (_m *BasicResolver) LookupIPAddr(_a0 context.Context, _a1 string) ([]net.IPAddr, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LookupIPAddr") + } + var r0 []net.IPAddr var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]net.IPAddr, error)); ok { @@ -44,6 +48,10 @@ func (_m *BasicResolver) LookupIPAddr(_a0 context.Context, _a1 string) ([]net.IP func (_m *BasicResolver) LookupTXT(_a0 context.Context, _a1 string) ([]string, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LookupTXT") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { @@ -66,13 +74,12 @@ func (_m *BasicResolver) LookupTXT(_a0 context.Context, _a1 string) ([]string, e return r0, r1 } -type mockConstructorTestingTNewBasicResolver interface { +// NewBasicResolver creates a new instance of BasicResolver. 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 NewBasicResolver(t interface { mock.TestingT Cleanup(func()) -} - -// NewBasicResolver creates a new instance of BasicResolver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBasicResolver(t mockConstructorTestingTNewBasicResolver) *BasicResolver { +}) *BasicResolver { mock := &BasicResolver{} mock.Mock.Test(t) diff --git a/network/mocknetwork/blob_getter.go b/network/mocknetwork/blob_getter.go index 1fa2c1e8f49..02fb0e77648 100644 --- a/network/mocknetwork/blob_getter.go +++ b/network/mocknetwork/blob_getter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -20,6 +20,10 @@ type BlobGetter struct { func (_m *BlobGetter) GetBlob(ctx context.Context, c cid.Cid) (blocks.Block, error) { ret := _m.Called(ctx, c) + if len(ret) == 0 { + panic("no return value specified for GetBlob") + } + var r0 blocks.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) (blocks.Block, error)); ok { @@ -46,6 +50,10 @@ func (_m *BlobGetter) GetBlob(ctx context.Context, c cid.Cid) (blocks.Block, err func (_m *BlobGetter) GetBlobs(ctx context.Context, ks []cid.Cid) <-chan blocks.Block { ret := _m.Called(ctx, ks) + if len(ret) == 0 { + panic("no return value specified for GetBlobs") + } + var r0 <-chan blocks.Block if rf, ok := ret.Get(0).(func(context.Context, []cid.Cid) <-chan blocks.Block); ok { r0 = rf(ctx, ks) @@ -58,13 +66,12 @@ func (_m *BlobGetter) GetBlobs(ctx context.Context, ks []cid.Cid) <-chan blocks. return r0 } -type mockConstructorTestingTNewBlobGetter interface { +// NewBlobGetter creates a new instance of BlobGetter. 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 NewBlobGetter(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlobGetter creates a new instance of BlobGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlobGetter(t mockConstructorTestingTNewBlobGetter) *BlobGetter { +}) *BlobGetter { mock := &BlobGetter{} mock.Mock.Test(t) diff --git a/network/mocknetwork/blob_service.go b/network/mocknetwork/blob_service.go index acf392695c3..cef91e68411 100644 --- a/network/mocknetwork/blob_service.go +++ b/network/mocknetwork/blob_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -24,6 +24,10 @@ type BlobService struct { func (_m *BlobService) AddBlob(ctx context.Context, b blocks.Block) error { ret := _m.Called(ctx, b) + if len(ret) == 0 { + panic("no return value specified for AddBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, blocks.Block) error); ok { r0 = rf(ctx, b) @@ -38,6 +42,10 @@ func (_m *BlobService) AddBlob(ctx context.Context, b blocks.Block) error { func (_m *BlobService) AddBlobs(ctx context.Context, bs []blocks.Block) error { ret := _m.Called(ctx, bs) + if len(ret) == 0 { + panic("no return value specified for AddBlobs") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []blocks.Block) error); ok { r0 = rf(ctx, bs) @@ -52,6 +60,10 @@ func (_m *BlobService) AddBlobs(ctx context.Context, bs []blocks.Block) error { func (_m *BlobService) DeleteBlob(ctx context.Context, c cid.Cid) error { ret := _m.Called(ctx, c) + if len(ret) == 0 { + panic("no return value specified for DeleteBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) error); ok { r0 = rf(ctx, c) @@ -66,6 +78,10 @@ func (_m *BlobService) DeleteBlob(ctx context.Context, c cid.Cid) error { func (_m *BlobService) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -82,6 +98,10 @@ func (_m *BlobService) Done() <-chan struct{} { func (_m *BlobService) GetBlob(ctx context.Context, c cid.Cid) (blocks.Block, error) { ret := _m.Called(ctx, c) + if len(ret) == 0 { + panic("no return value specified for GetBlob") + } + var r0 blocks.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) (blocks.Block, error)); ok { @@ -108,6 +128,10 @@ func (_m *BlobService) GetBlob(ctx context.Context, c cid.Cid) (blocks.Block, er func (_m *BlobService) GetBlobs(ctx context.Context, ks []cid.Cid) <-chan blocks.Block { ret := _m.Called(ctx, ks) + if len(ret) == 0 { + panic("no return value specified for GetBlobs") + } + var r0 <-chan blocks.Block if rf, ok := ret.Get(0).(func(context.Context, []cid.Cid) <-chan blocks.Block); ok { r0 = rf(ctx, ks) @@ -124,6 +148,10 @@ func (_m *BlobService) GetBlobs(ctx context.Context, ks []cid.Cid) <-chan blocks func (_m *BlobService) GetSession(ctx context.Context) network.BlobGetter { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetSession") + } + var r0 network.BlobGetter if rf, ok := ret.Get(0).(func(context.Context) network.BlobGetter); ok { r0 = rf(ctx) @@ -140,6 +168,10 @@ func (_m *BlobService) GetSession(ctx context.Context) network.BlobGetter { func (_m *BlobService) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -161,6 +193,10 @@ func (_m *BlobService) Start(_a0 irrecoverable.SignalerContext) { func (_m *BlobService) TriggerReprovide(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for TriggerReprovide") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -171,13 +207,12 @@ func (_m *BlobService) TriggerReprovide(ctx context.Context) error { return r0 } -type mockConstructorTestingTNewBlobService interface { +// NewBlobService creates a new instance of BlobService. 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 NewBlobService(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlobService creates a new instance of BlobService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlobService(t mockConstructorTestingTNewBlobService) *BlobService { +}) *BlobService { mock := &BlobService{} mock.Mock.Test(t) diff --git a/network/mocknetwork/blob_service_option.go b/network/mocknetwork/blob_service_option.go index 7547090a254..0e275bed6b3 100644 --- a/network/mocknetwork/blob_service_option.go +++ b/network/mocknetwork/blob_service_option.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -17,13 +17,12 @@ func (_m *BlobServiceOption) Execute(_a0 network.BlobService) { _m.Called(_a0) } -type mockConstructorTestingTNewBlobServiceOption interface { +// NewBlobServiceOption creates a new instance of BlobServiceOption. 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 NewBlobServiceOption(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlobServiceOption creates a new instance of BlobServiceOption. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlobServiceOption(t mockConstructorTestingTNewBlobServiceOption) *BlobServiceOption { +}) *BlobServiceOption { mock := &BlobServiceOption{} mock.Mock.Test(t) diff --git a/network/mocknetwork/codec.go b/network/mocknetwork/codec.go index 3da3e34a5ba..e6033ac0cff 100644 --- a/network/mocknetwork/codec.go +++ b/network/mocknetwork/codec.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type Codec struct { func (_m *Codec) Decode(data []byte) (interface{}, error) { ret := _m.Called(data) + if len(ret) == 0 { + panic("no return value specified for Decode") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func([]byte) (interface{}, error)); ok { @@ -44,6 +48,10 @@ func (_m *Codec) Decode(data []byte) (interface{}, error) { func (_m *Codec) Encode(v interface{}) ([]byte, error) { ret := _m.Called(v) + if len(ret) == 0 { + panic("no return value specified for Encode") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(interface{}) ([]byte, error)); ok { @@ -70,6 +78,10 @@ func (_m *Codec) Encode(v interface{}) ([]byte, error) { func (_m *Codec) NewDecoder(r io.Reader) network.Decoder { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for NewDecoder") + } + var r0 network.Decoder if rf, ok := ret.Get(0).(func(io.Reader) network.Decoder); ok { r0 = rf(r) @@ -86,6 +98,10 @@ func (_m *Codec) NewDecoder(r io.Reader) network.Decoder { func (_m *Codec) NewEncoder(w io.Writer) network.Encoder { ret := _m.Called(w) + if len(ret) == 0 { + panic("no return value specified for NewEncoder") + } + var r0 network.Encoder if rf, ok := ret.Get(0).(func(io.Writer) network.Encoder); ok { r0 = rf(w) @@ -98,13 +114,12 @@ func (_m *Codec) NewEncoder(w io.Writer) network.Encoder { return r0 } -type mockConstructorTestingTNewCodec interface { +// NewCodec creates a new instance of Codec. 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 NewCodec(t interface { mock.TestingT Cleanup(func()) -} - -// NewCodec creates a new instance of Codec. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCodec(t mockConstructorTestingTNewCodec) *Codec { +}) *Codec { mock := &Codec{} mock.Mock.Test(t) diff --git a/network/mocknetwork/compressor.go b/network/mocknetwork/compressor.go index ad6f1cd716c..55ffb61229e 100644 --- a/network/mocknetwork/compressor.go +++ b/network/mocknetwork/compressor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type Compressor struct { func (_m *Compressor) NewReader(_a0 io.Reader) (io.ReadCloser, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NewReader") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(io.Reader) (io.ReadCloser, error)); ok { @@ -44,6 +48,10 @@ func (_m *Compressor) NewReader(_a0 io.Reader) (io.ReadCloser, error) { func (_m *Compressor) NewWriter(_a0 io.Writer) (network.WriteCloseFlusher, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NewWriter") + } + var r0 network.WriteCloseFlusher var r1 error if rf, ok := ret.Get(0).(func(io.Writer) (network.WriteCloseFlusher, error)); ok { @@ -66,13 +74,12 @@ func (_m *Compressor) NewWriter(_a0 io.Writer) (network.WriteCloseFlusher, error return r0, r1 } -type mockConstructorTestingTNewCompressor interface { +// NewCompressor creates a new instance of Compressor. 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 NewCompressor(t interface { mock.TestingT Cleanup(func()) -} - -// NewCompressor creates a new instance of Compressor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCompressor(t mockConstructorTestingTNewCompressor) *Compressor { +}) *Compressor { mock := &Compressor{} mock.Mock.Test(t) diff --git a/network/mocknetwork/conduit.go b/network/mocknetwork/conduit.go index 06bb0f9f5f2..b02aebee04b 100644 --- a/network/mocknetwork/conduit.go +++ b/network/mocknetwork/conduit.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type Conduit struct { func (_m *Conduit) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -39,6 +43,10 @@ func (_m *Conduit) Multicast(event interface{}, num uint, targetIDs ...flow.Iden _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Multicast") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}, uint, ...flow.Identifier) error); ok { r0 = rf(event, num, targetIDs...) @@ -60,6 +68,10 @@ func (_m *Conduit) Publish(event interface{}, targetIDs ...flow.Identifier) erro _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Publish") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}, ...flow.Identifier) error); ok { r0 = rf(event, targetIDs...) @@ -79,6 +91,10 @@ func (_m *Conduit) ReportMisbehavior(_a0 network.MisbehaviorReport) { func (_m *Conduit) Unicast(event interface{}, targetID flow.Identifier) error { ret := _m.Called(event, targetID) + if len(ret) == 0 { + panic("no return value specified for Unicast") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}, flow.Identifier) error); ok { r0 = rf(event, targetID) @@ -89,13 +105,12 @@ func (_m *Conduit) Unicast(event interface{}, targetID flow.Identifier) error { return r0 } -type mockConstructorTestingTNewConduit interface { +// NewConduit creates a new instance of Conduit. 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 NewConduit(t interface { mock.TestingT Cleanup(func()) -} - -// NewConduit creates a new instance of Conduit. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConduit(t mockConstructorTestingTNewConduit) *Conduit { +}) *Conduit { mock := &Conduit{} mock.Mock.Test(t) diff --git a/network/mocknetwork/conduit_adapter.go b/network/mocknetwork/conduit_adapter.go index 360aa12ccfc..857280c22a9 100644 --- a/network/mocknetwork/conduit_adapter.go +++ b/network/mocknetwork/conduit_adapter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -27,6 +27,10 @@ func (_m *ConduitAdapter) MulticastOnChannel(_a0 channels.Channel, _a1 interface _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for MulticastOnChannel") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel, interface{}, uint, ...flow.Identifier) error); ok { r0 = rf(_a0, _a1, _a2, _a3...) @@ -48,6 +52,10 @@ func (_m *ConduitAdapter) PublishOnChannel(_a0 channels.Channel, _a1 interface{} _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PublishOnChannel") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel, interface{}, ...flow.Identifier) error); ok { r0 = rf(_a0, _a1, _a2...) @@ -67,6 +75,10 @@ func (_m *ConduitAdapter) ReportMisbehaviorOnChannel(channel channels.Channel, r func (_m *ConduitAdapter) UnRegisterChannel(channel channels.Channel) error { ret := _m.Called(channel) + if len(ret) == 0 { + panic("no return value specified for UnRegisterChannel") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel) error); ok { r0 = rf(channel) @@ -81,6 +93,10 @@ func (_m *ConduitAdapter) UnRegisterChannel(channel channels.Channel) error { func (_m *ConduitAdapter) UnicastOnChannel(_a0 channels.Channel, _a1 interface{}, _a2 flow.Identifier) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for UnicastOnChannel") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel, interface{}, flow.Identifier) error); ok { r0 = rf(_a0, _a1, _a2) @@ -91,13 +107,12 @@ func (_m *ConduitAdapter) UnicastOnChannel(_a0 channels.Channel, _a1 interface{} return r0 } -type mockConstructorTestingTNewConduitAdapter interface { +// NewConduitAdapter creates a new instance of ConduitAdapter. 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 NewConduitAdapter(t interface { mock.TestingT Cleanup(func()) -} - -// NewConduitAdapter creates a new instance of ConduitAdapter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConduitAdapter(t mockConstructorTestingTNewConduitAdapter) *ConduitAdapter { +}) *ConduitAdapter { mock := &ConduitAdapter{} mock.Mock.Test(t) diff --git a/network/mocknetwork/conduit_factory.go b/network/mocknetwork/conduit_factory.go index 4eafe3d8448..83937f107e3 100644 --- a/network/mocknetwork/conduit_factory.go +++ b/network/mocknetwork/conduit_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -21,6 +21,10 @@ type ConduitFactory struct { func (_m *ConduitFactory) NewConduit(_a0 context.Context, _a1 channels.Channel) (network.Conduit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for NewConduit") + } + var r0 network.Conduit var r1 error if rf, ok := ret.Get(0).(func(context.Context, channels.Channel) (network.Conduit, error)); ok { @@ -47,6 +51,10 @@ func (_m *ConduitFactory) NewConduit(_a0 context.Context, _a1 channels.Channel) func (_m *ConduitFactory) RegisterAdapter(_a0 network.ConduitAdapter) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for RegisterAdapter") + } + var r0 error if rf, ok := ret.Get(0).(func(network.ConduitAdapter) error); ok { r0 = rf(_a0) @@ -57,13 +65,12 @@ func (_m *ConduitFactory) RegisterAdapter(_a0 network.ConduitAdapter) error { return r0 } -type mockConstructorTestingTNewConduitFactory interface { +// NewConduitFactory creates a new instance of ConduitFactory. 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 NewConduitFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewConduitFactory creates a new instance of ConduitFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConduitFactory(t mockConstructorTestingTNewConduitFactory) *ConduitFactory { +}) *ConduitFactory { mock := &ConduitFactory{} mock.Mock.Test(t) diff --git a/network/mocknetwork/connection.go b/network/mocknetwork/connection.go index 337d51fca93..14bafe8d08e 100644 --- a/network/mocknetwork/connection.go +++ b/network/mocknetwork/connection.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -13,6 +13,10 @@ type Connection struct { func (_m *Connection) Receive() (interface{}, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Receive") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func() (interface{}, error)); ok { @@ -39,6 +43,10 @@ func (_m *Connection) Receive() (interface{}, error) { func (_m *Connection) Send(msg interface{}) error { ret := _m.Called(msg) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(msg) @@ -49,13 +57,12 @@ func (_m *Connection) Send(msg interface{}) error { return r0 } -type mockConstructorTestingTNewConnection interface { +// 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 { mock.TestingT Cleanup(func()) -} - -// 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. -func NewConnection(t mockConstructorTestingTNewConnection) *Connection { +}) *Connection { mock := &Connection{} mock.Mock.Test(t) diff --git a/network/mocknetwork/connector.go b/network/mocknetwork/connector.go index deedbd4f815..0bfe4d1cf7a 100644 --- a/network/mocknetwork/connector.go +++ b/network/mocknetwork/connector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -20,13 +20,12 @@ func (_m *Connector) Connect(ctx context.Context, peerChan <-chan peer.AddrInfo) _m.Called(ctx, peerChan) } -type mockConstructorTestingTNewConnector interface { +// NewConnector creates a new instance of Connector. 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 NewConnector(t interface { mock.TestingT Cleanup(func()) -} - -// NewConnector creates a new instance of Connector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnector(t mockConstructorTestingTNewConnector) *Connector { +}) *Connector { mock := &Connector{} mock.Mock.Test(t) diff --git a/network/mocknetwork/connector_factory.go b/network/mocknetwork/connector_factory.go index b1baeb4f749..5bde059b563 100644 --- a/network/mocknetwork/connector_factory.go +++ b/network/mocknetwork/connector_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type ConnectorFactory struct { func (_m *ConnectorFactory) Execute(_a0 host.Host) (p2p.Connector, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.Connector var r1 error if rf, ok := ret.Get(0).(func(host.Host) (p2p.Connector, error)); ok { @@ -40,13 +44,12 @@ func (_m *ConnectorFactory) Execute(_a0 host.Host) (p2p.Connector, error) { return r0, r1 } -type mockConstructorTestingTNewConnectorFactory interface { +// NewConnectorFactory creates a new instance of ConnectorFactory. 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 NewConnectorFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewConnectorFactory creates a new instance of ConnectorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnectorFactory(t mockConstructorTestingTNewConnectorFactory) *ConnectorFactory { +}) *ConnectorFactory { mock := &ConnectorFactory{} mock.Mock.Test(t) diff --git a/network/mocknetwork/connector_host.go b/network/mocknetwork/connector_host.go index e656391a11f..143e9d6f8be 100644 --- a/network/mocknetwork/connector_host.go +++ b/network/mocknetwork/connector_host.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type ConnectorHost struct { func (_m *ConnectorHost) ClosePeer(peerId peer.ID) error { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for ClosePeer") + } + var r0 error if rf, ok := ret.Get(0).(func(peer.ID) error); ok { r0 = rf(peerId) @@ -32,6 +36,10 @@ func (_m *ConnectorHost) ClosePeer(peerId peer.ID) error { func (_m *ConnectorHost) Connections() []network.Conn { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Connections") + } + var r0 []network.Conn if rf, ok := ret.Get(0).(func() []network.Conn); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *ConnectorHost) Connections() []network.Conn { func (_m *ConnectorHost) ID() peer.ID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 peer.ID if rf, ok := ret.Get(0).(func() peer.ID); ok { r0 = rf() @@ -62,6 +74,10 @@ func (_m *ConnectorHost) ID() peer.ID { func (_m *ConnectorHost) IsConnectedTo(peerId peer.ID) bool { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for IsConnectedTo") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID) bool); ok { r0 = rf(peerId) @@ -76,6 +92,10 @@ func (_m *ConnectorHost) IsConnectedTo(peerId peer.ID) bool { func (_m *ConnectorHost) IsProtected(peerId peer.ID) bool { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for IsProtected") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID) bool); ok { r0 = rf(peerId) @@ -90,6 +110,10 @@ func (_m *ConnectorHost) IsProtected(peerId peer.ID) bool { func (_m *ConnectorHost) PeerInfo(peerId peer.ID) peer.AddrInfo { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for PeerInfo") + } + var r0 peer.AddrInfo if rf, ok := ret.Get(0).(func(peer.ID) peer.AddrInfo); ok { r0 = rf(peerId) @@ -100,13 +124,12 @@ func (_m *ConnectorHost) PeerInfo(peerId peer.ID) peer.AddrInfo { return r0 } -type mockConstructorTestingTNewConnectorHost interface { +// NewConnectorHost creates a new instance of ConnectorHost. 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 NewConnectorHost(t interface { mock.TestingT Cleanup(func()) -} - -// NewConnectorHost creates a new instance of ConnectorHost. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnectorHost(t mockConstructorTestingTNewConnectorHost) *ConnectorHost { +}) *ConnectorHost { mock := &ConnectorHost{} mock.Mock.Test(t) diff --git a/network/mocknetwork/decoder.go b/network/mocknetwork/decoder.go index 306fd9b3df1..415fe2c689a 100644 --- a/network/mocknetwork/decoder.go +++ b/network/mocknetwork/decoder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -13,6 +13,10 @@ type Decoder struct { func (_m *Decoder) Decode() (interface{}, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Decode") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func() (interface{}, error)); ok { @@ -35,13 +39,12 @@ func (_m *Decoder) Decode() (interface{}, error) { return r0, r1 } -type mockConstructorTestingTNewDecoder interface { +// NewDecoder creates a new instance of Decoder. 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 NewDecoder(t interface { mock.TestingT Cleanup(func()) -} - -// NewDecoder creates a new instance of Decoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDecoder(t mockConstructorTestingTNewDecoder) *Decoder { +}) *Decoder { mock := &Decoder{} mock.Mock.Test(t) diff --git a/network/mocknetwork/disallow_list_notification_consumer.go b/network/mocknetwork/disallow_list_notification_consumer.go index 802caddf023..79f42ef7694 100644 --- a/network/mocknetwork/disallow_list_notification_consumer.go +++ b/network/mocknetwork/disallow_list_notification_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -22,13 +22,12 @@ func (_m *DisallowListNotificationConsumer) OnDisallowListNotification(_a0 *netw _m.Called(_a0) } -type mockConstructorTestingTNewDisallowListNotificationConsumer interface { +// NewDisallowListNotificationConsumer creates a new instance of DisallowListNotificationConsumer. 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 NewDisallowListNotificationConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewDisallowListNotificationConsumer creates a new instance of DisallowListNotificationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDisallowListNotificationConsumer(t mockConstructorTestingTNewDisallowListNotificationConsumer) *DisallowListNotificationConsumer { +}) *DisallowListNotificationConsumer { mock := &DisallowListNotificationConsumer{} mock.Mock.Test(t) diff --git a/network/mocknetwork/encoder.go b/network/mocknetwork/encoder.go index 41a260a7168..b0ba97f4380 100644 --- a/network/mocknetwork/encoder.go +++ b/network/mocknetwork/encoder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -13,6 +13,10 @@ type Encoder struct { func (_m *Encoder) Encode(v interface{}) error { ret := _m.Called(v) + if len(ret) == 0 { + panic("no return value specified for Encode") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(v) @@ -23,13 +27,12 @@ func (_m *Encoder) Encode(v interface{}) error { return r0 } -type mockConstructorTestingTNewEncoder interface { +// NewEncoder creates a new instance of Encoder. 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 NewEncoder(t interface { mock.TestingT Cleanup(func()) -} - -// NewEncoder creates a new instance of Encoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEncoder(t mockConstructorTestingTNewEncoder) *Encoder { +}) *Encoder { mock := &Encoder{} mock.Mock.Test(t) diff --git a/network/mocknetwork/engine.go b/network/mocknetwork/engine.go index 47c82c8cb3d..3963dc0471f 100644 --- a/network/mocknetwork/engine.go +++ b/network/mocknetwork/engine.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type Engine struct { func (_m *Engine) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *Engine) Done() <-chan struct{} { func (_m *Engine) Process(channel channels.Channel, originID flow.Identifier, event interface{}) error { ret := _m.Called(channel, originID, event) + if len(ret) == 0 { + panic("no return value specified for Process") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel, flow.Identifier, interface{}) error); ok { r0 = rf(channel, originID, event) @@ -48,6 +56,10 @@ func (_m *Engine) Process(channel channels.Channel, originID flow.Identifier, ev func (_m *Engine) ProcessLocal(event interface{}) error { ret := _m.Called(event) + if len(ret) == 0 { + panic("no return value specified for ProcessLocal") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(event) @@ -62,6 +74,10 @@ func (_m *Engine) ProcessLocal(event interface{}) error { func (_m *Engine) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -84,13 +100,12 @@ func (_m *Engine) SubmitLocal(event interface{}) { _m.Called(event) } -type mockConstructorTestingTNewEngine interface { +// NewEngine creates a new instance of Engine. 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 NewEngine(t interface { mock.TestingT Cleanup(func()) -} - -// NewEngine creates a new instance of Engine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEngine(t mockConstructorTestingTNewEngine) *Engine { +}) *Engine { mock := &Engine{} mock.Mock.Test(t) diff --git a/network/mocknetwork/engine_registry.go b/network/mocknetwork/engine_registry.go index 982f1ada77d..1909facc1f8 100644 --- a/network/mocknetwork/engine_registry.go +++ b/network/mocknetwork/engine_registry.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -24,6 +24,10 @@ type EngineRegistry struct { func (_m *EngineRegistry) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -40,6 +44,10 @@ func (_m *EngineRegistry) Done() <-chan struct{} { func (_m *EngineRegistry) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -56,6 +64,10 @@ func (_m *EngineRegistry) Ready() <-chan struct{} { func (_m *EngineRegistry) Register(channel channels.Channel, messageProcessor network.MessageProcessor) (network.Conduit, error) { ret := _m.Called(channel, messageProcessor) + if len(ret) == 0 { + panic("no return value specified for Register") + } + var r0 network.Conduit var r1 error if rf, ok := ret.Get(0).(func(channels.Channel, network.MessageProcessor) (network.Conduit, error)); ok { @@ -89,6 +101,10 @@ func (_m *EngineRegistry) RegisterBlobService(channel channels.Channel, store da _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RegisterBlobService") + } + var r0 network.BlobService var r1 error if rf, ok := ret.Get(0).(func(channels.Channel, datastore.Batching, ...network.BlobServiceOption) (network.BlobService, error)); ok { @@ -115,6 +131,10 @@ func (_m *EngineRegistry) RegisterBlobService(channel channels.Channel, store da func (_m *EngineRegistry) RegisterPingService(pingProtocolID protocol.ID, pingInfoProvider network.PingInfoProvider) (network.PingService, error) { ret := _m.Called(pingProtocolID, pingInfoProvider) + if len(ret) == 0 { + panic("no return value specified for RegisterPingService") + } + var r0 network.PingService var r1 error if rf, ok := ret.Get(0).(func(protocol.ID, network.PingInfoProvider) (network.PingService, error)); ok { @@ -142,13 +162,12 @@ func (_m *EngineRegistry) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewEngineRegistry interface { +// NewEngineRegistry creates a new instance of EngineRegistry. 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 NewEngineRegistry(t interface { mock.TestingT Cleanup(func()) -} - -// NewEngineRegistry creates a new instance of EngineRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEngineRegistry(t mockConstructorTestingTNewEngineRegistry) *EngineRegistry { +}) *EngineRegistry { mock := &EngineRegistry{} mock.Mock.Test(t) diff --git a/network/mocknetwork/incoming_message_scope.go b/network/mocknetwork/incoming_message_scope.go index 543c9da9796..16b8729c66e 100644 --- a/network/mocknetwork/incoming_message_scope.go +++ b/network/mocknetwork/incoming_message_scope.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -20,6 +20,10 @@ type IncomingMessageScope struct { func (_m *IncomingMessageScope) Channel() channels.Channel { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Channel") + } + var r0 channels.Channel if rf, ok := ret.Get(0).(func() channels.Channel); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *IncomingMessageScope) Channel() channels.Channel { func (_m *IncomingMessageScope) DecodedPayload() interface{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DecodedPayload") + } + var r0 interface{} if rf, ok := ret.Get(0).(func() interface{}); ok { r0 = rf() @@ -50,6 +58,10 @@ func (_m *IncomingMessageScope) DecodedPayload() interface{} { func (_m *IncomingMessageScope) EventID() []byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventID") + } + var r0 []byte if rf, ok := ret.Get(0).(func() []byte); ok { r0 = rf() @@ -66,6 +78,10 @@ func (_m *IncomingMessageScope) EventID() []byte { func (_m *IncomingMessageScope) OriginId() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OriginId") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -82,6 +98,10 @@ func (_m *IncomingMessageScope) OriginId() flow.Identifier { func (_m *IncomingMessageScope) PayloadType() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PayloadType") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -96,6 +116,10 @@ func (_m *IncomingMessageScope) PayloadType() string { func (_m *IncomingMessageScope) Proto() *message.Message { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Proto") + } + var r0 *message.Message if rf, ok := ret.Get(0).(func() *message.Message); ok { r0 = rf() @@ -112,6 +136,10 @@ func (_m *IncomingMessageScope) Proto() *message.Message { func (_m *IncomingMessageScope) Protocol() message.ProtocolType { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Protocol") + } + var r0 message.ProtocolType if rf, ok := ret.Get(0).(func() message.ProtocolType); ok { r0 = rf() @@ -126,6 +154,10 @@ func (_m *IncomingMessageScope) Protocol() message.ProtocolType { func (_m *IncomingMessageScope) Size() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -140,6 +172,10 @@ func (_m *IncomingMessageScope) Size() int { func (_m *IncomingMessageScope) TargetIDs() flow.IdentifierList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TargetIDs") + } + var r0 flow.IdentifierList if rf, ok := ret.Get(0).(func() flow.IdentifierList); ok { r0 = rf() @@ -152,13 +188,12 @@ func (_m *IncomingMessageScope) TargetIDs() flow.IdentifierList { return r0 } -type mockConstructorTestingTNewIncomingMessageScope interface { +// NewIncomingMessageScope creates a new instance of IncomingMessageScope. 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 NewIncomingMessageScope(t interface { mock.TestingT Cleanup(func()) -} - -// NewIncomingMessageScope creates a new instance of IncomingMessageScope. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIncomingMessageScope(t mockConstructorTestingTNewIncomingMessageScope) *IncomingMessageScope { +}) *IncomingMessageScope { mock := &IncomingMessageScope{} mock.Mock.Test(t) diff --git a/network/mocknetwork/message_processor.go b/network/mocknetwork/message_processor.go index fa9f3e34573..053e4e843ea 100644 --- a/network/mocknetwork/message_processor.go +++ b/network/mocknetwork/message_processor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type MessageProcessor struct { func (_m *MessageProcessor) Process(channel channels.Channel, originID flow.Identifier, message interface{}) error { ret := _m.Called(channel, originID, message) + if len(ret) == 0 { + panic("no return value specified for Process") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel, flow.Identifier, interface{}) error); ok { r0 = rf(channel, originID, message) @@ -28,13 +32,12 @@ func (_m *MessageProcessor) Process(channel channels.Channel, originID flow.Iden return r0 } -type mockConstructorTestingTNewMessageProcessor interface { +// NewMessageProcessor creates a new instance of MessageProcessor. 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 NewMessageProcessor(t interface { mock.TestingT Cleanup(func()) -} - -// NewMessageProcessor creates a new instance of MessageProcessor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMessageProcessor(t mockConstructorTestingTNewMessageProcessor) *MessageProcessor { +}) *MessageProcessor { mock := &MessageProcessor{} mock.Mock.Test(t) diff --git a/network/mocknetwork/message_queue.go b/network/mocknetwork/message_queue.go index 86ee98ec4cd..41c6804fca7 100644 --- a/network/mocknetwork/message_queue.go +++ b/network/mocknetwork/message_queue.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -13,6 +13,10 @@ type MessageQueue struct { func (_m *MessageQueue) Insert(message interface{}) error { ret := _m.Called(message) + if len(ret) == 0 { + panic("no return value specified for Insert") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(message) @@ -27,6 +31,10 @@ func (_m *MessageQueue) Insert(message interface{}) error { func (_m *MessageQueue) Len() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Len") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -41,6 +49,10 @@ func (_m *MessageQueue) Len() int { func (_m *MessageQueue) Remove() interface{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 interface{} if rf, ok := ret.Get(0).(func() interface{}); ok { r0 = rf() @@ -53,13 +65,12 @@ func (_m *MessageQueue) Remove() interface{} { return r0 } -type mockConstructorTestingTNewMessageQueue interface { +// NewMessageQueue creates a new instance of MessageQueue. 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 NewMessageQueue(t interface { mock.TestingT Cleanup(func()) -} - -// NewMessageQueue creates a new instance of MessageQueue. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMessageQueue(t mockConstructorTestingTNewMessageQueue) *MessageQueue { +}) *MessageQueue { mock := &MessageQueue{} mock.Mock.Test(t) diff --git a/network/mocknetwork/message_validator.go b/network/mocknetwork/message_validator.go index f2c78f75d20..6973e84f7d0 100644 --- a/network/mocknetwork/message_validator.go +++ b/network/mocknetwork/message_validator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -16,6 +16,10 @@ type MessageValidator struct { func (_m *MessageValidator) Validate(msg network.IncomingMessageScope) bool { ret := _m.Called(msg) + if len(ret) == 0 { + panic("no return value specified for Validate") + } + var r0 bool if rf, ok := ret.Get(0).(func(network.IncomingMessageScope) bool); ok { r0 = rf(msg) @@ -26,13 +30,12 @@ func (_m *MessageValidator) Validate(msg network.IncomingMessageScope) bool { return r0 } -type mockConstructorTestingTNewMessageValidator interface { +// NewMessageValidator creates a new instance of MessageValidator. 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 NewMessageValidator(t interface { mock.TestingT Cleanup(func()) -} - -// NewMessageValidator creates a new instance of MessageValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMessageValidator(t mockConstructorTestingTNewMessageValidator) *MessageValidator { +}) *MessageValidator { mock := &MessageValidator{} mock.Mock.Test(t) diff --git a/network/mocknetwork/misbehavior_report.go b/network/mocknetwork/misbehavior_report.go index 150e24eadd7..8f578e66cd8 100644 --- a/network/mocknetwork/misbehavior_report.go +++ b/network/mocknetwork/misbehavior_report.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type MisbehaviorReport struct { func (_m *MisbehaviorReport) OriginId() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OriginId") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *MisbehaviorReport) OriginId() flow.Identifier { func (_m *MisbehaviorReport) Penalty() float64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Penalty") + } + var r0 float64 if rf, ok := ret.Get(0).(func() float64); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *MisbehaviorReport) Penalty() float64 { func (_m *MisbehaviorReport) Reason() network.Misbehavior { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Reason") + } + var r0 network.Misbehavior if rf, ok := ret.Get(0).(func() network.Misbehavior); ok { r0 = rf() @@ -58,13 +70,12 @@ func (_m *MisbehaviorReport) Reason() network.Misbehavior { return r0 } -type mockConstructorTestingTNewMisbehaviorReport interface { +// NewMisbehaviorReport creates a new instance of MisbehaviorReport. 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 NewMisbehaviorReport(t interface { mock.TestingT Cleanup(func()) -} - -// NewMisbehaviorReport creates a new instance of MisbehaviorReport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMisbehaviorReport(t mockConstructorTestingTNewMisbehaviorReport) *MisbehaviorReport { +}) *MisbehaviorReport { mock := &MisbehaviorReport{} mock.Mock.Test(t) diff --git a/network/mocknetwork/misbehavior_report_consumer.go b/network/mocknetwork/misbehavior_report_consumer.go index 8731a6ae8fe..9dccda1fde6 100644 --- a/network/mocknetwork/misbehavior_report_consumer.go +++ b/network/mocknetwork/misbehavior_report_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -19,13 +19,12 @@ func (_m *MisbehaviorReportConsumer) ReportMisbehaviorOnChannel(channel channels _m.Called(channel, report) } -type mockConstructorTestingTNewMisbehaviorReportConsumer interface { +// NewMisbehaviorReportConsumer creates a new instance of MisbehaviorReportConsumer. 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 NewMisbehaviorReportConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewMisbehaviorReportConsumer creates a new instance of MisbehaviorReportConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMisbehaviorReportConsumer(t mockConstructorTestingTNewMisbehaviorReportConsumer) *MisbehaviorReportConsumer { +}) *MisbehaviorReportConsumer { mock := &MisbehaviorReportConsumer{} mock.Mock.Test(t) diff --git a/network/mocknetwork/misbehavior_report_manager.go b/network/mocknetwork/misbehavior_report_manager.go index 93ee2dfc6de..7ecf08cc499 100644 --- a/network/mocknetwork/misbehavior_report_manager.go +++ b/network/mocknetwork/misbehavior_report_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -20,6 +20,10 @@ type MisbehaviorReportManager struct { func (_m *MisbehaviorReportManager) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -41,6 +45,10 @@ func (_m *MisbehaviorReportManager) HandleMisbehaviorReport(_a0 channels.Channel func (_m *MisbehaviorReportManager) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -58,13 +66,12 @@ func (_m *MisbehaviorReportManager) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewMisbehaviorReportManager interface { +// NewMisbehaviorReportManager creates a new instance of MisbehaviorReportManager. 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 NewMisbehaviorReportManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewMisbehaviorReportManager creates a new instance of MisbehaviorReportManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMisbehaviorReportManager(t mockConstructorTestingTNewMisbehaviorReportManager) *MisbehaviorReportManager { +}) *MisbehaviorReportManager { mock := &MisbehaviorReportManager{} mock.Mock.Test(t) diff --git a/network/mocknetwork/misbehavior_reporter.go b/network/mocknetwork/misbehavior_reporter.go index 101d7e32f90..494da93e0e9 100644 --- a/network/mocknetwork/misbehavior_reporter.go +++ b/network/mocknetwork/misbehavior_reporter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -17,13 +17,12 @@ func (_m *MisbehaviorReporter) ReportMisbehavior(_a0 network.MisbehaviorReport) _m.Called(_a0) } -type mockConstructorTestingTNewMisbehaviorReporter interface { +// NewMisbehaviorReporter creates a new instance of MisbehaviorReporter. 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 NewMisbehaviorReporter(t interface { mock.TestingT Cleanup(func()) -} - -// NewMisbehaviorReporter creates a new instance of MisbehaviorReporter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMisbehaviorReporter(t mockConstructorTestingTNewMisbehaviorReporter) *MisbehaviorReporter { +}) *MisbehaviorReporter { mock := &MisbehaviorReporter{} mock.Mock.Test(t) diff --git a/network/mocknetwork/outgoing_message_scope.go b/network/mocknetwork/outgoing_message_scope.go index f630c94e01a..a86afac6a82 100644 --- a/network/mocknetwork/outgoing_message_scope.go +++ b/network/mocknetwork/outgoing_message_scope.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -20,6 +20,10 @@ type OutgoingMessageScope struct { func (_m *OutgoingMessageScope) PayloadType() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PayloadType") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *OutgoingMessageScope) PayloadType() string { func (_m *OutgoingMessageScope) Proto() *message.Message { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Proto") + } + var r0 *message.Message if rf, ok := ret.Get(0).(func() *message.Message); ok { r0 = rf() @@ -50,6 +58,10 @@ func (_m *OutgoingMessageScope) Proto() *message.Message { func (_m *OutgoingMessageScope) Size() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -64,6 +76,10 @@ func (_m *OutgoingMessageScope) Size() int { func (_m *OutgoingMessageScope) TargetIds() flow.IdentifierList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TargetIds") + } + var r0 flow.IdentifierList if rf, ok := ret.Get(0).(func() flow.IdentifierList); ok { r0 = rf() @@ -80,6 +96,10 @@ func (_m *OutgoingMessageScope) TargetIds() flow.IdentifierList { func (_m *OutgoingMessageScope) Topic() channels.Topic { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Topic") + } + var r0 channels.Topic if rf, ok := ret.Get(0).(func() channels.Topic); ok { r0 = rf() @@ -90,13 +110,12 @@ func (_m *OutgoingMessageScope) Topic() channels.Topic { return r0 } -type mockConstructorTestingTNewOutgoingMessageScope interface { +// NewOutgoingMessageScope creates a new instance of OutgoingMessageScope. 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 NewOutgoingMessageScope(t interface { mock.TestingT Cleanup(func()) -} - -// NewOutgoingMessageScope creates a new instance of OutgoingMessageScope. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOutgoingMessageScope(t mockConstructorTestingTNewOutgoingMessageScope) *OutgoingMessageScope { +}) *OutgoingMessageScope { mock := &OutgoingMessageScope{} mock.Mock.Test(t) diff --git a/network/mocknetwork/ping_info_provider.go b/network/mocknetwork/ping_info_provider.go index 57479dc7b4c..fbdc9ec19e2 100644 --- a/network/mocknetwork/ping_info_provider.go +++ b/network/mocknetwork/ping_info_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -13,6 +13,10 @@ type PingInfoProvider struct { func (_m *PingInfoProvider) HotstuffView() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for HotstuffView") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -27,6 +31,10 @@ func (_m *PingInfoProvider) HotstuffView() uint64 { func (_m *PingInfoProvider) SealedBlockHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SealedBlockHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -41,6 +49,10 @@ func (_m *PingInfoProvider) SealedBlockHeight() uint64 { func (_m *PingInfoProvider) SoftwareVersion() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SoftwareVersion") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -51,13 +63,12 @@ func (_m *PingInfoProvider) SoftwareVersion() string { return r0 } -type mockConstructorTestingTNewPingInfoProvider interface { +// NewPingInfoProvider creates a new instance of PingInfoProvider. 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 NewPingInfoProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewPingInfoProvider creates a new instance of PingInfoProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPingInfoProvider(t mockConstructorTestingTNewPingInfoProvider) *PingInfoProvider { +}) *PingInfoProvider { mock := &PingInfoProvider{} mock.Mock.Test(t) diff --git a/network/mocknetwork/ping_service.go b/network/mocknetwork/ping_service.go index 6ea49fe96a7..16d69e4f50d 100644 --- a/network/mocknetwork/ping_service.go +++ b/network/mocknetwork/ping_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -22,6 +22,10 @@ type PingService struct { func (_m *PingService) Ping(ctx context.Context, peerID peer.ID) (message.PingResponse, time.Duration, error) { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 message.PingResponse var r1 time.Duration var r2 error @@ -49,13 +53,12 @@ func (_m *PingService) Ping(ctx context.Context, peerID peer.ID) (message.PingRe return r0, r1, r2 } -type mockConstructorTestingTNewPingService interface { +// NewPingService creates a new instance of PingService. 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 NewPingService(t interface { mock.TestingT Cleanup(func()) -} - -// NewPingService creates a new instance of PingService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPingService(t mockConstructorTestingTNewPingService) *PingService { +}) *PingService { mock := &PingService{} mock.Mock.Test(t) diff --git a/network/mocknetwork/subscription_manager.go b/network/mocknetwork/subscription_manager.go index 3cc901de877..29565d668fb 100644 --- a/network/mocknetwork/subscription_manager.go +++ b/network/mocknetwork/subscription_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type SubscriptionManager struct { func (_m *SubscriptionManager) Channels() channels.ChannelList { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Channels") + } + var r0 channels.ChannelList if rf, ok := ret.Get(0).(func() channels.ChannelList); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *SubscriptionManager) Channels() channels.ChannelList { func (_m *SubscriptionManager) GetEngine(channel channels.Channel) (network.MessageProcessor, error) { ret := _m.Called(channel) + if len(ret) == 0 { + panic("no return value specified for GetEngine") + } + var r0 network.MessageProcessor var r1 error if rf, ok := ret.Get(0).(func(channels.Channel) (network.MessageProcessor, error)); ok { @@ -60,6 +68,10 @@ func (_m *SubscriptionManager) GetEngine(channel channels.Channel) (network.Mess func (_m *SubscriptionManager) Register(channel channels.Channel, engine network.MessageProcessor) error { ret := _m.Called(channel, engine) + if len(ret) == 0 { + panic("no return value specified for Register") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel, network.MessageProcessor) error); ok { r0 = rf(channel, engine) @@ -74,6 +86,10 @@ func (_m *SubscriptionManager) Register(channel channels.Channel, engine network func (_m *SubscriptionManager) Unregister(channel channels.Channel) error { ret := _m.Called(channel) + if len(ret) == 0 { + panic("no return value specified for Unregister") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel) error); ok { r0 = rf(channel) @@ -84,13 +100,12 @@ func (_m *SubscriptionManager) Unregister(channel channels.Channel) error { return r0 } -type mockConstructorTestingTNewSubscriptionManager interface { +// NewSubscriptionManager creates a new instance of SubscriptionManager. 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 NewSubscriptionManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewSubscriptionManager creates a new instance of SubscriptionManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSubscriptionManager(t mockConstructorTestingTNewSubscriptionManager) *SubscriptionManager { +}) *SubscriptionManager { mock := &SubscriptionManager{} mock.Mock.Test(t) diff --git a/network/mocknetwork/topology.go b/network/mocknetwork/topology.go index d5513bde846..e29ac503807 100644 --- a/network/mocknetwork/topology.go +++ b/network/mocknetwork/topology.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -16,6 +16,10 @@ type Topology struct { func (_m *Topology) Fanout(ids flow.GenericIdentityList[flow.Identity]) flow.GenericIdentityList[flow.Identity] { ret := _m.Called(ids) + if len(ret) == 0 { + panic("no return value specified for Fanout") + } + var r0 flow.GenericIdentityList[flow.Identity] if rf, ok := ret.Get(0).(func(flow.GenericIdentityList[flow.Identity]) flow.GenericIdentityList[flow.Identity]); ok { r0 = rf(ids) @@ -28,13 +32,12 @@ func (_m *Topology) Fanout(ids flow.GenericIdentityList[flow.Identity]) flow.Gen return r0 } -type mockConstructorTestingTNewTopology interface { +// NewTopology creates a new instance of Topology. 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 NewTopology(t interface { mock.TestingT Cleanup(func()) -} - -// NewTopology creates a new instance of Topology. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTopology(t mockConstructorTestingTNewTopology) *Topology { +}) *Topology { mock := &Topology{} mock.Mock.Test(t) diff --git a/network/mocknetwork/underlay.go b/network/mocknetwork/underlay.go index 214bff8dbad..0f9c4082ac0 100644 --- a/network/mocknetwork/underlay.go +++ b/network/mocknetwork/underlay.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -18,6 +18,10 @@ type Underlay struct { func (_m *Underlay) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -44,6 +48,10 @@ func (_m *Underlay) OnDisallowListNotification(_a0 *network.DisallowListingUpdat func (_m *Underlay) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -60,6 +68,10 @@ func (_m *Underlay) Ready() <-chan struct{} { func (_m *Underlay) Subscribe(channel channels.Channel) error { ret := _m.Called(channel) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel) error); ok { r0 = rf(channel) @@ -74,6 +86,10 @@ func (_m *Underlay) Subscribe(channel channels.Channel) error { func (_m *Underlay) Unsubscribe(channel channels.Channel) error { ret := _m.Called(channel) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Channel) error); ok { r0 = rf(channel) @@ -89,13 +105,12 @@ func (_m *Underlay) UpdateNodeAddresses() { _m.Called() } -type mockConstructorTestingTNewUnderlay interface { +// NewUnderlay creates a new instance of Underlay. 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 NewUnderlay(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnderlay creates a new instance of Underlay. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnderlay(t mockConstructorTestingTNewUnderlay) *Underlay { +}) *Underlay { mock := &Underlay{} mock.Mock.Test(t) diff --git a/network/mocknetwork/violations_consumer.go b/network/mocknetwork/violations_consumer.go index 2af1bf2b80f..9dbaa607ab4 100644 --- a/network/mocknetwork/violations_consumer.go +++ b/network/mocknetwork/violations_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -47,13 +47,12 @@ func (_m *ViolationsConsumer) OnUnknownMsgTypeError(violation *network.Violation _m.Called(violation) } -type mockConstructorTestingTNewViolationsConsumer interface { +// NewViolationsConsumer creates a new instance of ViolationsConsumer. 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 NewViolationsConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewViolationsConsumer creates a new instance of ViolationsConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewViolationsConsumer(t mockConstructorTestingTNewViolationsConsumer) *ViolationsConsumer { +}) *ViolationsConsumer { mock := &ViolationsConsumer{} mock.Mock.Test(t) diff --git a/network/mocknetwork/write_close_flusher.go b/network/mocknetwork/write_close_flusher.go index 1fc8dbe8cf4..b863ae58ff8 100644 --- a/network/mocknetwork/write_close_flusher.go +++ b/network/mocknetwork/write_close_flusher.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocknetwork @@ -13,6 +13,10 @@ type WriteCloseFlusher struct { func (_m *WriteCloseFlusher) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -27,6 +31,10 @@ func (_m *WriteCloseFlusher) Close() error { func (_m *WriteCloseFlusher) Flush() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Flush") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -41,6 +49,10 @@ func (_m *WriteCloseFlusher) Flush() error { func (_m *WriteCloseFlusher) Write(p []byte) (int, error) { ret := _m.Called(p) + if len(ret) == 0 { + panic("no return value specified for Write") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok { @@ -61,13 +73,12 @@ func (_m *WriteCloseFlusher) Write(p []byte) (int, error) { return r0, r1 } -type mockConstructorTestingTNewWriteCloseFlusher interface { +// NewWriteCloseFlusher creates a new instance of WriteCloseFlusher. 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 NewWriteCloseFlusher(t interface { mock.TestingT Cleanup(func()) -} - -// NewWriteCloseFlusher creates a new instance of WriteCloseFlusher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewWriteCloseFlusher(t mockConstructorTestingTNewWriteCloseFlusher) *WriteCloseFlusher { +}) *WriteCloseFlusher { mock := &WriteCloseFlusher{} mock.Mock.Test(t) diff --git a/network/p2p/mock/basic_rate_limiter.go b/network/p2p/mock/basic_rate_limiter.go index d76bc2956e1..ee5691db0f9 100644 --- a/network/p2p/mock/basic_rate_limiter.go +++ b/network/p2p/mock/basic_rate_limiter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type BasicRateLimiter struct { func (_m *BasicRateLimiter) Allow(peerID peer.ID, msgSize int) bool { ret := _m.Called(peerID, msgSize) + if len(ret) == 0 { + panic("no return value specified for Allow") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID, int) bool); ok { r0 = rf(peerID, msgSize) @@ -32,6 +36,10 @@ func (_m *BasicRateLimiter) Allow(peerID peer.ID, msgSize int) bool { func (_m *BasicRateLimiter) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *BasicRateLimiter) Done() <-chan struct{} { func (_m *BasicRateLimiter) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -65,13 +77,12 @@ func (_m *BasicRateLimiter) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewBasicRateLimiter interface { +// NewBasicRateLimiter creates a new instance of BasicRateLimiter. 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 NewBasicRateLimiter(t interface { mock.TestingT Cleanup(func()) -} - -// NewBasicRateLimiter creates a new instance of BasicRateLimiter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBasicRateLimiter(t mockConstructorTestingTNewBasicRateLimiter) *BasicRateLimiter { +}) *BasicRateLimiter { mock := &BasicRateLimiter{} mock.Mock.Test(t) diff --git a/network/p2p/mock/collection_cluster_changes_consumer.go b/network/p2p/mock/collection_cluster_changes_consumer.go index cb76577f06f..16d1cf7288b 100644 --- a/network/p2p/mock/collection_cluster_changes_consumer.go +++ b/network/p2p/mock/collection_cluster_changes_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -17,13 +17,12 @@ func (_m *CollectionClusterChangesConsumer) ActiveClustersChanged(_a0 flow.Chain _m.Called(_a0) } -type mockConstructorTestingTNewCollectionClusterChangesConsumer interface { +// NewCollectionClusterChangesConsumer creates a new instance of CollectionClusterChangesConsumer. 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 NewCollectionClusterChangesConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewCollectionClusterChangesConsumer creates a new instance of CollectionClusterChangesConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCollectionClusterChangesConsumer(t mockConstructorTestingTNewCollectionClusterChangesConsumer) *CollectionClusterChangesConsumer { +}) *CollectionClusterChangesConsumer { mock := &CollectionClusterChangesConsumer{} mock.Mock.Test(t) diff --git a/network/p2p/mock/connection_gater.go b/network/p2p/mock/connection_gater.go index c316e3f31d0..3208a7035e8 100644 --- a/network/p2p/mock/connection_gater.go +++ b/network/p2p/mock/connection_gater.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -24,6 +24,10 @@ type ConnectionGater struct { func (_m *ConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for InterceptAccept") + } + var r0 bool if rf, ok := ret.Get(0).(func(network.ConnMultiaddrs) bool); ok { r0 = rf(_a0) @@ -38,6 +42,10 @@ func (_m *ConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool { func (_m *ConnectionGater) InterceptAddrDial(_a0 peer.ID, _a1 multiaddr.Multiaddr) bool { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for InterceptAddrDial") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID, multiaddr.Multiaddr) bool); ok { r0 = rf(_a0, _a1) @@ -52,6 +60,10 @@ func (_m *ConnectionGater) InterceptAddrDial(_a0 peer.ID, _a1 multiaddr.Multiadd func (_m *ConnectionGater) InterceptPeerDial(p peer.ID) bool { ret := _m.Called(p) + if len(ret) == 0 { + panic("no return value specified for InterceptPeerDial") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID) bool); ok { r0 = rf(p) @@ -66,6 +78,10 @@ func (_m *ConnectionGater) InterceptPeerDial(p peer.ID) bool { func (_m *ConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs) bool { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for InterceptSecured") + } + var r0 bool if rf, ok := ret.Get(0).(func(network.Direction, peer.ID, network.ConnMultiaddrs) bool); ok { r0 = rf(_a0, _a1, _a2) @@ -80,6 +96,10 @@ func (_m *ConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, func (_m *ConnectionGater) InterceptUpgraded(_a0 network.Conn) (bool, control.DisconnectReason) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for InterceptUpgraded") + } + var r0 bool var r1 control.DisconnectReason if rf, ok := ret.Get(0).(func(network.Conn) (bool, control.DisconnectReason)); ok { @@ -105,13 +125,12 @@ func (_m *ConnectionGater) SetDisallowListOracle(oracle p2p.DisallowListOracle) _m.Called(oracle) } -type mockConstructorTestingTNewConnectionGater interface { +// NewConnectionGater creates a new instance of ConnectionGater. 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 NewConnectionGater(t interface { mock.TestingT Cleanup(func()) -} - -// NewConnectionGater creates a new instance of ConnectionGater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnectionGater(t mockConstructorTestingTNewConnectionGater) *ConnectionGater { +}) *ConnectionGater { mock := &ConnectionGater{} mock.Mock.Test(t) diff --git a/network/p2p/mock/connector.go b/network/p2p/mock/connector.go index 2c8a49c9070..9d1707d3c70 100644 --- a/network/p2p/mock/connector.go +++ b/network/p2p/mock/connector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -20,13 +20,12 @@ func (_m *Connector) Connect(ctx context.Context, peerChan <-chan peer.AddrInfo) _m.Called(ctx, peerChan) } -type mockConstructorTestingTNewConnector interface { +// NewConnector creates a new instance of Connector. 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 NewConnector(t interface { mock.TestingT Cleanup(func()) -} - -// NewConnector creates a new instance of Connector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnector(t mockConstructorTestingTNewConnector) *Connector { +}) *Connector { mock := &Connector{} mock.Mock.Test(t) diff --git a/network/p2p/mock/connector_factory.go b/network/p2p/mock/connector_factory.go index a22788969f8..36949655642 100644 --- a/network/p2p/mock/connector_factory.go +++ b/network/p2p/mock/connector_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type ConnectorFactory struct { func (_m *ConnectorFactory) Execute(_a0 host.Host) (p2p.Connector, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.Connector var r1 error if rf, ok := ret.Get(0).(func(host.Host) (p2p.Connector, error)); ok { @@ -40,13 +44,12 @@ func (_m *ConnectorFactory) Execute(_a0 host.Host) (p2p.Connector, error) { return r0, r1 } -type mockConstructorTestingTNewConnectorFactory interface { +// NewConnectorFactory creates a new instance of ConnectorFactory. 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 NewConnectorFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewConnectorFactory creates a new instance of ConnectorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnectorFactory(t mockConstructorTestingTNewConnectorFactory) *ConnectorFactory { +}) *ConnectorFactory { mock := &ConnectorFactory{} mock.Mock.Test(t) diff --git a/network/p2p/mock/connector_host.go b/network/p2p/mock/connector_host.go index 5cb468884e8..80101750ced 100644 --- a/network/p2p/mock/connector_host.go +++ b/network/p2p/mock/connector_host.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type ConnectorHost struct { func (_m *ConnectorHost) ClosePeer(peerId peer.ID) error { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for ClosePeer") + } + var r0 error if rf, ok := ret.Get(0).(func(peer.ID) error); ok { r0 = rf(peerId) @@ -32,6 +36,10 @@ func (_m *ConnectorHost) ClosePeer(peerId peer.ID) error { func (_m *ConnectorHost) Connections() []network.Conn { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Connections") + } + var r0 []network.Conn if rf, ok := ret.Get(0).(func() []network.Conn); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *ConnectorHost) Connections() []network.Conn { func (_m *ConnectorHost) ID() peer.ID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 peer.ID if rf, ok := ret.Get(0).(func() peer.ID); ok { r0 = rf() @@ -62,6 +74,10 @@ func (_m *ConnectorHost) ID() peer.ID { func (_m *ConnectorHost) IsConnectedTo(peerId peer.ID) bool { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for IsConnectedTo") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID) bool); ok { r0 = rf(peerId) @@ -76,6 +92,10 @@ func (_m *ConnectorHost) IsConnectedTo(peerId peer.ID) bool { func (_m *ConnectorHost) IsProtected(peerId peer.ID) bool { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for IsProtected") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID) bool); ok { r0 = rf(peerId) @@ -90,6 +110,10 @@ func (_m *ConnectorHost) IsProtected(peerId peer.ID) bool { func (_m *ConnectorHost) PeerInfo(peerId peer.ID) peer.AddrInfo { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for PeerInfo") + } + var r0 peer.AddrInfo if rf, ok := ret.Get(0).(func(peer.ID) peer.AddrInfo); ok { r0 = rf(peerId) @@ -100,13 +124,12 @@ func (_m *ConnectorHost) PeerInfo(peerId peer.ID) peer.AddrInfo { return r0 } -type mockConstructorTestingTNewConnectorHost interface { +// NewConnectorHost creates a new instance of ConnectorHost. 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 NewConnectorHost(t interface { mock.TestingT Cleanup(func()) -} - -// NewConnectorHost creates a new instance of ConnectorHost. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConnectorHost(t mockConstructorTestingTNewConnectorHost) *ConnectorHost { +}) *ConnectorHost { mock := &ConnectorHost{} mock.Mock.Test(t) diff --git a/network/p2p/mock/core_p2_p.go b/network/p2p/mock/core_p2_p.go index f2d2cda99fa..3045b28ffcc 100644 --- a/network/p2p/mock/core_p2_p.go +++ b/network/p2p/mock/core_p2_p.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -20,6 +20,10 @@ type CoreP2P struct { func (_m *CoreP2P) GetIPPort() (string, string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetIPPort") + } + var r0 string var r1 string var r2 error @@ -51,6 +55,10 @@ func (_m *CoreP2P) GetIPPort() (string, string, error) { func (_m *CoreP2P) Host() host.Host { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Host") + } + var r0 host.Host if rf, ok := ret.Get(0).(func() host.Host); ok { r0 = rf() @@ -77,6 +85,10 @@ func (_m *CoreP2P) Start(ctx irrecoverable.SignalerContext) { func (_m *CoreP2P) 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() @@ -87,13 +99,12 @@ func (_m *CoreP2P) Stop() error { return r0 } -type mockConstructorTestingTNewCoreP2P interface { +// NewCoreP2P creates a new instance of CoreP2P. 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 NewCoreP2P(t interface { mock.TestingT Cleanup(func()) -} - -// NewCoreP2P creates a new instance of CoreP2P. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCoreP2P(t mockConstructorTestingTNewCoreP2P) *CoreP2P { +}) *CoreP2P { mock := &CoreP2P{} mock.Mock.Test(t) diff --git a/network/p2p/mock/disallow_list_cache.go b/network/p2p/mock/disallow_list_cache.go index 54d7fcf0d3c..ba8245823f2 100644 --- a/network/p2p/mock/disallow_list_cache.go +++ b/network/p2p/mock/disallow_list_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type DisallowListCache struct { func (_m *DisallowListCache) AllowFor(peerID peer.ID, cause network.DisallowListedCause) []network.DisallowListedCause { ret := _m.Called(peerID, cause) + if len(ret) == 0 { + panic("no return value specified for AllowFor") + } + var r0 []network.DisallowListedCause if rf, ok := ret.Get(0).(func(peer.ID, network.DisallowListedCause) []network.DisallowListedCause); ok { r0 = rf(peerID, cause) @@ -34,6 +38,10 @@ func (_m *DisallowListCache) AllowFor(peerID peer.ID, cause network.DisallowList func (_m *DisallowListCache) DisallowFor(peerID peer.ID, cause network.DisallowListedCause) ([]network.DisallowListedCause, error) { ret := _m.Called(peerID, cause) + if len(ret) == 0 { + panic("no return value specified for DisallowFor") + } + var r0 []network.DisallowListedCause var r1 error if rf, ok := ret.Get(0).(func(peer.ID, network.DisallowListedCause) ([]network.DisallowListedCause, error)); ok { @@ -60,6 +68,10 @@ func (_m *DisallowListCache) DisallowFor(peerID peer.ID, cause network.DisallowL func (_m *DisallowListCache) IsDisallowListed(peerID peer.ID) ([]network.DisallowListedCause, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for IsDisallowListed") + } + var r0 []network.DisallowListedCause var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) ([]network.DisallowListedCause, bool)); ok { @@ -82,13 +94,12 @@ func (_m *DisallowListCache) IsDisallowListed(peerID peer.ID) ([]network.Disallo return r0, r1 } -type mockConstructorTestingTNewDisallowListCache interface { +// NewDisallowListCache creates a new instance of DisallowListCache. 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 NewDisallowListCache(t interface { mock.TestingT Cleanup(func()) -} - -// NewDisallowListCache creates a new instance of DisallowListCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDisallowListCache(t mockConstructorTestingTNewDisallowListCache) *DisallowListCache { +}) *DisallowListCache { mock := &DisallowListCache{} mock.Mock.Test(t) diff --git a/network/p2p/mock/disallow_list_notification_consumer.go b/network/p2p/mock/disallow_list_notification_consumer.go index 0d30cddea03..3c64188c6b8 100644 --- a/network/p2p/mock/disallow_list_notification_consumer.go +++ b/network/p2p/mock/disallow_list_notification_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -24,13 +24,12 @@ func (_m *DisallowListNotificationConsumer) OnDisallowListNotification(id peer.I _m.Called(id, cause) } -type mockConstructorTestingTNewDisallowListNotificationConsumer interface { +// NewDisallowListNotificationConsumer creates a new instance of DisallowListNotificationConsumer. 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 NewDisallowListNotificationConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewDisallowListNotificationConsumer creates a new instance of DisallowListNotificationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDisallowListNotificationConsumer(t mockConstructorTestingTNewDisallowListNotificationConsumer) *DisallowListNotificationConsumer { +}) *DisallowListNotificationConsumer { mock := &DisallowListNotificationConsumer{} mock.Mock.Test(t) diff --git a/network/p2p/mock/disallow_list_oracle.go b/network/p2p/mock/disallow_list_oracle.go index 8779bce7186..e86362534cc 100644 --- a/network/p2p/mock/disallow_list_oracle.go +++ b/network/p2p/mock/disallow_list_oracle.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type DisallowListOracle struct { func (_m *DisallowListOracle) IsDisallowListed(peerId peer.ID) ([]network.DisallowListedCause, bool) { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for IsDisallowListed") + } + var r0 []network.DisallowListedCause var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) ([]network.DisallowListedCause, bool)); ok { @@ -40,13 +44,12 @@ func (_m *DisallowListOracle) IsDisallowListed(peerId peer.ID) ([]network.Disall return r0, r1 } -type mockConstructorTestingTNewDisallowListOracle interface { +// NewDisallowListOracle creates a new instance of DisallowListOracle. 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 NewDisallowListOracle(t interface { mock.TestingT Cleanup(func()) -} - -// NewDisallowListOracle creates a new instance of DisallowListOracle. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDisallowListOracle(t mockConstructorTestingTNewDisallowListOracle) *DisallowListOracle { +}) *DisallowListOracle { mock := &DisallowListOracle{} mock.Mock.Test(t) diff --git a/network/p2p/mock/gossip_sub_adapter_config_func.go b/network/p2p/mock/gossip_sub_adapter_config_func.go index c207b692350..4f101863025 100644 --- a/network/p2p/mock/gossip_sub_adapter_config_func.go +++ b/network/p2p/mock/gossip_sub_adapter_config_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -16,6 +16,10 @@ type GossipSubAdapterConfigFunc struct { func (_m *GossipSubAdapterConfigFunc) Execute(_a0 *p2p.BasePubSubAdapterConfig) p2p.PubSubAdapterConfig { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.PubSubAdapterConfig if rf, ok := ret.Get(0).(func(*p2p.BasePubSubAdapterConfig) p2p.PubSubAdapterConfig); ok { r0 = rf(_a0) @@ -28,13 +32,12 @@ func (_m *GossipSubAdapterConfigFunc) Execute(_a0 *p2p.BasePubSubAdapterConfig) return r0 } -type mockConstructorTestingTNewGossipSubAdapterConfigFunc interface { +// NewGossipSubAdapterConfigFunc creates a new instance of GossipSubAdapterConfigFunc. 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 NewGossipSubAdapterConfigFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubAdapterConfigFunc creates a new instance of GossipSubAdapterConfigFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubAdapterConfigFunc(t mockConstructorTestingTNewGossipSubAdapterConfigFunc) *GossipSubAdapterConfigFunc { +}) *GossipSubAdapterConfigFunc { mock := &GossipSubAdapterConfigFunc{} mock.Mock.Test(t) diff --git a/network/p2p/mock/gossip_sub_application_specific_score_cache.go b/network/p2p/mock/gossip_sub_application_specific_score_cache.go index d4eb9c6cc32..beea33d9c89 100644 --- a/network/p2p/mock/gossip_sub_application_specific_score_cache.go +++ b/network/p2p/mock/gossip_sub_application_specific_score_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -19,6 +19,10 @@ type GossipSubApplicationSpecificScoreCache struct { func (_m *GossipSubApplicationSpecificScoreCache) AdjustWithInit(peerID peer.ID, score float64, _a2 time.Time) error { ret := _m.Called(peerID, score, _a2) + if len(ret) == 0 { + panic("no return value specified for AdjustWithInit") + } + var r0 error if rf, ok := ret.Get(0).(func(peer.ID, float64, time.Time) error); ok { r0 = rf(peerID, score, _a2) @@ -33,6 +37,10 @@ func (_m *GossipSubApplicationSpecificScoreCache) AdjustWithInit(peerID peer.ID, func (_m *GossipSubApplicationSpecificScoreCache) Get(peerID peer.ID) (float64, time.Time, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 float64 var r1 time.Time var r2 bool @@ -60,13 +68,12 @@ func (_m *GossipSubApplicationSpecificScoreCache) Get(peerID peer.ID) (float64, return r0, r1, r2 } -type mockConstructorTestingTNewGossipSubApplicationSpecificScoreCache interface { +// NewGossipSubApplicationSpecificScoreCache creates a new instance of GossipSubApplicationSpecificScoreCache. 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 NewGossipSubApplicationSpecificScoreCache(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubApplicationSpecificScoreCache creates a new instance of GossipSubApplicationSpecificScoreCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubApplicationSpecificScoreCache(t mockConstructorTestingTNewGossipSubApplicationSpecificScoreCache) *GossipSubApplicationSpecificScoreCache { +}) *GossipSubApplicationSpecificScoreCache { mock := &GossipSubApplicationSpecificScoreCache{} mock.Mock.Test(t) diff --git a/network/p2p/mock/gossip_sub_builder.go b/network/p2p/mock/gossip_sub_builder.go index a5d4a846c56..100e2b815a2 100644 --- a/network/p2p/mock/gossip_sub_builder.go +++ b/network/p2p/mock/gossip_sub_builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -24,6 +24,10 @@ type GossipSubBuilder struct { func (_m *GossipSubBuilder) Build(_a0 irrecoverable.SignalerContext) (p2p.PubSubAdapter, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Build") + } + var r0 p2p.PubSubAdapter var r1 error if rf, ok := ret.Get(0).(func(irrecoverable.SignalerContext) (p2p.PubSubAdapter, error)); ok { @@ -81,13 +85,12 @@ func (_m *GossipSubBuilder) SetSubscriptionFilter(_a0 pubsub.SubscriptionFilter) _m.Called(_a0) } -type mockConstructorTestingTNewGossipSubBuilder interface { +// NewGossipSubBuilder creates a new instance of GossipSubBuilder. 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 NewGossipSubBuilder(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubBuilder creates a new instance of GossipSubBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubBuilder(t mockConstructorTestingTNewGossipSubBuilder) *GossipSubBuilder { +}) *GossipSubBuilder { mock := &GossipSubBuilder{} mock.Mock.Test(t) diff --git a/network/p2p/mock/gossip_sub_factory_func.go b/network/p2p/mock/gossip_sub_factory_func.go index 14aa9a7cec4..ea86c75e96a 100644 --- a/network/p2p/mock/gossip_sub_factory_func.go +++ b/network/p2p/mock/gossip_sub_factory_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -22,6 +22,10 @@ type GossipSubFactoryFunc struct { func (_m *GossipSubFactoryFunc) Execute(_a0 context.Context, _a1 zerolog.Logger, _a2 host.Host, _a3 p2p.PubSubAdapterConfig, _a4 p2p.CollectionClusterChangesConsumer) (p2p.PubSubAdapter, error) { ret := _m.Called(_a0, _a1, _a2, _a3, _a4) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.PubSubAdapter var r1 error if rf, ok := ret.Get(0).(func(context.Context, zerolog.Logger, host.Host, p2p.PubSubAdapterConfig, p2p.CollectionClusterChangesConsumer) (p2p.PubSubAdapter, error)); ok { @@ -44,13 +48,12 @@ func (_m *GossipSubFactoryFunc) Execute(_a0 context.Context, _a1 zerolog.Logger, return r0, r1 } -type mockConstructorTestingTNewGossipSubFactoryFunc interface { +// NewGossipSubFactoryFunc creates a new instance of GossipSubFactoryFunc. 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 NewGossipSubFactoryFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubFactoryFunc creates a new instance of GossipSubFactoryFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubFactoryFunc(t mockConstructorTestingTNewGossipSubFactoryFunc) *GossipSubFactoryFunc { +}) *GossipSubFactoryFunc { mock := &GossipSubFactoryFunc{} mock.Mock.Test(t) diff --git a/network/p2p/mock/gossip_sub_inv_ctrl_msg_notif_consumer.go b/network/p2p/mock/gossip_sub_inv_ctrl_msg_notif_consumer.go index 56de1ef6093..beb44d7fdeb 100644 --- a/network/p2p/mock/gossip_sub_inv_ctrl_msg_notif_consumer.go +++ b/network/p2p/mock/gossip_sub_inv_ctrl_msg_notif_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -17,13 +17,12 @@ func (_m *GossipSubInvCtrlMsgNotifConsumer) OnInvalidControlMessageNotification( _m.Called(_a0) } -type mockConstructorTestingTNewGossipSubInvCtrlMsgNotifConsumer interface { +// NewGossipSubInvCtrlMsgNotifConsumer creates a new instance of GossipSubInvCtrlMsgNotifConsumer. 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 NewGossipSubInvCtrlMsgNotifConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubInvCtrlMsgNotifConsumer creates a new instance of GossipSubInvCtrlMsgNotifConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubInvCtrlMsgNotifConsumer(t mockConstructorTestingTNewGossipSubInvCtrlMsgNotifConsumer) *GossipSubInvCtrlMsgNotifConsumer { +}) *GossipSubInvCtrlMsgNotifConsumer { mock := &GossipSubInvCtrlMsgNotifConsumer{} mock.Mock.Test(t) diff --git a/network/p2p/mock/gossip_sub_rpc_inspector.go b/network/p2p/mock/gossip_sub_rpc_inspector.go index 24123537b23..d8e34599613 100644 --- a/network/p2p/mock/gossip_sub_rpc_inspector.go +++ b/network/p2p/mock/gossip_sub_rpc_inspector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -27,6 +27,10 @@ func (_m *GossipSubRPCInspector) ActiveClustersChanged(_a0 flow.ChainIDList) { func (_m *GossipSubRPCInspector) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -43,6 +47,10 @@ func (_m *GossipSubRPCInspector) Done() <-chan struct{} { func (_m *GossipSubRPCInspector) Inspect(_a0 peer.ID, _a1 *pubsub.RPC) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Inspect") + } + var r0 error if rf, ok := ret.Get(0).(func(peer.ID, *pubsub.RPC) error); ok { r0 = rf(_a0, _a1) @@ -57,6 +65,10 @@ func (_m *GossipSubRPCInspector) Inspect(_a0 peer.ID, _a1 *pubsub.RPC) error { func (_m *GossipSubRPCInspector) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -71,6 +83,10 @@ func (_m *GossipSubRPCInspector) Name() string { func (_m *GossipSubRPCInspector) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -88,13 +104,12 @@ func (_m *GossipSubRPCInspector) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewGossipSubRPCInspector interface { +// NewGossipSubRPCInspector creates a new instance of GossipSubRPCInspector. 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 NewGossipSubRPCInspector(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubRPCInspector creates a new instance of GossipSubRPCInspector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubRPCInspector(t mockConstructorTestingTNewGossipSubRPCInspector) *GossipSubRPCInspector { +}) *GossipSubRPCInspector { mock := &GossipSubRPCInspector{} mock.Mock.Test(t) diff --git a/network/p2p/mock/gossip_sub_rpc_inspector_factory_func.go b/network/p2p/mock/gossip_sub_rpc_inspector_factory_func.go index 141da62f9e5..3801b9a5b14 100644 --- a/network/p2p/mock/gossip_sub_rpc_inspector_factory_func.go +++ b/network/p2p/mock/gossip_sub_rpc_inspector_factory_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -28,6 +28,10 @@ type GossipSubRpcInspectorFactoryFunc struct { func (_m *GossipSubRpcInspectorFactoryFunc) Execute(_a0 zerolog.Logger, _a1 flow.Identifier, _a2 *p2pconfig.RpcInspectorParameters, _a3 module.GossipSubMetrics, _a4 metrics.HeroCacheMetricsFactory, _a5 network.NetworkingType, _a6 module.IdentityProvider, _a7 func() p2p.TopicProvider, _a8 p2p.GossipSubInvCtrlMsgNotifConsumer) (p2p.GossipSubRPCInspector, error) { ret := _m.Called(_a0, _a1, _a2, _a3, _a4, _a5, _a6, _a7, _a8) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.GossipSubRPCInspector var r1 error if rf, ok := ret.Get(0).(func(zerolog.Logger, flow.Identifier, *p2pconfig.RpcInspectorParameters, module.GossipSubMetrics, metrics.HeroCacheMetricsFactory, network.NetworkingType, module.IdentityProvider, func() p2p.TopicProvider, p2p.GossipSubInvCtrlMsgNotifConsumer) (p2p.GossipSubRPCInspector, error)); ok { @@ -50,13 +54,12 @@ func (_m *GossipSubRpcInspectorFactoryFunc) Execute(_a0 zerolog.Logger, _a1 flow return r0, r1 } -type mockConstructorTestingTNewGossipSubRpcInspectorFactoryFunc interface { +// NewGossipSubRpcInspectorFactoryFunc creates a new instance of GossipSubRpcInspectorFactoryFunc. 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 NewGossipSubRpcInspectorFactoryFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubRpcInspectorFactoryFunc creates a new instance of GossipSubRpcInspectorFactoryFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubRpcInspectorFactoryFunc(t mockConstructorTestingTNewGossipSubRpcInspectorFactoryFunc) *GossipSubRpcInspectorFactoryFunc { +}) *GossipSubRpcInspectorFactoryFunc { mock := &GossipSubRpcInspectorFactoryFunc{} mock.Mock.Test(t) diff --git a/network/p2p/mock/gossip_sub_spam_record_cache.go b/network/p2p/mock/gossip_sub_spam_record_cache.go index 2fe7a692f89..6f40b9d9b94 100644 --- a/network/p2p/mock/gossip_sub_spam_record_cache.go +++ b/network/p2p/mock/gossip_sub_spam_record_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type GossipSubSpamRecordCache struct { func (_m *GossipSubSpamRecordCache) Adjust(peerID peer.ID, updateFunc p2p.UpdateFunction) (*p2p.GossipSubSpamRecord, error) { ret := _m.Called(peerID, updateFunc) + if len(ret) == 0 { + panic("no return value specified for Adjust") + } + var r0 *p2p.GossipSubSpamRecord var r1 error if rf, ok := ret.Get(0).(func(peer.ID, p2p.UpdateFunction) (*p2p.GossipSubSpamRecord, error)); ok { @@ -44,6 +48,10 @@ func (_m *GossipSubSpamRecordCache) Adjust(peerID peer.ID, updateFunc p2p.Update func (_m *GossipSubSpamRecordCache) Get(peerID peer.ID) (*p2p.GossipSubSpamRecord, error, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *p2p.GossipSubSpamRecord var r1 error var r2 bool @@ -77,6 +85,10 @@ func (_m *GossipSubSpamRecordCache) Get(peerID peer.ID) (*p2p.GossipSubSpamRecor func (_m *GossipSubSpamRecordCache) Has(peerID peer.ID) bool { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID) bool); ok { r0 = rf(peerID) @@ -87,13 +99,12 @@ func (_m *GossipSubSpamRecordCache) Has(peerID peer.ID) bool { return r0 } -type mockConstructorTestingTNewGossipSubSpamRecordCache interface { +// NewGossipSubSpamRecordCache creates a new instance of GossipSubSpamRecordCache. 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 NewGossipSubSpamRecordCache(t interface { mock.TestingT Cleanup(func()) -} - -// NewGossipSubSpamRecordCache creates a new instance of GossipSubSpamRecordCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGossipSubSpamRecordCache(t mockConstructorTestingTNewGossipSubSpamRecordCache) *GossipSubSpamRecordCache { +}) *GossipSubSpamRecordCache { mock := &GossipSubSpamRecordCache{} mock.Mock.Test(t) diff --git a/network/p2p/mock/id_translator.go b/network/p2p/mock/id_translator.go index 6bf13761fe1..ddd7fb7e0f1 100644 --- a/network/p2p/mock/id_translator.go +++ b/network/p2p/mock/id_translator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type IDTranslator struct { func (_m *IDTranslator) GetFlowID(_a0 peer.ID) (flow.Identifier, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetFlowID") + } + var r0 flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(peer.ID) (flow.Identifier, error)); ok { @@ -44,6 +48,10 @@ func (_m *IDTranslator) GetFlowID(_a0 peer.ID) (flow.Identifier, error) { func (_m *IDTranslator) GetPeerID(_a0 flow.Identifier) (peer.ID, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetPeerID") + } + var r0 peer.ID var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (peer.ID, error)); ok { @@ -64,13 +72,12 @@ func (_m *IDTranslator) GetPeerID(_a0 flow.Identifier) (peer.ID, error) { return r0, r1 } -type mockConstructorTestingTNewIDTranslator interface { +// NewIDTranslator creates a new instance of IDTranslator. 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 NewIDTranslator(t interface { mock.TestingT Cleanup(func()) -} - -// NewIDTranslator creates a new instance of IDTranslator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIDTranslator(t mockConstructorTestingTNewIDTranslator) *IDTranslator { +}) *IDTranslator { mock := &IDTranslator{} mock.Mock.Test(t) diff --git a/network/p2p/mock/lib_p2_p_node.go b/network/p2p/mock/lib_p2_p_node.go index e522cb8f225..5735b65e785 100644 --- a/network/p2p/mock/lib_p2_p_node.go +++ b/network/p2p/mock/lib_p2_p_node.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -47,6 +47,10 @@ func (_m *LibP2PNode) ActiveClustersChanged(_a0 flow.ChainIDList) { func (_m *LibP2PNode) ConnectToPeer(ctx context.Context, peerInfo peer.AddrInfo) error { ret := _m.Called(ctx, peerInfo) + if len(ret) == 0 { + panic("no return value specified for ConnectToPeer") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, peer.AddrInfo) error); ok { r0 = rf(ctx, peerInfo) @@ -61,6 +65,10 @@ func (_m *LibP2PNode) ConnectToPeer(ctx context.Context, peerInfo peer.AddrInfo) func (_m *LibP2PNode) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -77,6 +85,10 @@ func (_m *LibP2PNode) Done() <-chan struct{} { func (_m *LibP2PNode) GetIPPort() (string, string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetIPPort") + } + var r0 string var r1 string var r2 error @@ -108,6 +120,10 @@ func (_m *LibP2PNode) GetIPPort() (string, string, error) { func (_m *LibP2PNode) GetLocalMeshPeers(topic channels.Topic) []peer.ID { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for GetLocalMeshPeers") + } + var r0 []peer.ID if rf, ok := ret.Get(0).(func(channels.Topic) []peer.ID); ok { r0 = rf(topic) @@ -124,6 +140,10 @@ func (_m *LibP2PNode) GetLocalMeshPeers(topic channels.Topic) []peer.ID { func (_m *LibP2PNode) GetPeersForProtocol(pid protocol.ID) peer.IDSlice { ret := _m.Called(pid) + if len(ret) == 0 { + panic("no return value specified for GetPeersForProtocol") + } + var r0 peer.IDSlice if rf, ok := ret.Get(0).(func(protocol.ID) peer.IDSlice); ok { r0 = rf(pid) @@ -140,6 +160,10 @@ func (_m *LibP2PNode) GetPeersForProtocol(pid protocol.ID) peer.IDSlice { func (_m *LibP2PNode) HasSubscription(topic channels.Topic) bool { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for HasSubscription") + } + var r0 bool if rf, ok := ret.Get(0).(func(channels.Topic) bool); ok { r0 = rf(topic) @@ -154,6 +178,10 @@ func (_m *LibP2PNode) HasSubscription(topic channels.Topic) bool { func (_m *LibP2PNode) Host() host.Host { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Host") + } + var r0 host.Host if rf, ok := ret.Get(0).(func() host.Host); ok { r0 = rf() @@ -170,6 +198,10 @@ func (_m *LibP2PNode) Host() host.Host { func (_m *LibP2PNode) ID() peer.ID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 peer.ID if rf, ok := ret.Get(0).(func() peer.ID); ok { r0 = rf() @@ -184,6 +216,10 @@ func (_m *LibP2PNode) ID() peer.ID { func (_m *LibP2PNode) IsConnected(peerID peer.ID) (bool, error) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for IsConnected") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(peer.ID) (bool, error)); ok { @@ -208,6 +244,10 @@ func (_m *LibP2PNode) IsConnected(peerID peer.ID) (bool, error) { func (_m *LibP2PNode) IsDisallowListed(peerId peer.ID) ([]network.DisallowListedCause, bool) { ret := _m.Called(peerId) + if len(ret) == 0 { + panic("no return value specified for IsDisallowListed") + } + var r0 []network.DisallowListedCause var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) ([]network.DisallowListedCause, bool)); ok { @@ -234,6 +274,10 @@ func (_m *LibP2PNode) IsDisallowListed(peerId peer.ID) ([]network.DisallowListed func (_m *LibP2PNode) ListPeers(topic string) []peer.ID { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for ListPeers") + } + var r0 []peer.ID if rf, ok := ret.Get(0).(func(string) []peer.ID); ok { r0 = rf(topic) @@ -260,6 +304,10 @@ func (_m *LibP2PNode) OnDisallowListNotification(id peer.ID, cause network.Disal func (_m *LibP2PNode) OpenAndWriteOnStream(ctx context.Context, peerID peer.ID, protectionTag string, writingLogic func(corenetwork.Stream) error) error { ret := _m.Called(ctx, peerID, protectionTag, writingLogic) + if len(ret) == 0 { + panic("no return value specified for OpenAndWriteOnStream") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, peer.ID, string, func(corenetwork.Stream) error) error); ok { r0 = rf(ctx, peerID, protectionTag, writingLogic) @@ -274,6 +322,10 @@ func (_m *LibP2PNode) OpenAndWriteOnStream(ctx context.Context, peerID peer.ID, func (_m *LibP2PNode) PeerManagerComponent() component.Component { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PeerManagerComponent") + } + var r0 component.Component if rf, ok := ret.Get(0).(func() component.Component); ok { r0 = rf() @@ -290,6 +342,10 @@ func (_m *LibP2PNode) PeerManagerComponent() component.Component { func (_m *LibP2PNode) PeerScoreExposer() p2p.PeerScoreExposer { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PeerScoreExposer") + } + var r0 p2p.PeerScoreExposer if rf, ok := ret.Get(0).(func() p2p.PeerScoreExposer); ok { r0 = rf() @@ -306,6 +362,10 @@ func (_m *LibP2PNode) PeerScoreExposer() p2p.PeerScoreExposer { func (_m *LibP2PNode) Publish(ctx context.Context, messageScope network.OutgoingMessageScope) error { ret := _m.Called(ctx, messageScope) + if len(ret) == 0 { + panic("no return value specified for Publish") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, network.OutgoingMessageScope) error); ok { r0 = rf(ctx, messageScope) @@ -320,6 +380,10 @@ func (_m *LibP2PNode) Publish(ctx context.Context, messageScope network.Outgoing func (_m *LibP2PNode) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -336,6 +400,10 @@ func (_m *LibP2PNode) Ready() <-chan struct{} { func (_m *LibP2PNode) RemovePeer(peerID peer.ID) error { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for RemovePeer") + } + var r0 error if rf, ok := ret.Get(0).(func(peer.ID) error); ok { r0 = rf(peerID) @@ -355,6 +423,10 @@ func (_m *LibP2PNode) RequestPeerUpdate() { func (_m *LibP2PNode) Routing() routing.Routing { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Routing") + } + var r0 routing.Routing if rf, ok := ret.Get(0).(func() routing.Routing); ok { r0 = rf() @@ -371,6 +443,10 @@ func (_m *LibP2PNode) Routing() routing.Routing { func (_m *LibP2PNode) RoutingTable() *kbucket.RoutingTable { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RoutingTable") + } + var r0 *kbucket.RoutingTable if rf, ok := ret.Get(0).(func() *kbucket.RoutingTable); ok { r0 = rf() @@ -397,6 +473,10 @@ func (_m *LibP2PNode) SetPubSub(ps p2p.PubSubAdapter) { func (_m *LibP2PNode) SetRouting(r routing.Routing) error { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for SetRouting") + } + var r0 error if rf, ok := ret.Get(0).(func(routing.Routing) error); ok { r0 = rf(r) @@ -421,6 +501,10 @@ func (_m *LibP2PNode) Start(ctx irrecoverable.SignalerContext) { func (_m *LibP2PNode) 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() @@ -435,6 +519,10 @@ func (_m *LibP2PNode) Stop() error { func (_m *LibP2PNode) Subscribe(topic channels.Topic, topicValidator p2p.TopicValidatorFunc) (p2p.Subscription, error) { ret := _m.Called(topic, topicValidator) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 p2p.Subscription var r1 error if rf, ok := ret.Get(0).(func(channels.Topic, p2p.TopicValidatorFunc) (p2p.Subscription, error)); ok { @@ -461,6 +549,10 @@ func (_m *LibP2PNode) Subscribe(topic channels.Topic, topicValidator p2p.TopicVa func (_m *LibP2PNode) Unsubscribe(topic channels.Topic) error { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Topic) error); ok { r0 = rf(topic) @@ -475,6 +567,10 @@ func (_m *LibP2PNode) Unsubscribe(topic channels.Topic) error { func (_m *LibP2PNode) WithDefaultUnicastProtocol(defaultHandler corenetwork.StreamHandler, preferred []protocols.ProtocolName) error { ret := _m.Called(defaultHandler, preferred) + if len(ret) == 0 { + panic("no return value specified for WithDefaultUnicastProtocol") + } + var r0 error if rf, ok := ret.Get(0).(func(corenetwork.StreamHandler, []protocols.ProtocolName) error); ok { r0 = rf(defaultHandler, preferred) @@ -490,13 +586,12 @@ func (_m *LibP2PNode) WithPeersProvider(peersProvider p2p.PeersProvider) { _m.Called(peersProvider) } -type mockConstructorTestingTNewLibP2PNode interface { +// NewLibP2PNode creates a new instance of LibP2PNode. 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 NewLibP2PNode(t interface { mock.TestingT Cleanup(func()) -} - -// NewLibP2PNode creates a new instance of LibP2PNode. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLibP2PNode(t mockConstructorTestingTNewLibP2PNode) *LibP2PNode { +}) *LibP2PNode { mock := &LibP2PNode{} mock.Mock.Test(t) diff --git a/network/p2p/mock/node_builder.go b/network/p2p/mock/node_builder.go index 5229be19fbc..d4e95cc9946 100644 --- a/network/p2p/mock/node_builder.go +++ b/network/p2p/mock/node_builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -31,6 +31,10 @@ type NodeBuilder struct { func (_m *NodeBuilder) Build() (p2p.LibP2PNode, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Build") + } + var r0 p2p.LibP2PNode var r1 error if rf, ok := ret.Get(0).(func() (p2p.LibP2PNode, error)); ok { @@ -57,6 +61,10 @@ func (_m *NodeBuilder) Build() (p2p.LibP2PNode, error) { func (_m *NodeBuilder) OverrideDefaultRpcInspectorFactory(_a0 p2p.GossipSubRpcInspectorFactoryFunc) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for OverrideDefaultRpcInspectorFactory") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(p2p.GossipSubRpcInspectorFactoryFunc) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -73,6 +81,10 @@ func (_m *NodeBuilder) OverrideDefaultRpcInspectorFactory(_a0 p2p.GossipSubRpcIn func (_m *NodeBuilder) OverrideGossipSubFactory(_a0 p2p.GossipSubFactoryFunc, _a1 p2p.GossipSubAdapterConfigFunc) p2p.NodeBuilder { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OverrideGossipSubFactory") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(p2p.GossipSubFactoryFunc, p2p.GossipSubAdapterConfigFunc) p2p.NodeBuilder); ok { r0 = rf(_a0, _a1) @@ -89,6 +101,10 @@ func (_m *NodeBuilder) OverrideGossipSubFactory(_a0 p2p.GossipSubFactoryFunc, _a func (_m *NodeBuilder) OverrideGossipSubScoringConfig(_a0 *p2p.PeerScoringConfigOverride) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for OverrideGossipSubScoringConfig") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(*p2p.PeerScoringConfigOverride) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -105,6 +121,10 @@ func (_m *NodeBuilder) OverrideGossipSubScoringConfig(_a0 *p2p.PeerScoringConfig func (_m *NodeBuilder) OverrideNodeConstructor(_a0 p2p.NodeConstructor) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for OverrideNodeConstructor") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(p2p.NodeConstructor) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -121,6 +141,10 @@ func (_m *NodeBuilder) OverrideNodeConstructor(_a0 p2p.NodeConstructor) p2p.Node func (_m *NodeBuilder) SetBasicResolver(_a0 madns.BasicResolver) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetBasicResolver") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(madns.BasicResolver) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -137,6 +161,10 @@ func (_m *NodeBuilder) SetBasicResolver(_a0 madns.BasicResolver) p2p.NodeBuilder func (_m *NodeBuilder) SetConnectionGater(_a0 p2p.ConnectionGater) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetConnectionGater") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(p2p.ConnectionGater) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -153,6 +181,10 @@ func (_m *NodeBuilder) SetConnectionGater(_a0 p2p.ConnectionGater) p2p.NodeBuild func (_m *NodeBuilder) SetConnectionManager(_a0 connmgr.ConnManager) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetConnectionManager") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(connmgr.ConnManager) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -169,6 +201,10 @@ func (_m *NodeBuilder) SetConnectionManager(_a0 connmgr.ConnManager) p2p.NodeBui func (_m *NodeBuilder) SetResourceManager(_a0 network.ResourceManager) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetResourceManager") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(network.ResourceManager) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -185,6 +221,10 @@ func (_m *NodeBuilder) SetResourceManager(_a0 network.ResourceManager) p2p.NodeB func (_m *NodeBuilder) SetRoutingSystem(_a0 func(context.Context, host.Host) (routing.Routing, error)) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetRoutingSystem") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(func(context.Context, host.Host) (routing.Routing, error)) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -201,6 +241,10 @@ func (_m *NodeBuilder) SetRoutingSystem(_a0 func(context.Context, host.Host) (ro func (_m *NodeBuilder) SetSubscriptionFilter(_a0 pubsub.SubscriptionFilter) p2p.NodeBuilder { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for SetSubscriptionFilter") + } + var r0 p2p.NodeBuilder if rf, ok := ret.Get(0).(func(pubsub.SubscriptionFilter) p2p.NodeBuilder); ok { r0 = rf(_a0) @@ -213,13 +257,12 @@ func (_m *NodeBuilder) SetSubscriptionFilter(_a0 pubsub.SubscriptionFilter) p2p. return r0 } -type mockConstructorTestingTNewNodeBuilder interface { +// NewNodeBuilder creates a new instance of NodeBuilder. 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 NewNodeBuilder(t interface { mock.TestingT Cleanup(func()) -} - -// NewNodeBuilder creates a new instance of NodeBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNodeBuilder(t mockConstructorTestingTNewNodeBuilder) *NodeBuilder { +}) *NodeBuilder { mock := &NodeBuilder{} mock.Mock.Test(t) diff --git a/network/p2p/mock/node_constructor.go b/network/p2p/mock/node_constructor.go index 5dcf02911c4..1cf6b0b2e93 100644 --- a/network/p2p/mock/node_constructor.go +++ b/network/p2p/mock/node_constructor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -16,6 +16,10 @@ type NodeConstructor struct { func (_m *NodeConstructor) Execute(config *p2p.NodeConfig) (p2p.LibP2PNode, error) { ret := _m.Called(config) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.LibP2PNode var r1 error if rf, ok := ret.Get(0).(func(*p2p.NodeConfig) (p2p.LibP2PNode, error)); ok { @@ -38,13 +42,12 @@ func (_m *NodeConstructor) Execute(config *p2p.NodeConfig) (p2p.LibP2PNode, erro return r0, r1 } -type mockConstructorTestingTNewNodeConstructor interface { +// NewNodeConstructor creates a new instance of NodeConstructor. 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 NewNodeConstructor(t interface { mock.TestingT Cleanup(func()) -} - -// NewNodeConstructor creates a new instance of NodeConstructor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewNodeConstructor(t mockConstructorTestingTNewNodeConstructor) *NodeConstructor { +}) *NodeConstructor { mock := &NodeConstructor{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_connections.go b/network/p2p/mock/peer_connections.go index 0ce59963b84..c65a050c52c 100644 --- a/network/p2p/mock/peer_connections.go +++ b/network/p2p/mock/peer_connections.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -17,6 +17,10 @@ type PeerConnections struct { func (_m *PeerConnections) IsConnected(peerID peer.ID) (bool, error) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for IsConnected") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(peer.ID) (bool, error)); ok { @@ -37,13 +41,12 @@ func (_m *PeerConnections) IsConnected(peerID peer.ID) (bool, error) { return r0, r1 } -type mockConstructorTestingTNewPeerConnections interface { +// NewPeerConnections creates a new instance of PeerConnections. 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 NewPeerConnections(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerConnections creates a new instance of PeerConnections. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerConnections(t mockConstructorTestingTNewPeerConnections) *PeerConnections { +}) *PeerConnections { mock := &PeerConnections{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_filter.go b/network/p2p/mock/peer_filter.go index 52f6dbd139f..0a358edccaf 100644 --- a/network/p2p/mock/peer_filter.go +++ b/network/p2p/mock/peer_filter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -17,6 +17,10 @@ type PeerFilter struct { func (_m *PeerFilter) Execute(_a0 peer.ID) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 error if rf, ok := ret.Get(0).(func(peer.ID) error); ok { r0 = rf(_a0) @@ -27,13 +31,12 @@ func (_m *PeerFilter) Execute(_a0 peer.ID) error { return r0 } -type mockConstructorTestingTNewPeerFilter interface { +// NewPeerFilter creates a new instance of PeerFilter. 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 NewPeerFilter(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerFilter creates a new instance of PeerFilter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerFilter(t mockConstructorTestingTNewPeerFilter) *PeerFilter { +}) *PeerFilter { mock := &PeerFilter{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_management.go b/network/p2p/mock/peer_management.go index 278ab628743..62951307f6a 100644 --- a/network/p2p/mock/peer_management.go +++ b/network/p2p/mock/peer_management.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -36,6 +36,10 @@ type PeerManagement struct { func (_m *PeerManagement) ConnectToPeer(ctx context.Context, peerInfo peer.AddrInfo) error { ret := _m.Called(ctx, peerInfo) + if len(ret) == 0 { + panic("no return value specified for ConnectToPeer") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, peer.AddrInfo) error); ok { r0 = rf(ctx, peerInfo) @@ -50,6 +54,10 @@ func (_m *PeerManagement) ConnectToPeer(ctx context.Context, peerInfo peer.AddrI func (_m *PeerManagement) GetIPPort() (string, string, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetIPPort") + } + var r0 string var r1 string var r2 error @@ -81,6 +89,10 @@ func (_m *PeerManagement) GetIPPort() (string, string, error) { func (_m *PeerManagement) GetPeersForProtocol(pid protocol.ID) peer.IDSlice { ret := _m.Called(pid) + if len(ret) == 0 { + panic("no return value specified for GetPeersForProtocol") + } + var r0 peer.IDSlice if rf, ok := ret.Get(0).(func(protocol.ID) peer.IDSlice); ok { r0 = rf(pid) @@ -97,6 +109,10 @@ func (_m *PeerManagement) GetPeersForProtocol(pid protocol.ID) peer.IDSlice { func (_m *PeerManagement) Host() host.Host { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Host") + } + var r0 host.Host if rf, ok := ret.Get(0).(func() host.Host); ok { r0 = rf() @@ -113,6 +129,10 @@ func (_m *PeerManagement) Host() host.Host { func (_m *PeerManagement) ID() peer.ID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 peer.ID if rf, ok := ret.Get(0).(func() peer.ID); ok { r0 = rf() @@ -127,6 +147,10 @@ func (_m *PeerManagement) ID() peer.ID { func (_m *PeerManagement) ListPeers(topic string) []peer.ID { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for ListPeers") + } + var r0 []peer.ID if rf, ok := ret.Get(0).(func(string) []peer.ID); ok { r0 = rf(topic) @@ -143,6 +167,10 @@ func (_m *PeerManagement) ListPeers(topic string) []peer.ID { func (_m *PeerManagement) PeerManagerComponent() component.Component { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PeerManagerComponent") + } + var r0 component.Component if rf, ok := ret.Get(0).(func() component.Component); ok { r0 = rf() @@ -159,6 +187,10 @@ func (_m *PeerManagement) PeerManagerComponent() component.Component { func (_m *PeerManagement) Publish(ctx context.Context, messageScope network.OutgoingMessageScope) error { ret := _m.Called(ctx, messageScope) + if len(ret) == 0 { + panic("no return value specified for Publish") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, network.OutgoingMessageScope) error); ok { r0 = rf(ctx, messageScope) @@ -173,6 +205,10 @@ func (_m *PeerManagement) Publish(ctx context.Context, messageScope network.Outg func (_m *PeerManagement) RemovePeer(peerID peer.ID) error { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for RemovePeer") + } + var r0 error if rf, ok := ret.Get(0).(func(peer.ID) error); ok { r0 = rf(peerID) @@ -192,6 +228,10 @@ func (_m *PeerManagement) RequestPeerUpdate() { func (_m *PeerManagement) RoutingTable() *kbucket.RoutingTable { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RoutingTable") + } + var r0 *kbucket.RoutingTable if rf, ok := ret.Get(0).(func() *kbucket.RoutingTable); ok { r0 = rf() @@ -208,6 +248,10 @@ func (_m *PeerManagement) RoutingTable() *kbucket.RoutingTable { func (_m *PeerManagement) Subscribe(topic channels.Topic, topicValidator p2p.TopicValidatorFunc) (p2p.Subscription, error) { ret := _m.Called(topic, topicValidator) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 p2p.Subscription var r1 error if rf, ok := ret.Get(0).(func(channels.Topic, p2p.TopicValidatorFunc) (p2p.Subscription, error)); ok { @@ -234,6 +278,10 @@ func (_m *PeerManagement) Subscribe(topic channels.Topic, topicValidator p2p.Top func (_m *PeerManagement) Unsubscribe(topic channels.Topic) error { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Topic) error); ok { r0 = rf(topic) @@ -248,6 +296,10 @@ func (_m *PeerManagement) Unsubscribe(topic channels.Topic) error { func (_m *PeerManagement) WithDefaultUnicastProtocol(defaultHandler corenetwork.StreamHandler, preferred []protocols.ProtocolName) error { ret := _m.Called(defaultHandler, preferred) + if len(ret) == 0 { + panic("no return value specified for WithDefaultUnicastProtocol") + } + var r0 error if rf, ok := ret.Get(0).(func(corenetwork.StreamHandler, []protocols.ProtocolName) error); ok { r0 = rf(defaultHandler, preferred) @@ -263,13 +315,12 @@ func (_m *PeerManagement) WithPeersProvider(peersProvider p2p.PeersProvider) { _m.Called(peersProvider) } -type mockConstructorTestingTNewPeerManagement interface { +// NewPeerManagement creates a new instance of PeerManagement. 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 NewPeerManagement(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerManagement creates a new instance of PeerManagement. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerManagement(t mockConstructorTestingTNewPeerManagement) *PeerManagement { +}) *PeerManagement { mock := &PeerManagement{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_manager.go b/network/p2p/mock/peer_manager.go index 6200b1d837c..e4ad61be2b1 100644 --- a/network/p2p/mock/peer_manager.go +++ b/network/p2p/mock/peer_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -22,6 +22,10 @@ type PeerManager struct { func (_m *PeerManager) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -48,6 +52,10 @@ func (_m *PeerManager) OnRateLimitedPeer(pid peer.ID, role string, msgType strin func (_m *PeerManager) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -75,13 +83,12 @@ func (_m *PeerManager) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewPeerManager interface { +// NewPeerManager creates a new instance of PeerManager. 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 NewPeerManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerManager creates a new instance of PeerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerManager(t mockConstructorTestingTNewPeerManager) *PeerManager { +}) *PeerManager { mock := &PeerManager{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_manager_factory_func.go b/network/p2p/mock/peer_manager_factory_func.go index 189c9b3e282..9d83ed49475 100644 --- a/network/p2p/mock/peer_manager_factory_func.go +++ b/network/p2p/mock/peer_manager_factory_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -20,6 +20,10 @@ type PeerManagerFactoryFunc struct { func (_m *PeerManagerFactoryFunc) Execute(_a0 host.Host, peersProvider p2p.PeersProvider, logger zerolog.Logger) (p2p.PeerManager, error) { ret := _m.Called(_a0, peersProvider, logger) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.PeerManager var r1 error if rf, ok := ret.Get(0).(func(host.Host, p2p.PeersProvider, zerolog.Logger) (p2p.PeerManager, error)); ok { @@ -42,13 +46,12 @@ func (_m *PeerManagerFactoryFunc) Execute(_a0 host.Host, peersProvider p2p.Peers return r0, r1 } -type mockConstructorTestingTNewPeerManagerFactoryFunc interface { +// NewPeerManagerFactoryFunc creates a new instance of PeerManagerFactoryFunc. 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 NewPeerManagerFactoryFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerManagerFactoryFunc creates a new instance of PeerManagerFactoryFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerManagerFactoryFunc(t mockConstructorTestingTNewPeerManagerFactoryFunc) *PeerManagerFactoryFunc { +}) *PeerManagerFactoryFunc { mock := &PeerManagerFactoryFunc{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_score.go b/network/p2p/mock/peer_score.go index 81ea79ec570..9156ad28c3f 100644 --- a/network/p2p/mock/peer_score.go +++ b/network/p2p/mock/peer_score.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -16,6 +16,10 @@ type PeerScore struct { func (_m *PeerScore) PeerScoreExposer() p2p.PeerScoreExposer { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PeerScoreExposer") + } + var r0 p2p.PeerScoreExposer if rf, ok := ret.Get(0).(func() p2p.PeerScoreExposer); ok { r0 = rf() @@ -28,13 +32,12 @@ func (_m *PeerScore) PeerScoreExposer() p2p.PeerScoreExposer { return r0 } -type mockConstructorTestingTNewPeerScore interface { +// NewPeerScore creates a new instance of PeerScore. 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 NewPeerScore(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerScore creates a new instance of PeerScore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerScore(t mockConstructorTestingTNewPeerScore) *PeerScore { +}) *PeerScore { mock := &PeerScore{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_score_exposer.go b/network/p2p/mock/peer_score_exposer.go index 53dc52e5367..bad2c55268b 100644 --- a/network/p2p/mock/peer_score_exposer.go +++ b/network/p2p/mock/peer_score_exposer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type PeerScoreExposer struct { func (_m *PeerScoreExposer) GetAppScore(peerID peer.ID) (float64, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetAppScore") + } + var r0 float64 var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool)); ok { @@ -42,6 +46,10 @@ func (_m *PeerScoreExposer) GetAppScore(peerID peer.ID) (float64, bool) { func (_m *PeerScoreExposer) GetBehaviourPenalty(peerID peer.ID) (float64, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetBehaviourPenalty") + } + var r0 float64 var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool)); ok { @@ -66,6 +74,10 @@ func (_m *PeerScoreExposer) GetBehaviourPenalty(peerID peer.ID) (float64, bool) func (_m *PeerScoreExposer) GetIPColocationFactor(peerID peer.ID) (float64, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetIPColocationFactor") + } + var r0 float64 var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool)); ok { @@ -90,6 +102,10 @@ func (_m *PeerScoreExposer) GetIPColocationFactor(peerID peer.ID) (float64, bool func (_m *PeerScoreExposer) GetScore(peerID peer.ID) (float64, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetScore") + } + var r0 float64 var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool)); ok { @@ -114,6 +130,10 @@ func (_m *PeerScoreExposer) GetScore(peerID peer.ID) (float64, bool) { func (_m *PeerScoreExposer) GetTopicScores(peerID peer.ID) (map[string]p2p.TopicScoreSnapshot, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetTopicScores") + } + var r0 map[string]p2p.TopicScoreSnapshot var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (map[string]p2p.TopicScoreSnapshot, bool)); ok { @@ -136,13 +156,12 @@ func (_m *PeerScoreExposer) GetTopicScores(peerID peer.ID) (map[string]p2p.Topic return r0, r1 } -type mockConstructorTestingTNewPeerScoreExposer interface { +// NewPeerScoreExposer creates a new instance of PeerScoreExposer. 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 NewPeerScoreExposer(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerScoreExposer creates a new instance of PeerScoreExposer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerScoreExposer(t mockConstructorTestingTNewPeerScoreExposer) *PeerScoreExposer { +}) *PeerScoreExposer { mock := &PeerScoreExposer{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_score_tracer.go b/network/p2p/mock/peer_score_tracer.go index 88791c7656b..31060bf2d19 100644 --- a/network/p2p/mock/peer_score_tracer.go +++ b/network/p2p/mock/peer_score_tracer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -22,6 +22,10 @@ type PeerScoreTracer struct { func (_m *PeerScoreTracer) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -38,6 +42,10 @@ func (_m *PeerScoreTracer) Done() <-chan struct{} { func (_m *PeerScoreTracer) GetAppScore(peerID peer.ID) (float64, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetAppScore") + } + var r0 float64 var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool)); ok { @@ -62,6 +70,10 @@ func (_m *PeerScoreTracer) GetAppScore(peerID peer.ID) (float64, bool) { func (_m *PeerScoreTracer) GetBehaviourPenalty(peerID peer.ID) (float64, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetBehaviourPenalty") + } + var r0 float64 var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool)); ok { @@ -86,6 +98,10 @@ func (_m *PeerScoreTracer) GetBehaviourPenalty(peerID peer.ID) (float64, bool) { func (_m *PeerScoreTracer) GetIPColocationFactor(peerID peer.ID) (float64, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetIPColocationFactor") + } + var r0 float64 var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool)); ok { @@ -110,6 +126,10 @@ func (_m *PeerScoreTracer) GetIPColocationFactor(peerID peer.ID) (float64, bool) func (_m *PeerScoreTracer) GetScore(peerID peer.ID) (float64, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetScore") + } + var r0 float64 var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool)); ok { @@ -134,6 +154,10 @@ func (_m *PeerScoreTracer) GetScore(peerID peer.ID) (float64, bool) { func (_m *PeerScoreTracer) GetTopicScores(peerID peer.ID) (map[string]p2p.TopicScoreSnapshot, bool) { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for GetTopicScores") + } + var r0 map[string]p2p.TopicScoreSnapshot var r1 bool if rf, ok := ret.Get(0).(func(peer.ID) (map[string]p2p.TopicScoreSnapshot, bool)); ok { @@ -160,6 +184,10 @@ func (_m *PeerScoreTracer) GetTopicScores(peerID peer.ID) (map[string]p2p.TopicS func (_m *PeerScoreTracer) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -181,6 +209,10 @@ func (_m *PeerScoreTracer) Start(_a0 irrecoverable.SignalerContext) { func (_m *PeerScoreTracer) UpdateInterval() time.Duration { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for UpdateInterval") + } + var r0 time.Duration if rf, ok := ret.Get(0).(func() time.Duration); ok { r0 = rf() @@ -196,13 +228,12 @@ func (_m *PeerScoreTracer) UpdatePeerScoreSnapshots(_a0 map[peer.ID]*p2p.PeerSco _m.Called(_a0) } -type mockConstructorTestingTNewPeerScoreTracer interface { +// NewPeerScoreTracer creates a new instance of PeerScoreTracer. 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 NewPeerScoreTracer(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerScoreTracer creates a new instance of PeerScoreTracer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerScoreTracer(t mockConstructorTestingTNewPeerScoreTracer) *PeerScoreTracer { +}) *PeerScoreTracer { mock := &PeerScoreTracer{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peer_updater.go b/network/p2p/mock/peer_updater.go index 7a708e6c3df..712d7876826 100644 --- a/network/p2p/mock/peer_updater.go +++ b/network/p2p/mock/peer_updater.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -20,13 +20,12 @@ func (_m *PeerUpdater) UpdatePeers(ctx context.Context, peerIDs peer.IDSlice) { _m.Called(ctx, peerIDs) } -type mockConstructorTestingTNewPeerUpdater interface { +// NewPeerUpdater creates a new instance of PeerUpdater. 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 NewPeerUpdater(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeerUpdater creates a new instance of PeerUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeerUpdater(t mockConstructorTestingTNewPeerUpdater) *PeerUpdater { +}) *PeerUpdater { mock := &PeerUpdater{} mock.Mock.Test(t) diff --git a/network/p2p/mock/peers_provider.go b/network/p2p/mock/peers_provider.go index ac94b23d7dc..8062d5bf328 100644 --- a/network/p2p/mock/peers_provider.go +++ b/network/p2p/mock/peers_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -17,6 +17,10 @@ type PeersProvider struct { func (_m *PeersProvider) Execute() peer.IDSlice { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 peer.IDSlice if rf, ok := ret.Get(0).(func() peer.IDSlice); ok { r0 = rf() @@ -29,13 +33,12 @@ func (_m *PeersProvider) Execute() peer.IDSlice { return r0 } -type mockConstructorTestingTNewPeersProvider interface { +// NewPeersProvider creates a new instance of PeersProvider. 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 NewPeersProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewPeersProvider creates a new instance of PeersProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPeersProvider(t mockConstructorTestingTNewPeersProvider) *PeersProvider { +}) *PeersProvider { mock := &PeersProvider{} mock.Mock.Test(t) diff --git a/network/p2p/mock/protocol_peer_cache.go b/network/p2p/mock/protocol_peer_cache.go index 80d21ff3814..8b388450df7 100644 --- a/network/p2p/mock/protocol_peer_cache.go +++ b/network/p2p/mock/protocol_peer_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -24,6 +24,10 @@ func (_m *ProtocolPeerCache) AddProtocols(peerID peer.ID, protocols []protocol.I func (_m *ProtocolPeerCache) GetPeers(pid protocol.ID) map[peer.ID]struct{} { ret := _m.Called(pid) + if len(ret) == 0 { + panic("no return value specified for GetPeers") + } + var r0 map[peer.ID]struct{} if rf, ok := ret.Get(0).(func(protocol.ID) map[peer.ID]struct{}); ok { r0 = rf(pid) @@ -46,13 +50,12 @@ func (_m *ProtocolPeerCache) RemoveProtocols(peerID peer.ID, protocols []protoco _m.Called(peerID, protocols) } -type mockConstructorTestingTNewProtocolPeerCache interface { +// NewProtocolPeerCache creates a new instance of ProtocolPeerCache. 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 NewProtocolPeerCache(t interface { mock.TestingT Cleanup(func()) -} - -// NewProtocolPeerCache creates a new instance of ProtocolPeerCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProtocolPeerCache(t mockConstructorTestingTNewProtocolPeerCache) *ProtocolPeerCache { +}) *ProtocolPeerCache { mock := &ProtocolPeerCache{} mock.Mock.Test(t) diff --git a/network/p2p/mock/pub_sub.go b/network/p2p/mock/pub_sub.go index e80a4009598..69c6c4e78f7 100644 --- a/network/p2p/mock/pub_sub.go +++ b/network/p2p/mock/pub_sub.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -25,6 +25,10 @@ type PubSub struct { func (_m *PubSub) GetLocalMeshPeers(topic channels.Topic) []peer.ID { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for GetLocalMeshPeers") + } + var r0 []peer.ID if rf, ok := ret.Get(0).(func(channels.Topic) []peer.ID); ok { r0 = rf(topic) @@ -41,6 +45,10 @@ func (_m *PubSub) GetLocalMeshPeers(topic channels.Topic) []peer.ID { func (_m *PubSub) Publish(ctx context.Context, messageScope network.OutgoingMessageScope) error { ret := _m.Called(ctx, messageScope) + if len(ret) == 0 { + panic("no return value specified for Publish") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, network.OutgoingMessageScope) error); ok { r0 = rf(ctx, messageScope) @@ -60,6 +68,10 @@ func (_m *PubSub) SetPubSub(ps p2p.PubSubAdapter) { func (_m *PubSub) Subscribe(topic channels.Topic, topicValidator p2p.TopicValidatorFunc) (p2p.Subscription, error) { ret := _m.Called(topic, topicValidator) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 p2p.Subscription var r1 error if rf, ok := ret.Get(0).(func(channels.Topic, p2p.TopicValidatorFunc) (p2p.Subscription, error)); ok { @@ -86,6 +98,10 @@ func (_m *PubSub) Subscribe(topic channels.Topic, topicValidator p2p.TopicValida func (_m *PubSub) Unsubscribe(topic channels.Topic) error { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(channels.Topic) error); ok { r0 = rf(topic) @@ -96,13 +112,12 @@ func (_m *PubSub) Unsubscribe(topic channels.Topic) error { return r0 } -type mockConstructorTestingTNewPubSub interface { +// NewPubSub creates a new instance of PubSub. 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 NewPubSub(t interface { mock.TestingT Cleanup(func()) -} - -// NewPubSub creates a new instance of PubSub. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPubSub(t mockConstructorTestingTNewPubSub) *PubSub { +}) *PubSub { mock := &PubSub{} mock.Mock.Test(t) diff --git a/network/p2p/mock/pub_sub_adapter.go b/network/p2p/mock/pub_sub_adapter.go index 159b149f183..6ba8d656d55 100644 --- a/network/p2p/mock/pub_sub_adapter.go +++ b/network/p2p/mock/pub_sub_adapter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -29,6 +29,10 @@ func (_m *PubSubAdapter) ActiveClustersChanged(_a0 flow.ChainIDList) { func (_m *PubSubAdapter) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -45,6 +49,10 @@ func (_m *PubSubAdapter) Done() <-chan struct{} { func (_m *PubSubAdapter) GetLocalMeshPeers(topic channels.Topic) []peer.ID { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for GetLocalMeshPeers") + } + var r0 []peer.ID if rf, ok := ret.Get(0).(func(channels.Topic) []peer.ID); ok { r0 = rf(topic) @@ -61,6 +69,10 @@ func (_m *PubSubAdapter) GetLocalMeshPeers(topic channels.Topic) []peer.ID { func (_m *PubSubAdapter) GetTopics() []string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetTopics") + } + var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() @@ -77,6 +89,10 @@ func (_m *PubSubAdapter) GetTopics() []string { func (_m *PubSubAdapter) Join(topic string) (p2p.Topic, error) { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for Join") + } + var r0 p2p.Topic var r1 error if rf, ok := ret.Get(0).(func(string) (p2p.Topic, error)); ok { @@ -103,6 +119,10 @@ func (_m *PubSubAdapter) Join(topic string) (p2p.Topic, error) { func (_m *PubSubAdapter) ListPeers(topic string) []peer.ID { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for ListPeers") + } + var r0 []peer.ID if rf, ok := ret.Get(0).(func(string) []peer.ID); ok { r0 = rf(topic) @@ -119,6 +139,10 @@ func (_m *PubSubAdapter) ListPeers(topic string) []peer.ID { func (_m *PubSubAdapter) PeerScoreExposer() p2p.PeerScoreExposer { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PeerScoreExposer") + } + var r0 p2p.PeerScoreExposer if rf, ok := ret.Get(0).(func() p2p.PeerScoreExposer); ok { r0 = rf() @@ -135,6 +159,10 @@ func (_m *PubSubAdapter) PeerScoreExposer() p2p.PeerScoreExposer { func (_m *PubSubAdapter) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -151,6 +179,10 @@ func (_m *PubSubAdapter) Ready() <-chan struct{} { func (_m *PubSubAdapter) RegisterTopicValidator(topic string, topicValidator p2p.TopicValidatorFunc) error { ret := _m.Called(topic, topicValidator) + if len(ret) == 0 { + panic("no return value specified for RegisterTopicValidator") + } + var r0 error if rf, ok := ret.Get(0).(func(string, p2p.TopicValidatorFunc) error); ok { r0 = rf(topic, topicValidator) @@ -170,6 +202,10 @@ func (_m *PubSubAdapter) Start(_a0 irrecoverable.SignalerContext) { func (_m *PubSubAdapter) UnregisterTopicValidator(topic string) error { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for UnregisterTopicValidator") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(topic) @@ -180,13 +216,12 @@ func (_m *PubSubAdapter) UnregisterTopicValidator(topic string) error { return r0 } -type mockConstructorTestingTNewPubSubAdapter interface { +// NewPubSubAdapter creates a new instance of PubSubAdapter. 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 NewPubSubAdapter(t interface { mock.TestingT Cleanup(func()) -} - -// NewPubSubAdapter creates a new instance of PubSubAdapter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPubSubAdapter(t mockConstructorTestingTNewPubSubAdapter) *PubSubAdapter { +}) *PubSubAdapter { mock := &PubSubAdapter{} mock.Mock.Test(t) diff --git a/network/p2p/mock/pub_sub_adapter_config.go b/network/p2p/mock/pub_sub_adapter_config.go index 980d6cb71f3..466ca754211 100644 --- a/network/p2p/mock/pub_sub_adapter_config.go +++ b/network/p2p/mock/pub_sub_adapter_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -49,13 +49,12 @@ func (_m *PubSubAdapterConfig) WithTracer(t p2p.PubSubTracer) { _m.Called(t) } -type mockConstructorTestingTNewPubSubAdapterConfig interface { +// NewPubSubAdapterConfig creates a new instance of PubSubAdapterConfig. 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 NewPubSubAdapterConfig(t interface { mock.TestingT Cleanup(func()) -} - -// NewPubSubAdapterConfig creates a new instance of PubSubAdapterConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPubSubAdapterConfig(t mockConstructorTestingTNewPubSubAdapterConfig) *PubSubAdapterConfig { +}) *PubSubAdapterConfig { mock := &PubSubAdapterConfig{} mock.Mock.Test(t) diff --git a/network/p2p/mock/pub_sub_tracer.go b/network/p2p/mock/pub_sub_tracer.go index 0b82964ad6b..938578371e8 100644 --- a/network/p2p/mock/pub_sub_tracer.go +++ b/network/p2p/mock/pub_sub_tracer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -34,6 +34,10 @@ func (_m *PubSubTracer) DeliverMessage(msg *pubsub.Message) { func (_m *PubSubTracer) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -60,6 +64,10 @@ func (_m *PubSubTracer) DuplicateMessage(msg *pubsub.Message) { func (_m *PubSubTracer) DuplicateMessageCount(_a0 peer.ID) float64 { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DuplicateMessageCount") + } + var r0 float64 if rf, ok := ret.Get(0).(func(peer.ID) float64); ok { r0 = rf(_a0) @@ -74,6 +82,10 @@ func (_m *PubSubTracer) DuplicateMessageCount(_a0 peer.ID) float64 { func (_m *PubSubTracer) GetLocalMeshPeers(topic channels.Topic) []peer.ID { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for GetLocalMeshPeers") + } + var r0 []peer.ID if rf, ok := ret.Get(0).(func(channels.Topic) []peer.ID); ok { r0 = rf(topic) @@ -100,6 +112,10 @@ func (_m *PubSubTracer) Join(topic string) { func (_m *PubSubTracer) LastHighestIHaveRPCSize() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LastHighestIHaveRPCSize") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -124,6 +140,10 @@ func (_m *PubSubTracer) Prune(p peer.ID, topic string) { func (_m *PubSubTracer) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -180,6 +200,10 @@ func (_m *PubSubTracer) ValidateMessage(msg *pubsub.Message) { func (_m *PubSubTracer) WasIHaveRPCSent(messageID string) bool { ret := _m.Called(messageID) + if len(ret) == 0 { + panic("no return value specified for WasIHaveRPCSent") + } + var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(messageID) @@ -190,13 +214,12 @@ func (_m *PubSubTracer) WasIHaveRPCSent(messageID string) bool { return r0 } -type mockConstructorTestingTNewPubSubTracer interface { +// NewPubSubTracer creates a new instance of PubSubTracer. 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 NewPubSubTracer(t interface { mock.TestingT Cleanup(func()) -} - -// NewPubSubTracer creates a new instance of PubSubTracer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPubSubTracer(t mockConstructorTestingTNewPubSubTracer) *PubSubTracer { +}) *PubSubTracer { mock := &PubSubTracer{} mock.Mock.Test(t) diff --git a/network/p2p/mock/rate_limiter.go b/network/p2p/mock/rate_limiter.go index 1c1e6c98c73..03e7053846d 100644 --- a/network/p2p/mock/rate_limiter.go +++ b/network/p2p/mock/rate_limiter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type RateLimiter struct { func (_m *RateLimiter) Allow(peerID peer.ID, msgSize int) bool { ret := _m.Called(peerID, msgSize) + if len(ret) == 0 { + panic("no return value specified for Allow") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID, int) bool); ok { r0 = rf(peerID, msgSize) @@ -32,6 +36,10 @@ func (_m *RateLimiter) Allow(peerID peer.ID, msgSize int) bool { func (_m *RateLimiter) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *RateLimiter) Done() <-chan struct{} { func (_m *RateLimiter) IsRateLimited(peerID peer.ID) bool { ret := _m.Called(peerID) + if len(ret) == 0 { + panic("no return value specified for IsRateLimited") + } + var r0 bool if rf, ok := ret.Get(0).(func(peer.ID) bool); ok { r0 = rf(peerID) @@ -62,6 +74,10 @@ func (_m *RateLimiter) IsRateLimited(peerID peer.ID) bool { func (_m *RateLimiter) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -79,13 +95,12 @@ func (_m *RateLimiter) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewRateLimiter interface { +// NewRateLimiter creates a new instance of RateLimiter. 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 NewRateLimiter(t interface { mock.TestingT Cleanup(func()) -} - -// NewRateLimiter creates a new instance of RateLimiter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRateLimiter(t mockConstructorTestingTNewRateLimiter) *RateLimiter { +}) *RateLimiter { mock := &RateLimiter{} mock.Mock.Test(t) diff --git a/network/p2p/mock/rate_limiter_consumer.go b/network/p2p/mock/rate_limiter_consumer.go index 3385f180319..a7d5537c4de 100644 --- a/network/p2p/mock/rate_limiter_consumer.go +++ b/network/p2p/mock/rate_limiter_consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,13 +18,12 @@ func (_m *RateLimiterConsumer) OnRateLimitedPeer(pid peer.ID, role string, msgTy _m.Called(pid, role, msgType, topic, reason) } -type mockConstructorTestingTNewRateLimiterConsumer interface { +// NewRateLimiterConsumer creates a new instance of RateLimiterConsumer. 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 NewRateLimiterConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewRateLimiterConsumer creates a new instance of RateLimiterConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRateLimiterConsumer(t mockConstructorTestingTNewRateLimiterConsumer) *RateLimiterConsumer { +}) *RateLimiterConsumer { mock := &RateLimiterConsumer{} mock.Mock.Test(t) diff --git a/network/p2p/mock/rate_limiter_opt.go b/network/p2p/mock/rate_limiter_opt.go index 04df105091c..4f99c2e8426 100644 --- a/network/p2p/mock/rate_limiter_opt.go +++ b/network/p2p/mock/rate_limiter_opt.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -17,13 +17,12 @@ func (_m *RateLimiterOpt) Execute(limiter p2p.RateLimiter) { _m.Called(limiter) } -type mockConstructorTestingTNewRateLimiterOpt interface { +// NewRateLimiterOpt creates a new instance of RateLimiterOpt. 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 NewRateLimiterOpt(t interface { mock.TestingT Cleanup(func()) -} - -// NewRateLimiterOpt creates a new instance of RateLimiterOpt. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRateLimiterOpt(t mockConstructorTestingTNewRateLimiterOpt) *RateLimiterOpt { +}) *RateLimiterOpt { mock := &RateLimiterOpt{} mock.Mock.Test(t) diff --git a/network/p2p/mock/routable.go b/network/p2p/mock/routable.go index b53ebd91058..e8c4465b372 100644 --- a/network/p2p/mock/routable.go +++ b/network/p2p/mock/routable.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type Routable struct { func (_m *Routable) Routing() routing.Routing { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Routing") + } + var r0 routing.Routing if rf, ok := ret.Get(0).(func() routing.Routing); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *Routable) Routing() routing.Routing { func (_m *Routable) RoutingTable() *kbucket.RoutingTable { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RoutingTable") + } + var r0 *kbucket.RoutingTable if rf, ok := ret.Get(0).(func() *kbucket.RoutingTable); ok { r0 = rf() @@ -50,6 +58,10 @@ func (_m *Routable) RoutingTable() *kbucket.RoutingTable { func (_m *Routable) SetRouting(r routing.Routing) error { ret := _m.Called(r) + if len(ret) == 0 { + panic("no return value specified for SetRouting") + } + var r0 error if rf, ok := ret.Get(0).(func(routing.Routing) error); ok { r0 = rf(r) @@ -60,13 +72,12 @@ func (_m *Routable) SetRouting(r routing.Routing) error { return r0 } -type mockConstructorTestingTNewRoutable interface { +// NewRoutable creates a new instance of Routable. 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 NewRoutable(t interface { mock.TestingT Cleanup(func()) -} - -// NewRoutable creates a new instance of Routable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRoutable(t mockConstructorTestingTNewRoutable) *Routable { +}) *Routable { mock := &Routable{} mock.Mock.Test(t) diff --git a/network/p2p/mock/rpc_control_tracking.go b/network/p2p/mock/rpc_control_tracking.go index a2d496c7dad..14467c4b4ce 100644 --- a/network/p2p/mock/rpc_control_tracking.go +++ b/network/p2p/mock/rpc_control_tracking.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -13,6 +13,10 @@ type RpcControlTracking struct { func (_m *RpcControlTracking) LastHighestIHaveRPCSize() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LastHighestIHaveRPCSize") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -27,6 +31,10 @@ func (_m *RpcControlTracking) LastHighestIHaveRPCSize() int64 { func (_m *RpcControlTracking) WasIHaveRPCSent(messageID string) bool { ret := _m.Called(messageID) + if len(ret) == 0 { + panic("no return value specified for WasIHaveRPCSent") + } + var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(messageID) @@ -37,13 +45,12 @@ func (_m *RpcControlTracking) WasIHaveRPCSent(messageID string) bool { return r0 } -type mockConstructorTestingTNewRpcControlTracking interface { +// NewRpcControlTracking creates a new instance of RpcControlTracking. 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 NewRpcControlTracking(t interface { mock.TestingT Cleanup(func()) -} - -// NewRpcControlTracking creates a new instance of RpcControlTracking. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRpcControlTracking(t mockConstructorTestingTNewRpcControlTracking) *RpcControlTracking { +}) *RpcControlTracking { mock := &RpcControlTracking{} mock.Mock.Test(t) diff --git a/network/p2p/mock/score_option_builder.go b/network/p2p/mock/score_option_builder.go index e5698aadf94..28abb89ae81 100644 --- a/network/p2p/mock/score_option_builder.go +++ b/network/p2p/mock/score_option_builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type ScoreOptionBuilder struct { func (_m *ScoreOptionBuilder) BuildFlowPubSubScoreOption() (*pubsub.PeerScoreParams, *pubsub.PeerScoreThresholds) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BuildFlowPubSubScoreOption") + } + var r0 *pubsub.PeerScoreParams var r1 *pubsub.PeerScoreThresholds if rf, ok := ret.Get(0).(func() (*pubsub.PeerScoreParams, *pubsub.PeerScoreThresholds)); ok { @@ -46,6 +50,10 @@ func (_m *ScoreOptionBuilder) BuildFlowPubSubScoreOption() (*pubsub.PeerScorePar func (_m *ScoreOptionBuilder) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -62,6 +70,10 @@ func (_m *ScoreOptionBuilder) Done() <-chan struct{} { func (_m *ScoreOptionBuilder) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -83,6 +95,10 @@ func (_m *ScoreOptionBuilder) Start(_a0 irrecoverable.SignalerContext) { func (_m *ScoreOptionBuilder) TopicScoreParams(_a0 *pubsub.Topic) *pubsub.TopicScoreParams { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for TopicScoreParams") + } + var r0 *pubsub.TopicScoreParams if rf, ok := ret.Get(0).(func(*pubsub.Topic) *pubsub.TopicScoreParams); ok { r0 = rf(_a0) @@ -95,13 +111,12 @@ func (_m *ScoreOptionBuilder) TopicScoreParams(_a0 *pubsub.Topic) *pubsub.TopicS return r0 } -type mockConstructorTestingTNewScoreOptionBuilder interface { +// NewScoreOptionBuilder creates a new instance of ScoreOptionBuilder. 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 NewScoreOptionBuilder(t interface { mock.TestingT Cleanup(func()) -} - -// NewScoreOptionBuilder creates a new instance of ScoreOptionBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewScoreOptionBuilder(t mockConstructorTestingTNewScoreOptionBuilder) *ScoreOptionBuilder { +}) *ScoreOptionBuilder { mock := &ScoreOptionBuilder{} mock.Mock.Test(t) diff --git a/network/p2p/mock/stream_factory.go b/network/p2p/mock/stream_factory.go index b95e52d3ff8..e8e2ab13d7f 100644 --- a/network/p2p/mock/stream_factory.go +++ b/network/p2p/mock/stream_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -22,6 +22,10 @@ type StreamFactory struct { func (_m *StreamFactory) NewStream(_a0 context.Context, _a1 peer.ID, _a2 protocol.ID) (network.Stream, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for NewStream") + } + var r0 network.Stream var r1 error if rf, ok := ret.Get(0).(func(context.Context, peer.ID, protocol.ID) (network.Stream, error)); ok { @@ -49,13 +53,12 @@ func (_m *StreamFactory) SetStreamHandler(_a0 protocol.ID, _a1 network.StreamHan _m.Called(_a0, _a1) } -type mockConstructorTestingTNewStreamFactory interface { +// NewStreamFactory creates a new instance of StreamFactory. 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 NewStreamFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewStreamFactory creates a new instance of StreamFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStreamFactory(t mockConstructorTestingTNewStreamFactory) *StreamFactory { +}) *StreamFactory { mock := &StreamFactory{} mock.Mock.Test(t) diff --git a/network/p2p/mock/subscription.go b/network/p2p/mock/subscription.go index a54d673b661..8148375b11b 100644 --- a/network/p2p/mock/subscription.go +++ b/network/p2p/mock/subscription.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -24,6 +24,10 @@ func (_m *Subscription) Cancel() { func (_m *Subscription) Next(_a0 context.Context) (*pubsub.Message, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Next") + } + var r0 *pubsub.Message var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*pubsub.Message, error)); ok { @@ -50,6 +54,10 @@ func (_m *Subscription) Next(_a0 context.Context) (*pubsub.Message, error) { func (_m *Subscription) Topic() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Topic") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -60,13 +68,12 @@ func (_m *Subscription) Topic() string { return r0 } -type mockConstructorTestingTNewSubscription interface { +// NewSubscription creates a new instance of Subscription. 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 NewSubscription(t interface { mock.TestingT Cleanup(func()) -} - -// NewSubscription creates a new instance of Subscription. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSubscription(t mockConstructorTestingTNewSubscription) *Subscription { +}) *Subscription { mock := &Subscription{} mock.Mock.Test(t) diff --git a/network/p2p/mock/subscription_filter.go b/network/p2p/mock/subscription_filter.go index 6f66b9ec75b..1c3a84f4a79 100644 --- a/network/p2p/mock/subscription_filter.go +++ b/network/p2p/mock/subscription_filter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -19,6 +19,10 @@ type SubscriptionFilter struct { func (_m *SubscriptionFilter) CanSubscribe(_a0 string) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for CanSubscribe") + } + var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(_a0) @@ -33,6 +37,10 @@ func (_m *SubscriptionFilter) CanSubscribe(_a0 string) bool { func (_m *SubscriptionFilter) FilterIncomingSubscriptions(_a0 peer.ID, _a1 []*pubsub_pb.RPC_SubOpts) ([]*pubsub_pb.RPC_SubOpts, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FilterIncomingSubscriptions") + } + var r0 []*pubsub_pb.RPC_SubOpts var r1 error if rf, ok := ret.Get(0).(func(peer.ID, []*pubsub_pb.RPC_SubOpts) ([]*pubsub_pb.RPC_SubOpts, error)); ok { @@ -55,13 +63,12 @@ func (_m *SubscriptionFilter) FilterIncomingSubscriptions(_a0 peer.ID, _a1 []*pu return r0, r1 } -type mockConstructorTestingTNewSubscriptionFilter interface { +// NewSubscriptionFilter creates a new instance of SubscriptionFilter. 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 NewSubscriptionFilter(t interface { mock.TestingT Cleanup(func()) -} - -// NewSubscriptionFilter creates a new instance of SubscriptionFilter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSubscriptionFilter(t mockConstructorTestingTNewSubscriptionFilter) *SubscriptionFilter { +}) *SubscriptionFilter { mock := &SubscriptionFilter{} mock.Mock.Test(t) diff --git a/network/p2p/mock/subscription_provider.go b/network/p2p/mock/subscription_provider.go index 3445a89e6a0..85a96727f7c 100644 --- a/network/p2p/mock/subscription_provider.go +++ b/network/p2p/mock/subscription_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type SubscriptionProvider struct { func (_m *SubscriptionProvider) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *SubscriptionProvider) Done() <-chan struct{} { func (_m *SubscriptionProvider) GetSubscribedTopics(pid peer.ID) []string { ret := _m.Called(pid) + if len(ret) == 0 { + panic("no return value specified for GetSubscribedTopics") + } + var r0 []string if rf, ok := ret.Get(0).(func(peer.ID) []string); ok { r0 = rf(pid) @@ -50,6 +58,10 @@ func (_m *SubscriptionProvider) GetSubscribedTopics(pid peer.ID) []string { func (_m *SubscriptionProvider) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -67,13 +79,12 @@ func (_m *SubscriptionProvider) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewSubscriptionProvider interface { +// NewSubscriptionProvider creates a new instance of SubscriptionProvider. 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 NewSubscriptionProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewSubscriptionProvider creates a new instance of SubscriptionProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSubscriptionProvider(t mockConstructorTestingTNewSubscriptionProvider) *SubscriptionProvider { +}) *SubscriptionProvider { mock := &SubscriptionProvider{} mock.Mock.Test(t) diff --git a/network/p2p/mock/subscription_validator.go b/network/p2p/mock/subscription_validator.go index 33c7d1f2d75..e66d1d76471 100644 --- a/network/p2p/mock/subscription_validator.go +++ b/network/p2p/mock/subscription_validator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -20,6 +20,10 @@ type SubscriptionValidator struct { func (_m *SubscriptionValidator) CheckSubscribedToAllowedTopics(pid peer.ID, role flow.Role) error { ret := _m.Called(pid, role) + if len(ret) == 0 { + panic("no return value specified for CheckSubscribedToAllowedTopics") + } + var r0 error if rf, ok := ret.Get(0).(func(peer.ID, flow.Role) error); ok { r0 = rf(pid, role) @@ -34,6 +38,10 @@ func (_m *SubscriptionValidator) CheckSubscribedToAllowedTopics(pid peer.ID, rol func (_m *SubscriptionValidator) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -50,6 +58,10 @@ func (_m *SubscriptionValidator) Done() <-chan struct{} { func (_m *SubscriptionValidator) Ready() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ready") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -67,13 +79,12 @@ func (_m *SubscriptionValidator) Start(_a0 irrecoverable.SignalerContext) { _m.Called(_a0) } -type mockConstructorTestingTNewSubscriptionValidator interface { +// NewSubscriptionValidator creates a new instance of SubscriptionValidator. 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 NewSubscriptionValidator(t interface { mock.TestingT Cleanup(func()) -} - -// NewSubscriptionValidator creates a new instance of SubscriptionValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSubscriptionValidator(t mockConstructorTestingTNewSubscriptionValidator) *SubscriptionValidator { +}) *SubscriptionValidator { mock := &SubscriptionValidator{} mock.Mock.Test(t) diff --git a/network/p2p/mock/subscriptions.go b/network/p2p/mock/subscriptions.go index 910b17cd676..465bd840dbf 100644 --- a/network/p2p/mock/subscriptions.go +++ b/network/p2p/mock/subscriptions.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type Subscriptions struct { func (_m *Subscriptions) HasSubscription(topic channels.Topic) bool { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for HasSubscription") + } + var r0 bool if rf, ok := ret.Get(0).(func(channels.Topic) bool); ok { r0 = rf(topic) @@ -33,13 +37,12 @@ func (_m *Subscriptions) SetUnicastManager(uniMgr p2p.UnicastManager) { _m.Called(uniMgr) } -type mockConstructorTestingTNewSubscriptions interface { +// NewSubscriptions creates a new instance of Subscriptions. 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 NewSubscriptions(t interface { mock.TestingT Cleanup(func()) -} - -// NewSubscriptions creates a new instance of Subscriptions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSubscriptions(t mockConstructorTestingTNewSubscriptions) *Subscriptions { +}) *Subscriptions { mock := &Subscriptions{} mock.Mock.Test(t) diff --git a/network/p2p/mock/topic.go b/network/p2p/mock/topic.go index 58602ec7fcc..aade584de78 100644 --- a/network/p2p/mock/topic.go +++ b/network/p2p/mock/topic.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -18,6 +18,10 @@ type Topic struct { func (_m *Topic) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Topic) Close() error { func (_m *Topic) Publish(_a0 context.Context, _a1 []byte) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Publish") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []byte) error); ok { r0 = rf(_a0, _a1) @@ -46,6 +54,10 @@ func (_m *Topic) Publish(_a0 context.Context, _a1 []byte) error { func (_m *Topic) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -60,6 +72,10 @@ func (_m *Topic) String() string { func (_m *Topic) Subscribe() (p2p.Subscription, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 p2p.Subscription var r1 error if rf, ok := ret.Get(0).(func() (p2p.Subscription, error)); ok { @@ -82,13 +98,12 @@ func (_m *Topic) Subscribe() (p2p.Subscription, error) { return r0, r1 } -type mockConstructorTestingTNewTopic interface { +// NewTopic creates a new instance of Topic. 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 NewTopic(t interface { mock.TestingT Cleanup(func()) -} - -// NewTopic creates a new instance of Topic. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTopic(t mockConstructorTestingTNewTopic) *Topic { +}) *Topic { mock := &Topic{} mock.Mock.Test(t) diff --git a/network/p2p/mock/topic_provider.go b/network/p2p/mock/topic_provider.go index 690eb7428e3..a9810a9b529 100644 --- a/network/p2p/mock/topic_provider.go +++ b/network/p2p/mock/topic_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -17,6 +17,10 @@ type TopicProvider struct { func (_m *TopicProvider) GetTopics() []string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetTopics") + } + var r0 []string if rf, ok := ret.Get(0).(func() []string); ok { r0 = rf() @@ -33,6 +37,10 @@ func (_m *TopicProvider) GetTopics() []string { func (_m *TopicProvider) ListPeers(topic string) []peer.ID { ret := _m.Called(topic) + if len(ret) == 0 { + panic("no return value specified for ListPeers") + } + var r0 []peer.ID if rf, ok := ret.Get(0).(func(string) []peer.ID); ok { r0 = rf(topic) @@ -45,13 +53,12 @@ func (_m *TopicProvider) ListPeers(topic string) []peer.ID { return r0 } -type mockConstructorTestingTNewTopicProvider interface { +// NewTopicProvider creates a new instance of TopicProvider. 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 NewTopicProvider(t interface { mock.TestingT Cleanup(func()) -} - -// NewTopicProvider creates a new instance of TopicProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTopicProvider(t mockConstructorTestingTNewTopicProvider) *TopicProvider { +}) *TopicProvider { mock := &TopicProvider{} mock.Mock.Test(t) diff --git a/network/p2p/mock/topic_validator_func.go b/network/p2p/mock/topic_validator_func.go index b059355db8a..f028fc6c070 100644 --- a/network/p2p/mock/topic_validator_func.go +++ b/network/p2p/mock/topic_validator_func.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -22,6 +22,10 @@ type TopicValidatorFunc struct { func (_m *TopicValidatorFunc) Execute(_a0 context.Context, _a1 peer.ID, _a2 *pubsub.Message) p2p.ValidationResult { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.ValidationResult if rf, ok := ret.Get(0).(func(context.Context, peer.ID, *pubsub.Message) p2p.ValidationResult); ok { r0 = rf(_a0, _a1, _a2) @@ -32,13 +36,12 @@ func (_m *TopicValidatorFunc) Execute(_a0 context.Context, _a1 peer.ID, _a2 *pub return r0 } -type mockConstructorTestingTNewTopicValidatorFunc interface { +// NewTopicValidatorFunc creates a new instance of TopicValidatorFunc. 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 NewTopicValidatorFunc(t interface { mock.TestingT Cleanup(func()) -} - -// NewTopicValidatorFunc creates a new instance of TopicValidatorFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTopicValidatorFunc(t mockConstructorTestingTNewTopicValidatorFunc) *TopicValidatorFunc { +}) *TopicValidatorFunc { mock := &TopicValidatorFunc{} mock.Mock.Test(t) diff --git a/network/p2p/mock/unicast_management.go b/network/p2p/mock/unicast_management.go index 96bb43bfd60..abce64373a1 100644 --- a/network/p2p/mock/unicast_management.go +++ b/network/p2p/mock/unicast_management.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -22,6 +22,10 @@ type UnicastManagement struct { func (_m *UnicastManagement) OpenAndWriteOnStream(ctx context.Context, peerID peer.ID, protectionTag string, writingLogic func(network.Stream) error) error { ret := _m.Called(ctx, peerID, protectionTag, writingLogic) + if len(ret) == 0 { + panic("no return value specified for OpenAndWriteOnStream") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, peer.ID, string, func(network.Stream) error) error); ok { r0 = rf(ctx, peerID, protectionTag, writingLogic) @@ -36,6 +40,10 @@ func (_m *UnicastManagement) OpenAndWriteOnStream(ctx context.Context, peerID pe func (_m *UnicastManagement) WithDefaultUnicastProtocol(defaultHandler network.StreamHandler, preferred []protocols.ProtocolName) error { ret := _m.Called(defaultHandler, preferred) + if len(ret) == 0 { + panic("no return value specified for WithDefaultUnicastProtocol") + } + var r0 error if rf, ok := ret.Get(0).(func(network.StreamHandler, []protocols.ProtocolName) error); ok { r0 = rf(defaultHandler, preferred) @@ -46,13 +54,12 @@ func (_m *UnicastManagement) WithDefaultUnicastProtocol(defaultHandler network.S return r0 } -type mockConstructorTestingTNewUnicastManagement interface { +// NewUnicastManagement creates a new instance of UnicastManagement. 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 NewUnicastManagement(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnicastManagement creates a new instance of UnicastManagement. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnicastManagement(t mockConstructorTestingTNewUnicastManagement) *UnicastManagement { +}) *UnicastManagement { mock := &UnicastManagement{} mock.Mock.Test(t) diff --git a/network/p2p/mock/unicast_manager.go b/network/p2p/mock/unicast_manager.go index 622552ce2d9..7ed796e3168 100644 --- a/network/p2p/mock/unicast_manager.go +++ b/network/p2p/mock/unicast_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -22,6 +22,10 @@ type UnicastManager struct { func (_m *UnicastManager) CreateStream(ctx context.Context, peerID peer.ID) (network.Stream, error) { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for CreateStream") + } + var r0 network.Stream var r1 error if rf, ok := ret.Get(0).(func(context.Context, peer.ID) (network.Stream, error)); ok { @@ -48,6 +52,10 @@ func (_m *UnicastManager) CreateStream(ctx context.Context, peerID peer.ID) (net func (_m *UnicastManager) Register(unicast protocols.ProtocolName) error { ret := _m.Called(unicast) + if len(ret) == 0 { + panic("no return value specified for Register") + } + var r0 error if rf, ok := ret.Get(0).(func(protocols.ProtocolName) error); ok { r0 = rf(unicast) @@ -63,13 +71,12 @@ func (_m *UnicastManager) SetDefaultHandler(defaultHandler network.StreamHandler _m.Called(defaultHandler) } -type mockConstructorTestingTNewUnicastManager interface { +// NewUnicastManager creates a new instance of UnicastManager. 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 NewUnicastManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnicastManager creates a new instance of UnicastManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnicastManager(t mockConstructorTestingTNewUnicastManager) *UnicastManager { +}) *UnicastManager { mock := &UnicastManager{} mock.Mock.Test(t) diff --git a/network/p2p/mock/unicast_rate_limiter_distributor.go b/network/p2p/mock/unicast_rate_limiter_distributor.go index 0bdceb2b72d..a27d4f749c6 100644 --- a/network/p2p/mock/unicast_rate_limiter_distributor.go +++ b/network/p2p/mock/unicast_rate_limiter_distributor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -24,13 +24,12 @@ func (_m *UnicastRateLimiterDistributor) OnRateLimitedPeer(pid peer.ID, role str _m.Called(pid, role, msgType, topic, reason) } -type mockConstructorTestingTNewUnicastRateLimiterDistributor interface { +// NewUnicastRateLimiterDistributor creates a new instance of UnicastRateLimiterDistributor. 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 NewUnicastRateLimiterDistributor(t interface { mock.TestingT Cleanup(func()) -} - -// NewUnicastRateLimiterDistributor creates a new instance of UnicastRateLimiterDistributor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUnicastRateLimiterDistributor(t mockConstructorTestingTNewUnicastRateLimiterDistributor) *UnicastRateLimiterDistributor { +}) *UnicastRateLimiterDistributor { mock := &UnicastRateLimiterDistributor{} mock.Mock.Test(t) diff --git a/network/p2p/mock/update_function.go b/network/p2p/mock/update_function.go index 1b1b98ed66b..fd7ac9ae11e 100644 --- a/network/p2p/mock/update_function.go +++ b/network/p2p/mock/update_function.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mockp2p @@ -16,6 +16,10 @@ type UpdateFunction struct { func (_m *UpdateFunction) Execute(record p2p.GossipSubSpamRecord) p2p.GossipSubSpamRecord { ret := _m.Called(record) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 p2p.GossipSubSpamRecord if rf, ok := ret.Get(0).(func(p2p.GossipSubSpamRecord) p2p.GossipSubSpamRecord); ok { r0 = rf(record) @@ -26,13 +30,12 @@ func (_m *UpdateFunction) Execute(record p2p.GossipSubSpamRecord) p2p.GossipSubS return r0 } -type mockConstructorTestingTNewUpdateFunction interface { +// NewUpdateFunction creates a new instance of UpdateFunction. 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 NewUpdateFunction(t interface { mock.TestingT Cleanup(func()) -} - -// NewUpdateFunction creates a new instance of UpdateFunction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewUpdateFunction(t mockConstructorTestingTNewUpdateFunction) *UpdateFunction { +}) *UpdateFunction { mock := &UpdateFunction{} mock.Mock.Test(t) diff --git a/state/cluster/mock/mutable_state.go b/state/cluster/mock/mutable_state.go index 372fdc7503b..cb2c7c9201f 100644 --- a/state/cluster/mock/mutable_state.go +++ b/state/cluster/mock/mutable_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type MutableState struct { func (_m *MutableState) AtBlockID(blockID flow.Identifier) cluster.Snapshot { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for AtBlockID") + } + var r0 cluster.Snapshot if rf, ok := ret.Get(0).(func(flow.Identifier) cluster.Snapshot); ok { r0 = rf(blockID) @@ -36,6 +40,10 @@ func (_m *MutableState) AtBlockID(blockID flow.Identifier) cluster.Snapshot { func (_m *MutableState) Extend(candidate *modelcluster.Block) error { ret := _m.Called(candidate) + if len(ret) == 0 { + panic("no return value specified for Extend") + } + var r0 error if rf, ok := ret.Get(0).(func(*modelcluster.Block) error); ok { r0 = rf(candidate) @@ -50,6 +58,10 @@ func (_m *MutableState) Extend(candidate *modelcluster.Block) error { func (_m *MutableState) Final() cluster.Snapshot { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Final") + } + var r0 cluster.Snapshot if rf, ok := ret.Get(0).(func() cluster.Snapshot); ok { r0 = rf() @@ -66,6 +78,10 @@ func (_m *MutableState) Final() cluster.Snapshot { func (_m *MutableState) Params() cluster.Params { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 cluster.Params if rf, ok := ret.Get(0).(func() cluster.Params); ok { r0 = rf() @@ -78,13 +94,12 @@ func (_m *MutableState) Params() cluster.Params { return r0 } -type mockConstructorTestingTNewMutableState interface { +// NewMutableState creates a new instance of MutableState. 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 NewMutableState(t interface { mock.TestingT Cleanup(func()) -} - -// NewMutableState creates a new instance of MutableState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMutableState(t mockConstructorTestingTNewMutableState) *MutableState { +}) *MutableState { mock := &MutableState{} mock.Mock.Test(t) diff --git a/state/cluster/mock/params.go b/state/cluster/mock/params.go index 0c7bd9a7833..a90c868626b 100644 --- a/state/cluster/mock/params.go +++ b/state/cluster/mock/params.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Params struct { func (_m *Params) ChainID() flow.ChainID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChainID") + } + var r0 flow.ChainID if rf, ok := ret.Get(0).(func() flow.ChainID); ok { r0 = rf() @@ -26,13 +30,12 @@ func (_m *Params) ChainID() flow.ChainID { return r0 } -type mockConstructorTestingTNewParams interface { +// NewParams creates a new instance of Params. 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 NewParams(t interface { mock.TestingT Cleanup(func()) -} - -// NewParams creates a new instance of Params. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewParams(t mockConstructorTestingTNewParams) *Params { +}) *Params { mock := &Params{} mock.Mock.Test(t) diff --git a/state/cluster/mock/snapshot.go b/state/cluster/mock/snapshot.go index 21507885fb7..3e11d0db6c6 100644 --- a/state/cluster/mock/snapshot.go +++ b/state/cluster/mock/snapshot.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Snapshot struct { func (_m *Snapshot) Collection() (*flow.Collection, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Collection") + } + var r0 *flow.Collection var r1 error if rf, ok := ret.Get(0).(func() (*flow.Collection, error)); ok { @@ -42,6 +46,10 @@ func (_m *Snapshot) Collection() (*flow.Collection, error) { func (_m *Snapshot) Head() (*flow.Header, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Head") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func() (*flow.Header, error)); ok { @@ -68,6 +76,10 @@ func (_m *Snapshot) Head() (*flow.Header, error) { func (_m *Snapshot) Pending() ([]flow.Identifier, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Pending") + } + var r0 []flow.Identifier var r1 error if rf, ok := ret.Get(0).(func() ([]flow.Identifier, error)); ok { @@ -90,13 +102,12 @@ func (_m *Snapshot) Pending() ([]flow.Identifier, error) { return r0, r1 } -type mockConstructorTestingTNewSnapshot interface { +// NewSnapshot creates a new instance of Snapshot. 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 NewSnapshot(t interface { mock.TestingT Cleanup(func()) -} - -// NewSnapshot creates a new instance of Snapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSnapshot(t mockConstructorTestingTNewSnapshot) *Snapshot { +}) *Snapshot { mock := &Snapshot{} mock.Mock.Test(t) diff --git a/state/cluster/mock/state.go b/state/cluster/mock/state.go index 35089d555f6..8b5de3ed373 100644 --- a/state/cluster/mock/state.go +++ b/state/cluster/mock/state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type State struct { func (_m *State) AtBlockID(blockID flow.Identifier) cluster.Snapshot { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for AtBlockID") + } + var r0 cluster.Snapshot if rf, ok := ret.Get(0).(func(flow.Identifier) cluster.Snapshot); ok { r0 = rf(blockID) @@ -34,6 +38,10 @@ func (_m *State) AtBlockID(blockID flow.Identifier) cluster.Snapshot { func (_m *State) Final() cluster.Snapshot { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Final") + } + var r0 cluster.Snapshot if rf, ok := ret.Get(0).(func() cluster.Snapshot); ok { r0 = rf() @@ -50,6 +58,10 @@ func (_m *State) Final() cluster.Snapshot { func (_m *State) Params() cluster.Params { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 cluster.Params if rf, ok := ret.Get(0).(func() cluster.Params); ok { r0 = rf() @@ -62,13 +74,12 @@ func (_m *State) Params() cluster.Params { return r0 } -type mockConstructorTestingTNewState interface { +// NewState creates a new instance of State. 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 NewState(t interface { mock.TestingT Cleanup(func()) -} - -// NewState creates a new instance of State. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewState(t mockConstructorTestingTNewState) *State { +}) *State { mock := &State{} mock.Mock.Test(t) diff --git a/state/protocol/events/mock/heights.go b/state/protocol/events/mock/heights.go index 677edc94ba3..a0f7ea3a789 100644 --- a/state/protocol/events/mock/heights.go +++ b/state/protocol/events/mock/heights.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -14,13 +14,12 @@ func (_m *Heights) OnHeight(height uint64, callback func()) { _m.Called(height, callback) } -type mockConstructorTestingTNewHeights interface { +// NewHeights creates a new instance of Heights. 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 NewHeights(t interface { mock.TestingT Cleanup(func()) -} - -// NewHeights creates a new instance of Heights. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHeights(t mockConstructorTestingTNewHeights) *Heights { +}) *Heights { mock := &Heights{} mock.Mock.Test(t) diff --git a/state/protocol/events/mock/on_view_callback.go b/state/protocol/events/mock/on_view_callback.go index 3e413a3c3f3..0a213252515 100644 --- a/state/protocol/events/mock/on_view_callback.go +++ b/state/protocol/events/mock/on_view_callback.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,13 +17,12 @@ func (_m *OnViewCallback) Execute(_a0 *flow.Header) { _m.Called(_a0) } -type mockConstructorTestingTNewOnViewCallback interface { +// NewOnViewCallback creates a new instance of OnViewCallback. 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 NewOnViewCallback(t interface { mock.TestingT Cleanup(func()) -} - -// NewOnViewCallback creates a new instance of OnViewCallback. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOnViewCallback(t mockConstructorTestingTNewOnViewCallback) *OnViewCallback { +}) *OnViewCallback { mock := &OnViewCallback{} mock.Mock.Test(t) diff --git a/state/protocol/events/mock/views.go b/state/protocol/events/mock/views.go index 8466c05a351..edc0e7297bb 100644 --- a/state/protocol/events/mock/views.go +++ b/state/protocol/events/mock/views.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,13 +17,12 @@ func (_m *Views) OnView(view uint64, callback events.OnViewCallback) { _m.Called(view, callback) } -type mockConstructorTestingTNewViews interface { +// NewViews creates a new instance of Views. 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 NewViews(t interface { mock.TestingT Cleanup(func()) -} - -// NewViews creates a new instance of Views. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewViews(t mockConstructorTestingTNewViews) *Views { +}) *Views { mock := &Views{} mock.Mock.Test(t) diff --git a/state/protocol/mock/block_timer.go b/state/protocol/mock/block_timer.go index 5baa7aa0ed8..4c110cec981 100644 --- a/state/protocol/mock/block_timer.go +++ b/state/protocol/mock/block_timer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -17,6 +17,10 @@ type BlockTimer struct { func (_m *BlockTimer) Build(parentTimestamp time.Time) time.Time { ret := _m.Called(parentTimestamp) + if len(ret) == 0 { + panic("no return value specified for Build") + } + var r0 time.Time if rf, ok := ret.Get(0).(func(time.Time) time.Time); ok { r0 = rf(parentTimestamp) @@ -31,6 +35,10 @@ func (_m *BlockTimer) Build(parentTimestamp time.Time) time.Time { func (_m *BlockTimer) Validate(parentTimestamp time.Time, currentTimestamp time.Time) error { ret := _m.Called(parentTimestamp, currentTimestamp) + if len(ret) == 0 { + panic("no return value specified for Validate") + } + var r0 error if rf, ok := ret.Get(0).(func(time.Time, time.Time) error); ok { r0 = rf(parentTimestamp, currentTimestamp) @@ -41,13 +49,12 @@ func (_m *BlockTimer) Validate(parentTimestamp time.Time, currentTimestamp time. return r0 } -type mockConstructorTestingTNewBlockTimer interface { +// NewBlockTimer creates a new instance of BlockTimer. 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 NewBlockTimer(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlockTimer creates a new instance of BlockTimer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlockTimer(t mockConstructorTestingTNewBlockTimer) *BlockTimer { +}) *BlockTimer { mock := &BlockTimer{} mock.Mock.Test(t) diff --git a/state/protocol/mock/cluster.go b/state/protocol/mock/cluster.go index 00c6080c76e..6eeb26364ad 100644 --- a/state/protocol/mock/cluster.go +++ b/state/protocol/mock/cluster.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type Cluster struct { func (_m *Cluster) ChainID() flow.ChainID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChainID") + } + var r0 flow.ChainID if rf, ok := ret.Get(0).(func() flow.ChainID); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Cluster) ChainID() flow.ChainID { func (_m *Cluster) EpochCounter() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochCounter") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -46,6 +54,10 @@ func (_m *Cluster) EpochCounter() uint64 { func (_m *Cluster) Index() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Index") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -60,6 +72,10 @@ func (_m *Cluster) Index() uint { func (_m *Cluster) Members() flow.GenericIdentityList[flow.IdentitySkeleton] { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Members") + } + var r0 flow.GenericIdentityList[flow.IdentitySkeleton] if rf, ok := ret.Get(0).(func() flow.GenericIdentityList[flow.IdentitySkeleton]); ok { r0 = rf() @@ -76,6 +92,10 @@ func (_m *Cluster) Members() flow.GenericIdentityList[flow.IdentitySkeleton] { func (_m *Cluster) RootBlock() *cluster.Block { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RootBlock") + } + var r0 *cluster.Block if rf, ok := ret.Get(0).(func() *cluster.Block); ok { r0 = rf() @@ -92,6 +112,10 @@ func (_m *Cluster) RootBlock() *cluster.Block { func (_m *Cluster) RootQC() *flow.QuorumCertificate { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RootQC") + } + var r0 *flow.QuorumCertificate if rf, ok := ret.Get(0).(func() *flow.QuorumCertificate); ok { r0 = rf() @@ -104,13 +128,12 @@ func (_m *Cluster) RootQC() *flow.QuorumCertificate { return r0 } -type mockConstructorTestingTNewCluster interface { +// NewCluster creates a new instance of Cluster. 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 NewCluster(t interface { mock.TestingT Cleanup(func()) -} - -// NewCluster creates a new instance of Cluster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCluster(t mockConstructorTestingTNewCluster) *Cluster { +}) *Cluster { mock := &Cluster{} mock.Mock.Test(t) diff --git a/state/protocol/mock/consumer.go b/state/protocol/mock/consumer.go index a7ddcc6f3ed..749e767de16 100644 --- a/state/protocol/mock/consumer.go +++ b/state/protocol/mock/consumer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -42,13 +42,12 @@ func (_m *Consumer) EpochTransition(newEpochCounter uint64, first *flow.Header) _m.Called(newEpochCounter, first) } -type mockConstructorTestingTNewConsumer interface { +// NewConsumer creates a new instance of Consumer. 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 NewConsumer(t interface { mock.TestingT Cleanup(func()) -} - -// NewConsumer creates a new instance of Consumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConsumer(t mockConstructorTestingTNewConsumer) *Consumer { +}) *Consumer { mock := &Consumer{} mock.Mock.Test(t) diff --git a/state/protocol/mock/dkg.go b/state/protocol/mock/dkg.go index 86e13439dda..ae7648c255e 100644 --- a/state/protocol/mock/dkg.go +++ b/state/protocol/mock/dkg.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type DKG struct { func (_m *DKG) GroupKey() crypto.PublicKey { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GroupKey") + } + var r0 crypto.PublicKey if rf, ok := ret.Get(0).(func() crypto.PublicKey); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *DKG) GroupKey() crypto.PublicKey { func (_m *DKG) Index(nodeID flow.Identifier) (uint, error) { ret := _m.Called(nodeID) + if len(ret) == 0 { + panic("no return value specified for Index") + } + var r0 uint var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (uint, error)); ok { @@ -58,6 +66,10 @@ func (_m *DKG) Index(nodeID flow.Identifier) (uint, error) { func (_m *DKG) KeyShare(nodeID flow.Identifier) (crypto.PublicKey, error) { ret := _m.Called(nodeID) + if len(ret) == 0 { + panic("no return value specified for KeyShare") + } + var r0 crypto.PublicKey var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (crypto.PublicKey, error)); ok { @@ -84,6 +96,10 @@ func (_m *DKG) KeyShare(nodeID flow.Identifier) (crypto.PublicKey, error) { func (_m *DKG) Size() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -94,13 +110,12 @@ func (_m *DKG) Size() uint { return r0 } -type mockConstructorTestingTNewDKG interface { +// NewDKG creates a new instance of DKG. 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 NewDKG(t interface { mock.TestingT Cleanup(func()) -} - -// NewDKG creates a new instance of DKG. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDKG(t mockConstructorTestingTNewDKG) *DKG { +}) *DKG { mock := &DKG{} mock.Mock.Test(t) diff --git a/state/protocol/mock/epoch.go b/state/protocol/mock/epoch.go index e7ff13b19e4..14b79232dff 100644 --- a/state/protocol/mock/epoch.go +++ b/state/protocol/mock/epoch.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type Epoch struct { func (_m *Epoch) Cluster(index uint) (protocol.Cluster, error) { ret := _m.Called(index) + if len(ret) == 0 { + panic("no return value specified for Cluster") + } + var r0 protocol.Cluster var r1 error if rf, ok := ret.Get(0).(func(uint) (protocol.Cluster, error)); ok { @@ -44,6 +48,10 @@ func (_m *Epoch) Cluster(index uint) (protocol.Cluster, error) { func (_m *Epoch) ClusterByChainID(chainID flow.ChainID) (protocol.Cluster, error) { ret := _m.Called(chainID) + if len(ret) == 0 { + panic("no return value specified for ClusterByChainID") + } + var r0 protocol.Cluster var r1 error if rf, ok := ret.Get(0).(func(flow.ChainID) (protocol.Cluster, error)); ok { @@ -70,6 +78,10 @@ func (_m *Epoch) ClusterByChainID(chainID flow.ChainID) (protocol.Cluster, error func (_m *Epoch) Clustering() (flow.ClusterList, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Clustering") + } + var r0 flow.ClusterList var r1 error if rf, ok := ret.Get(0).(func() (flow.ClusterList, error)); ok { @@ -96,6 +108,10 @@ func (_m *Epoch) Clustering() (flow.ClusterList, error) { func (_m *Epoch) Counter() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Counter") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -120,6 +136,10 @@ func (_m *Epoch) Counter() (uint64, error) { func (_m *Epoch) DKG() (protocol.DKG, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DKG") + } + var r0 protocol.DKG var r1 error if rf, ok := ret.Get(0).(func() (protocol.DKG, error)); ok { @@ -146,6 +166,10 @@ func (_m *Epoch) DKG() (protocol.DKG, error) { func (_m *Epoch) DKGPhase1FinalView() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DKGPhase1FinalView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -170,6 +194,10 @@ func (_m *Epoch) DKGPhase1FinalView() (uint64, error) { func (_m *Epoch) DKGPhase2FinalView() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DKGPhase2FinalView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -194,6 +222,10 @@ func (_m *Epoch) DKGPhase2FinalView() (uint64, error) { func (_m *Epoch) DKGPhase3FinalView() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DKGPhase3FinalView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -218,6 +250,10 @@ func (_m *Epoch) DKGPhase3FinalView() (uint64, error) { func (_m *Epoch) FinalHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FinalHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -242,6 +278,10 @@ func (_m *Epoch) FinalHeight() (uint64, error) { func (_m *Epoch) FinalView() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FinalView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -266,6 +306,10 @@ func (_m *Epoch) FinalView() (uint64, error) { func (_m *Epoch) FirstHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FirstHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -290,6 +334,10 @@ func (_m *Epoch) FirstHeight() (uint64, error) { func (_m *Epoch) FirstView() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FirstView") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -314,6 +362,10 @@ func (_m *Epoch) FirstView() (uint64, error) { func (_m *Epoch) InitialIdentities() (flow.GenericIdentityList[flow.IdentitySkeleton], error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InitialIdentities") + } + var r0 flow.GenericIdentityList[flow.IdentitySkeleton] var r1 error if rf, ok := ret.Get(0).(func() (flow.GenericIdentityList[flow.IdentitySkeleton], error)); ok { @@ -340,6 +392,10 @@ func (_m *Epoch) InitialIdentities() (flow.GenericIdentityList[flow.IdentitySkel func (_m *Epoch) RandomSource() ([]byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RandomSource") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { @@ -366,6 +422,10 @@ func (_m *Epoch) RandomSource() ([]byte, error) { func (_m *Epoch) TargetDuration() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TargetDuration") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -390,6 +450,10 @@ func (_m *Epoch) TargetDuration() (uint64, error) { func (_m *Epoch) TargetEndTime() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TargetEndTime") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -410,13 +474,12 @@ func (_m *Epoch) TargetEndTime() (uint64, error) { return r0, r1 } -type mockConstructorTestingTNewEpoch interface { +// NewEpoch creates a new instance of Epoch. 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 NewEpoch(t interface { mock.TestingT Cleanup(func()) -} - -// NewEpoch creates a new instance of Epoch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEpoch(t mockConstructorTestingTNewEpoch) *Epoch { +}) *Epoch { mock := &Epoch{} mock.Mock.Test(t) diff --git a/state/protocol/mock/epoch_protocol_state.go b/state/protocol/mock/epoch_protocol_state.go index bffa1c26b76..2ad2840d111 100644 --- a/state/protocol/mock/epoch_protocol_state.go +++ b/state/protocol/mock/epoch_protocol_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type EpochProtocolState struct { func (_m *EpochProtocolState) Clustering() (flow.ClusterList, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Clustering") + } + var r0 flow.ClusterList var r1 error if rf, ok := ret.Get(0).(func() (flow.ClusterList, error)); ok { @@ -44,6 +48,10 @@ func (_m *EpochProtocolState) Clustering() (flow.ClusterList, error) { func (_m *EpochProtocolState) DKG() (protocol.DKG, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DKG") + } + var r0 protocol.DKG var r1 error if rf, ok := ret.Get(0).(func() (protocol.DKG, error)); ok { @@ -70,6 +78,10 @@ func (_m *EpochProtocolState) DKG() (protocol.DKG, error) { func (_m *EpochProtocolState) Entry() *flow.RichEpochProtocolStateEntry { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Entry") + } + var r0 *flow.RichEpochProtocolStateEntry if rf, ok := ret.Get(0).(func() *flow.RichEpochProtocolStateEntry); ok { r0 = rf() @@ -86,6 +98,10 @@ func (_m *EpochProtocolState) Entry() *flow.RichEpochProtocolStateEntry { func (_m *EpochProtocolState) Epoch() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Epoch") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -100,6 +116,10 @@ func (_m *EpochProtocolState) Epoch() uint64 { func (_m *EpochProtocolState) EpochCommit() *flow.EpochCommit { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochCommit") + } + var r0 *flow.EpochCommit if rf, ok := ret.Get(0).(func() *flow.EpochCommit); ok { r0 = rf() @@ -116,6 +136,10 @@ func (_m *EpochProtocolState) EpochCommit() *flow.EpochCommit { func (_m *EpochProtocolState) EpochPhase() flow.EpochPhase { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochPhase") + } + var r0 flow.EpochPhase if rf, ok := ret.Get(0).(func() flow.EpochPhase); ok { r0 = rf() @@ -130,6 +154,10 @@ func (_m *EpochProtocolState) EpochPhase() flow.EpochPhase { func (_m *EpochProtocolState) EpochSetup() *flow.EpochSetup { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochSetup") + } + var r0 *flow.EpochSetup if rf, ok := ret.Get(0).(func() *flow.EpochSetup); ok { r0 = rf() @@ -146,6 +174,10 @@ func (_m *EpochProtocolState) EpochSetup() *flow.EpochSetup { func (_m *EpochProtocolState) GlobalParams() protocol.GlobalParams { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GlobalParams") + } + var r0 protocol.GlobalParams if rf, ok := ret.Get(0).(func() protocol.GlobalParams); ok { r0 = rf() @@ -162,6 +194,10 @@ func (_m *EpochProtocolState) GlobalParams() protocol.GlobalParams { func (_m *EpochProtocolState) Identities() flow.GenericIdentityList[flow.Identity] { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Identities") + } + var r0 flow.GenericIdentityList[flow.Identity] if rf, ok := ret.Get(0).(func() flow.GenericIdentityList[flow.Identity]); ok { r0 = rf() @@ -178,6 +214,10 @@ func (_m *EpochProtocolState) Identities() flow.GenericIdentityList[flow.Identit func (_m *EpochProtocolState) InvalidEpochTransitionAttempted() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for InvalidEpochTransitionAttempted") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -192,6 +232,10 @@ func (_m *EpochProtocolState) InvalidEpochTransitionAttempted() bool { func (_m *EpochProtocolState) PreviousEpochExists() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PreviousEpochExists") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -202,13 +246,12 @@ func (_m *EpochProtocolState) PreviousEpochExists() bool { return r0 } -type mockConstructorTestingTNewEpochProtocolState interface { +// NewEpochProtocolState creates a new instance of EpochProtocolState. 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 NewEpochProtocolState(t interface { mock.TestingT Cleanup(func()) -} - -// NewEpochProtocolState creates a new instance of EpochProtocolState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEpochProtocolState(t mockConstructorTestingTNewEpochProtocolState) *EpochProtocolState { +}) *EpochProtocolState { mock := &EpochProtocolState{} mock.Mock.Test(t) diff --git a/state/protocol/mock/epoch_query.go b/state/protocol/mock/epoch_query.go index cb91773a108..51c0458ff92 100644 --- a/state/protocol/mock/epoch_query.go +++ b/state/protocol/mock/epoch_query.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type EpochQuery struct { func (_m *EpochQuery) Current() protocol.Epoch { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Current") + } + var r0 protocol.Epoch if rf, ok := ret.Get(0).(func() protocol.Epoch); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *EpochQuery) Current() protocol.Epoch { func (_m *EpochQuery) Next() protocol.Epoch { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Next") + } + var r0 protocol.Epoch if rf, ok := ret.Get(0).(func() protocol.Epoch); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *EpochQuery) Next() protocol.Epoch { func (_m *EpochQuery) Previous() protocol.Epoch { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Previous") + } + var r0 protocol.Epoch if rf, ok := ret.Get(0).(func() protocol.Epoch); ok { r0 = rf() @@ -60,13 +72,12 @@ func (_m *EpochQuery) Previous() protocol.Epoch { return r0 } -type mockConstructorTestingTNewEpochQuery interface { +// NewEpochQuery creates a new instance of EpochQuery. 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 NewEpochQuery(t interface { mock.TestingT Cleanup(func()) -} - -// NewEpochQuery creates a new instance of EpochQuery. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEpochQuery(t mockConstructorTestingTNewEpochQuery) *EpochQuery { +}) *EpochQuery { mock := &EpochQuery{} mock.Mock.Test(t) diff --git a/state/protocol/mock/follower_state.go b/state/protocol/mock/follower_state.go index eaedf9029c0..cfb7b6bf8f6 100644 --- a/state/protocol/mock/follower_state.go +++ b/state/protocol/mock/follower_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type FollowerState struct { func (_m *FollowerState) AtBlockID(blockID flow.Identifier) protocol.Snapshot { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for AtBlockID") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func(flow.Identifier) protocol.Snapshot); ok { r0 = rf(blockID) @@ -36,6 +40,10 @@ func (_m *FollowerState) AtBlockID(blockID flow.Identifier) protocol.Snapshot { func (_m *FollowerState) AtHeight(height uint64) protocol.Snapshot { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for AtHeight") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func(uint64) protocol.Snapshot); ok { r0 = rf(height) @@ -52,6 +60,10 @@ func (_m *FollowerState) AtHeight(height uint64) protocol.Snapshot { func (_m *FollowerState) ExtendCertified(ctx context.Context, candidate *flow.Block, qc *flow.QuorumCertificate) error { ret := _m.Called(ctx, candidate, qc) + if len(ret) == 0 { + panic("no return value specified for ExtendCertified") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *flow.Block, *flow.QuorumCertificate) error); ok { r0 = rf(ctx, candidate, qc) @@ -66,6 +78,10 @@ func (_m *FollowerState) ExtendCertified(ctx context.Context, candidate *flow.Bl func (_m *FollowerState) Final() protocol.Snapshot { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Final") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok { r0 = rf() @@ -82,6 +98,10 @@ func (_m *FollowerState) Final() protocol.Snapshot { func (_m *FollowerState) Finalize(ctx context.Context, blockID flow.Identifier) error { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for Finalize") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) error); ok { r0 = rf(ctx, blockID) @@ -96,6 +116,10 @@ func (_m *FollowerState) Finalize(ctx context.Context, blockID flow.Identifier) func (_m *FollowerState) Params() protocol.Params { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 protocol.Params if rf, ok := ret.Get(0).(func() protocol.Params); ok { r0 = rf() @@ -112,6 +136,10 @@ func (_m *FollowerState) Params() protocol.Params { func (_m *FollowerState) Sealed() protocol.Snapshot { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Sealed") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok { r0 = rf() @@ -124,13 +152,12 @@ func (_m *FollowerState) Sealed() protocol.Snapshot { return r0 } -type mockConstructorTestingTNewFollowerState interface { +// NewFollowerState creates a new instance of FollowerState. 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 NewFollowerState(t interface { mock.TestingT Cleanup(func()) -} - -// NewFollowerState creates a new instance of FollowerState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFollowerState(t mockConstructorTestingTNewFollowerState) *FollowerState { +}) *FollowerState { mock := &FollowerState{} mock.Mock.Test(t) diff --git a/state/protocol/mock/global_params.go b/state/protocol/mock/global_params.go index d5aa2f2472b..d164411b709 100644 --- a/state/protocol/mock/global_params.go +++ b/state/protocol/mock/global_params.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type GlobalParams struct { func (_m *GlobalParams) ChainID() flow.ChainID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChainID") + } + var r0 flow.ChainID if rf, ok := ret.Get(0).(func() flow.ChainID); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *GlobalParams) ChainID() flow.ChainID { func (_m *GlobalParams) EpochCommitSafetyThreshold() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochCommitSafetyThreshold") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -44,6 +52,10 @@ func (_m *GlobalParams) EpochCommitSafetyThreshold() uint64 { func (_m *GlobalParams) ProtocolVersion() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ProtocolVersion") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -58,6 +70,10 @@ func (_m *GlobalParams) ProtocolVersion() uint { func (_m *GlobalParams) SporkID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SporkID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -74,6 +90,10 @@ func (_m *GlobalParams) SporkID() flow.Identifier { func (_m *GlobalParams) SporkRootBlockHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SporkRootBlockHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -84,13 +104,12 @@ func (_m *GlobalParams) SporkRootBlockHeight() uint64 { return r0 } -type mockConstructorTestingTNewGlobalParams interface { +// NewGlobalParams creates a new instance of GlobalParams. 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 NewGlobalParams(t interface { mock.TestingT Cleanup(func()) -} - -// NewGlobalParams creates a new instance of GlobalParams. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGlobalParams(t mockConstructorTestingTNewGlobalParams) *GlobalParams { +}) *GlobalParams { mock := &GlobalParams{} mock.Mock.Test(t) diff --git a/state/protocol/mock/instance_params.go b/state/protocol/mock/instance_params.go index d7ea446260e..0ca3db5c8c9 100644 --- a/state/protocol/mock/instance_params.go +++ b/state/protocol/mock/instance_params.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type InstanceParams struct { func (_m *InstanceParams) EpochFallbackTriggered() (bool, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochFallbackTriggered") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func() (bool, error)); ok { @@ -40,6 +44,10 @@ func (_m *InstanceParams) EpochFallbackTriggered() (bool, error) { func (_m *InstanceParams) FinalizedRoot() *flow.Header { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FinalizedRoot") + } + var r0 *flow.Header if rf, ok := ret.Get(0).(func() *flow.Header); ok { r0 = rf() @@ -56,6 +64,10 @@ func (_m *InstanceParams) FinalizedRoot() *flow.Header { func (_m *InstanceParams) Seal() *flow.Seal { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Seal") + } + var r0 *flow.Seal if rf, ok := ret.Get(0).(func() *flow.Seal); ok { r0 = rf() @@ -72,6 +84,10 @@ func (_m *InstanceParams) Seal() *flow.Seal { func (_m *InstanceParams) SealedRoot() *flow.Header { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SealedRoot") + } + var r0 *flow.Header if rf, ok := ret.Get(0).(func() *flow.Header); ok { r0 = rf() @@ -84,13 +100,12 @@ func (_m *InstanceParams) SealedRoot() *flow.Header { return r0 } -type mockConstructorTestingTNewInstanceParams interface { +// NewInstanceParams creates a new instance of InstanceParams. 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 NewInstanceParams(t interface { mock.TestingT Cleanup(func()) -} - -// NewInstanceParams creates a new instance of InstanceParams. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewInstanceParams(t mockConstructorTestingTNewInstanceParams) *InstanceParams { +}) *InstanceParams { mock := &InstanceParams{} mock.Mock.Test(t) diff --git a/state/protocol/mock/kv_store_reader.go b/state/protocol/mock/kv_store_reader.go index 69d5b3e3a1e..cc07862d3f5 100644 --- a/state/protocol/mock/kv_store_reader.go +++ b/state/protocol/mock/kv_store_reader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type KVStoreReader struct { func (_m *KVStoreReader) GetEpochStateID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetEpochStateID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *KVStoreReader) GetEpochStateID() flow.Identifier { func (_m *KVStoreReader) GetProtocolStateVersion() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateVersion") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *KVStoreReader) GetProtocolStateVersion() uint64 { func (_m *KVStoreReader) GetVersionUpgrade() *protocol.ViewBasedActivator[uint64] { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetVersionUpgrade") + } + var r0 *protocol.ViewBasedActivator[uint64] if rf, ok := ret.Get(0).(func() *protocol.ViewBasedActivator[uint64]); ok { r0 = rf() @@ -64,6 +76,10 @@ func (_m *KVStoreReader) GetVersionUpgrade() *protocol.ViewBasedActivator[uint64 func (_m *KVStoreReader) ID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -80,6 +96,10 @@ func (_m *KVStoreReader) ID() flow.Identifier { func (_m *KVStoreReader) VersionedEncode() (uint64, []byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VersionedEncode") + } + var r0 uint64 var r1 []byte var r2 error @@ -109,13 +129,12 @@ func (_m *KVStoreReader) VersionedEncode() (uint64, []byte, error) { return r0, r1, r2 } -type mockConstructorTestingTNewKVStoreReader interface { +// NewKVStoreReader creates a new instance of KVStoreReader. 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 NewKVStoreReader(t interface { mock.TestingT Cleanup(func()) -} - -// NewKVStoreReader creates a new instance of KVStoreReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewKVStoreReader(t mockConstructorTestingTNewKVStoreReader) *KVStoreReader { +}) *KVStoreReader { mock := &KVStoreReader{} mock.Mock.Test(t) diff --git a/state/protocol/mock/mutable_protocol_state.go b/state/protocol/mock/mutable_protocol_state.go index dd240ad0f30..22feb18970d 100644 --- a/state/protocol/mock/mutable_protocol_state.go +++ b/state/protocol/mock/mutable_protocol_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type MutableProtocolState struct { func (_m *MutableProtocolState) EpochStateAtBlockID(blockID flow.Identifier) (protocol.EpochProtocolState, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for EpochStateAtBlockID") + } + var r0 protocol.EpochProtocolState var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (protocol.EpochProtocolState, error)); ok { @@ -46,6 +50,10 @@ func (_m *MutableProtocolState) EpochStateAtBlockID(blockID flow.Identifier) (pr func (_m *MutableProtocolState) EvolveState(parentBlockID flow.Identifier, candidateView uint64, candidateSeals []*flow.Seal) (flow.Identifier, *transaction.DeferredBlockPersist, error) { ret := _m.Called(parentBlockID, candidateView, candidateSeals) + if len(ret) == 0 { + panic("no return value specified for EvolveState") + } + var r0 flow.Identifier var r1 *transaction.DeferredBlockPersist var r2 error @@ -81,6 +89,10 @@ func (_m *MutableProtocolState) EvolveState(parentBlockID flow.Identifier, candi func (_m *MutableProtocolState) GlobalParams() protocol.GlobalParams { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GlobalParams") + } + var r0 protocol.GlobalParams if rf, ok := ret.Get(0).(func() protocol.GlobalParams); ok { r0 = rf() @@ -97,6 +109,10 @@ func (_m *MutableProtocolState) GlobalParams() protocol.GlobalParams { func (_m *MutableProtocolState) KVStoreAtBlockID(blockID flow.Identifier) (protocol.KVStoreReader, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for KVStoreAtBlockID") + } + var r0 protocol.KVStoreReader var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (protocol.KVStoreReader, error)); ok { @@ -119,13 +135,12 @@ func (_m *MutableProtocolState) KVStoreAtBlockID(blockID flow.Identifier) (proto return r0, r1 } -type mockConstructorTestingTNewMutableProtocolState interface { +// NewMutableProtocolState creates a new instance of MutableProtocolState. 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 NewMutableProtocolState(t interface { mock.TestingT Cleanup(func()) -} - -// NewMutableProtocolState creates a new instance of MutableProtocolState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMutableProtocolState(t mockConstructorTestingTNewMutableProtocolState) *MutableProtocolState { +}) *MutableProtocolState { mock := &MutableProtocolState{} mock.Mock.Test(t) diff --git a/state/protocol/mock/params.go b/state/protocol/mock/params.go index a6d5f88e79b..56cad5a925d 100644 --- a/state/protocol/mock/params.go +++ b/state/protocol/mock/params.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Params struct { func (_m *Params) ChainID() flow.ChainID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChainID") + } + var r0 flow.ChainID if rf, ok := ret.Get(0).(func() flow.ChainID); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *Params) ChainID() flow.ChainID { func (_m *Params) EpochCommitSafetyThreshold() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochCommitSafetyThreshold") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -44,6 +52,10 @@ func (_m *Params) EpochCommitSafetyThreshold() uint64 { func (_m *Params) EpochFallbackTriggered() (bool, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochFallbackTriggered") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func() (bool, error)); ok { @@ -68,6 +80,10 @@ func (_m *Params) EpochFallbackTriggered() (bool, error) { func (_m *Params) FinalizedRoot() *flow.Header { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FinalizedRoot") + } + var r0 *flow.Header if rf, ok := ret.Get(0).(func() *flow.Header); ok { r0 = rf() @@ -84,6 +100,10 @@ func (_m *Params) FinalizedRoot() *flow.Header { func (_m *Params) ProtocolVersion() uint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ProtocolVersion") + } + var r0 uint if rf, ok := ret.Get(0).(func() uint); ok { r0 = rf() @@ -98,6 +118,10 @@ func (_m *Params) ProtocolVersion() uint { func (_m *Params) Seal() *flow.Seal { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Seal") + } + var r0 *flow.Seal if rf, ok := ret.Get(0).(func() *flow.Seal); ok { r0 = rf() @@ -114,6 +138,10 @@ func (_m *Params) Seal() *flow.Seal { func (_m *Params) SealedRoot() *flow.Header { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SealedRoot") + } + var r0 *flow.Header if rf, ok := ret.Get(0).(func() *flow.Header); ok { r0 = rf() @@ -130,6 +158,10 @@ func (_m *Params) SealedRoot() *flow.Header { func (_m *Params) SporkID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SporkID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -146,6 +178,10 @@ func (_m *Params) SporkID() flow.Identifier { func (_m *Params) SporkRootBlockHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SporkRootBlockHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -156,13 +192,12 @@ func (_m *Params) SporkRootBlockHeight() uint64 { return r0 } -type mockConstructorTestingTNewParams interface { +// NewParams creates a new instance of Params. 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 NewParams(t interface { mock.TestingT Cleanup(func()) -} - -// NewParams creates a new instance of Params. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewParams(t mockConstructorTestingTNewParams) *Params { +}) *Params { mock := &Params{} mock.Mock.Test(t) diff --git a/state/protocol/mock/participant_state.go b/state/protocol/mock/participant_state.go index b0bfd3a54f3..8cd6001fb24 100644 --- a/state/protocol/mock/participant_state.go +++ b/state/protocol/mock/participant_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type ParticipantState struct { func (_m *ParticipantState) AtBlockID(blockID flow.Identifier) protocol.Snapshot { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for AtBlockID") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func(flow.Identifier) protocol.Snapshot); ok { r0 = rf(blockID) @@ -36,6 +40,10 @@ func (_m *ParticipantState) AtBlockID(blockID flow.Identifier) protocol.Snapshot func (_m *ParticipantState) AtHeight(height uint64) protocol.Snapshot { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for AtHeight") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func(uint64) protocol.Snapshot); ok { r0 = rf(height) @@ -52,6 +60,10 @@ func (_m *ParticipantState) AtHeight(height uint64) protocol.Snapshot { func (_m *ParticipantState) Extend(ctx context.Context, candidate *flow.Block) error { ret := _m.Called(ctx, candidate) + if len(ret) == 0 { + panic("no return value specified for Extend") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *flow.Block) error); ok { r0 = rf(ctx, candidate) @@ -66,6 +78,10 @@ func (_m *ParticipantState) Extend(ctx context.Context, candidate *flow.Block) e func (_m *ParticipantState) ExtendCertified(ctx context.Context, candidate *flow.Block, qc *flow.QuorumCertificate) error { ret := _m.Called(ctx, candidate, qc) + if len(ret) == 0 { + panic("no return value specified for ExtendCertified") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *flow.Block, *flow.QuorumCertificate) error); ok { r0 = rf(ctx, candidate, qc) @@ -80,6 +96,10 @@ func (_m *ParticipantState) ExtendCertified(ctx context.Context, candidate *flow func (_m *ParticipantState) Final() protocol.Snapshot { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Final") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok { r0 = rf() @@ -96,6 +116,10 @@ func (_m *ParticipantState) Final() protocol.Snapshot { func (_m *ParticipantState) Finalize(ctx context.Context, blockID flow.Identifier) error { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for Finalize") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) error); ok { r0 = rf(ctx, blockID) @@ -110,6 +134,10 @@ func (_m *ParticipantState) Finalize(ctx context.Context, blockID flow.Identifie func (_m *ParticipantState) Params() protocol.Params { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 protocol.Params if rf, ok := ret.Get(0).(func() protocol.Params); ok { r0 = rf() @@ -126,6 +154,10 @@ func (_m *ParticipantState) Params() protocol.Params { func (_m *ParticipantState) Sealed() protocol.Snapshot { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Sealed") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok { r0 = rf() @@ -138,13 +170,12 @@ func (_m *ParticipantState) Sealed() protocol.Snapshot { return r0 } -type mockConstructorTestingTNewParticipantState interface { +// NewParticipantState creates a new instance of ParticipantState. 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 NewParticipantState(t interface { mock.TestingT Cleanup(func()) -} - -// NewParticipantState creates a new instance of ParticipantState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewParticipantState(t mockConstructorTestingTNewParticipantState) *ParticipantState { +}) *ParticipantState { mock := &ParticipantState{} mock.Mock.Test(t) diff --git a/state/protocol/mock/protocol_state.go b/state/protocol/mock/protocol_state.go index 65b75ccd00f..625ef29b07e 100644 --- a/state/protocol/mock/protocol_state.go +++ b/state/protocol/mock/protocol_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ProtocolState struct { func (_m *ProtocolState) EpochStateAtBlockID(blockID flow.Identifier) (protocol.EpochProtocolState, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for EpochStateAtBlockID") + } + var r0 protocol.EpochProtocolState var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (protocol.EpochProtocolState, error)); ok { @@ -44,6 +48,10 @@ func (_m *ProtocolState) EpochStateAtBlockID(blockID flow.Identifier) (protocol. func (_m *ProtocolState) GlobalParams() protocol.GlobalParams { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GlobalParams") + } + var r0 protocol.GlobalParams if rf, ok := ret.Get(0).(func() protocol.GlobalParams); ok { r0 = rf() @@ -60,6 +68,10 @@ func (_m *ProtocolState) GlobalParams() protocol.GlobalParams { func (_m *ProtocolState) KVStoreAtBlockID(blockID flow.Identifier) (protocol.KVStoreReader, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for KVStoreAtBlockID") + } + var r0 protocol.KVStoreReader var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (protocol.KVStoreReader, error)); ok { @@ -82,13 +94,12 @@ func (_m *ProtocolState) KVStoreAtBlockID(blockID flow.Identifier) (protocol.KVS return r0, r1 } -type mockConstructorTestingTNewProtocolState interface { +// NewProtocolState creates a new instance of ProtocolState. 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 NewProtocolState(t interface { mock.TestingT Cleanup(func()) -} - -// NewProtocolState creates a new instance of ProtocolState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProtocolState(t mockConstructorTestingTNewProtocolState) *ProtocolState { +}) *ProtocolState { mock := &ProtocolState{} mock.Mock.Test(t) diff --git a/state/protocol/mock/snapshot.go b/state/protocol/mock/snapshot.go index f56505c3236..9a253fb719a 100644 --- a/state/protocol/mock/snapshot.go +++ b/state/protocol/mock/snapshot.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type Snapshot struct { func (_m *Snapshot) Commit() (flow.StateCommitment, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 flow.StateCommitment var r1 error if rf, ok := ret.Get(0).(func() (flow.StateCommitment, error)); ok { @@ -44,6 +48,10 @@ func (_m *Snapshot) Commit() (flow.StateCommitment, error) { func (_m *Snapshot) Descendants() ([]flow.Identifier, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Descendants") + } + var r0 []flow.Identifier var r1 error if rf, ok := ret.Get(0).(func() ([]flow.Identifier, error)); ok { @@ -70,6 +78,10 @@ func (_m *Snapshot) Descendants() ([]flow.Identifier, error) { func (_m *Snapshot) EpochProtocolState() (protocol.EpochProtocolState, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EpochProtocolState") + } + var r0 protocol.EpochProtocolState var r1 error if rf, ok := ret.Get(0).(func() (protocol.EpochProtocolState, error)); ok { @@ -96,6 +108,10 @@ func (_m *Snapshot) EpochProtocolState() (protocol.EpochProtocolState, error) { func (_m *Snapshot) Epochs() protocol.EpochQuery { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Epochs") + } + var r0 protocol.EpochQuery if rf, ok := ret.Get(0).(func() protocol.EpochQuery); ok { r0 = rf() @@ -112,6 +128,10 @@ func (_m *Snapshot) Epochs() protocol.EpochQuery { func (_m *Snapshot) Head() (*flow.Header, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Head") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func() (*flow.Header, error)); ok { @@ -138,6 +158,10 @@ func (_m *Snapshot) Head() (*flow.Header, error) { func (_m *Snapshot) Identities(selector flow.IdentityFilter[flow.Identity]) (flow.GenericIdentityList[flow.Identity], error) { ret := _m.Called(selector) + if len(ret) == 0 { + panic("no return value specified for Identities") + } + var r0 flow.GenericIdentityList[flow.Identity] var r1 error if rf, ok := ret.Get(0).(func(flow.IdentityFilter[flow.Identity]) (flow.GenericIdentityList[flow.Identity], error)); ok { @@ -164,6 +188,10 @@ func (_m *Snapshot) Identities(selector flow.IdentityFilter[flow.Identity]) (flo func (_m *Snapshot) Identity(nodeID flow.Identifier) (*flow.Identity, error) { ret := _m.Called(nodeID) + if len(ret) == 0 { + panic("no return value specified for Identity") + } + var r0 *flow.Identity var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Identity, error)); ok { @@ -190,6 +218,10 @@ func (_m *Snapshot) Identity(nodeID flow.Identifier) (*flow.Identity, error) { func (_m *Snapshot) Params() protocol.GlobalParams { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 protocol.GlobalParams if rf, ok := ret.Get(0).(func() protocol.GlobalParams); ok { r0 = rf() @@ -206,6 +238,10 @@ func (_m *Snapshot) Params() protocol.GlobalParams { func (_m *Snapshot) Phase() (flow.EpochPhase, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Phase") + } + var r0 flow.EpochPhase var r1 error if rf, ok := ret.Get(0).(func() (flow.EpochPhase, error)); ok { @@ -230,6 +266,10 @@ func (_m *Snapshot) Phase() (flow.EpochPhase, error) { func (_m *Snapshot) ProtocolState() (protocol.KVStoreReader, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ProtocolState") + } + var r0 protocol.KVStoreReader var r1 error if rf, ok := ret.Get(0).(func() (protocol.KVStoreReader, error)); ok { @@ -256,6 +296,10 @@ func (_m *Snapshot) ProtocolState() (protocol.KVStoreReader, error) { func (_m *Snapshot) QuorumCertificate() (*flow.QuorumCertificate, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for QuorumCertificate") + } + var r0 *flow.QuorumCertificate var r1 error if rf, ok := ret.Get(0).(func() (*flow.QuorumCertificate, error)); ok { @@ -282,6 +326,10 @@ func (_m *Snapshot) QuorumCertificate() (*flow.QuorumCertificate, error) { func (_m *Snapshot) RandomSource() ([]byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RandomSource") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { @@ -308,6 +356,10 @@ func (_m *Snapshot) RandomSource() ([]byte, error) { func (_m *Snapshot) SealedResult() (*flow.ExecutionResult, *flow.Seal, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SealedResult") + } + var r0 *flow.ExecutionResult var r1 *flow.Seal var r2 error @@ -343,6 +395,10 @@ func (_m *Snapshot) SealedResult() (*flow.ExecutionResult, *flow.Seal, error) { func (_m *Snapshot) SealingSegment() (*flow.SealingSegment, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SealingSegment") + } + var r0 *flow.SealingSegment var r1 error if rf, ok := ret.Get(0).(func() (*flow.SealingSegment, error)); ok { @@ -369,6 +425,10 @@ func (_m *Snapshot) SealingSegment() (*flow.SealingSegment, error) { func (_m *Snapshot) VersionBeacon() (*flow.SealedVersionBeacon, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VersionBeacon") + } + var r0 *flow.SealedVersionBeacon var r1 error if rf, ok := ret.Get(0).(func() (*flow.SealedVersionBeacon, error)); ok { @@ -391,13 +451,12 @@ func (_m *Snapshot) VersionBeacon() (*flow.SealedVersionBeacon, error) { return r0, r1 } -type mockConstructorTestingTNewSnapshot interface { +// NewSnapshot creates a new instance of Snapshot. 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 NewSnapshot(t interface { mock.TestingT Cleanup(func()) -} - -// NewSnapshot creates a new instance of Snapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSnapshot(t mockConstructorTestingTNewSnapshot) *Snapshot { +}) *Snapshot { mock := &Snapshot{} mock.Mock.Test(t) diff --git a/state/protocol/mock/state.go b/state/protocol/mock/state.go index 51a1559eff1..d62316016ae 100644 --- a/state/protocol/mock/state.go +++ b/state/protocol/mock/state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type State struct { func (_m *State) AtBlockID(blockID flow.Identifier) protocol.Snapshot { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for AtBlockID") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func(flow.Identifier) protocol.Snapshot); ok { r0 = rf(blockID) @@ -34,6 +38,10 @@ func (_m *State) AtBlockID(blockID flow.Identifier) protocol.Snapshot { func (_m *State) AtHeight(height uint64) protocol.Snapshot { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for AtHeight") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func(uint64) protocol.Snapshot); ok { r0 = rf(height) @@ -50,6 +58,10 @@ func (_m *State) AtHeight(height uint64) protocol.Snapshot { func (_m *State) Final() protocol.Snapshot { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Final") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok { r0 = rf() @@ -66,6 +78,10 @@ func (_m *State) Final() protocol.Snapshot { func (_m *State) Params() protocol.Params { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Params") + } + var r0 protocol.Params if rf, ok := ret.Get(0).(func() protocol.Params); ok { r0 = rf() @@ -82,6 +98,10 @@ func (_m *State) Params() protocol.Params { func (_m *State) Sealed() protocol.Snapshot { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Sealed") + } + var r0 protocol.Snapshot if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok { r0 = rf() @@ -94,13 +114,12 @@ func (_m *State) Sealed() protocol.Snapshot { return r0 } -type mockConstructorTestingTNewState interface { +// NewState creates a new instance of State. 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 NewState(t interface { mock.TestingT Cleanup(func()) -} - -// NewState creates a new instance of State. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewState(t mockConstructorTestingTNewState) *State { +}) *State { mock := &State{} mock.Mock.Test(t) diff --git a/state/protocol/mock/versioned_encodable.go b/state/protocol/mock/versioned_encodable.go index 5fb8216f207..7b5e74ace48 100644 --- a/state/protocol/mock/versioned_encodable.go +++ b/state/protocol/mock/versioned_encodable.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type VersionedEncodable struct { func (_m *VersionedEncodable) VersionedEncode() (uint64, []byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VersionedEncode") + } + var r0 uint64 var r1 []byte var r2 error @@ -42,13 +46,12 @@ func (_m *VersionedEncodable) VersionedEncode() (uint64, []byte, error) { return r0, r1, r2 } -type mockConstructorTestingTNewVersionedEncodable interface { +// NewVersionedEncodable creates a new instance of VersionedEncodable. 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 NewVersionedEncodable(t interface { mock.TestingT Cleanup(func()) -} - -// NewVersionedEncodable creates a new instance of VersionedEncodable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVersionedEncodable(t mockConstructorTestingTNewVersionedEncodable) *VersionedEncodable { +}) *VersionedEncodable { mock := &VersionedEncodable{} mock.Mock.Test(t) diff --git a/state/protocol/protocol_state/epochs/mock/state_machine.go b/state/protocol/protocol_state/epochs/mock/state_machine.go index 5020829d141..bbed8fef09e 100644 --- a/state/protocol/protocol_state/epochs/mock/state_machine.go +++ b/state/protocol/protocol_state/epochs/mock/state_machine.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type StateMachine struct { func (_m *StateMachine) Build() (*flow.EpochProtocolStateEntry, flow.Identifier, bool) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Build") + } + var r0 *flow.EpochProtocolStateEntry var r1 flow.Identifier var r2 bool @@ -51,6 +55,10 @@ func (_m *StateMachine) Build() (*flow.EpochProtocolStateEntry, flow.Identifier, func (_m *StateMachine) EjectIdentity(nodeID flow.Identifier) error { ret := _m.Called(nodeID) + if len(ret) == 0 { + panic("no return value specified for EjectIdentity") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { r0 = rf(nodeID) @@ -65,6 +73,10 @@ func (_m *StateMachine) EjectIdentity(nodeID flow.Identifier) error { func (_m *StateMachine) ParentState() *flow.RichEpochProtocolStateEntry { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ParentState") + } + var r0 *flow.RichEpochProtocolStateEntry if rf, ok := ret.Get(0).(func() *flow.RichEpochProtocolStateEntry); ok { r0 = rf() @@ -81,6 +93,10 @@ func (_m *StateMachine) ParentState() *flow.RichEpochProtocolStateEntry { func (_m *StateMachine) ProcessEpochCommit(epochCommit *flow.EpochCommit) (bool, error) { ret := _m.Called(epochCommit) + if len(ret) == 0 { + panic("no return value specified for ProcessEpochCommit") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*flow.EpochCommit) (bool, error)); ok { @@ -105,6 +121,10 @@ func (_m *StateMachine) ProcessEpochCommit(epochCommit *flow.EpochCommit) (bool, func (_m *StateMachine) ProcessEpochSetup(epochSetup *flow.EpochSetup) (bool, error) { ret := _m.Called(epochSetup) + if len(ret) == 0 { + panic("no return value specified for ProcessEpochSetup") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*flow.EpochSetup) (bool, error)); ok { @@ -129,6 +149,10 @@ func (_m *StateMachine) ProcessEpochSetup(epochSetup *flow.EpochSetup) (bool, er func (_m *StateMachine) TransitionToNextEpoch() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TransitionToNextEpoch") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -143,6 +167,10 @@ func (_m *StateMachine) TransitionToNextEpoch() error { func (_m *StateMachine) View() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for View") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -153,13 +181,12 @@ func (_m *StateMachine) View() uint64 { return r0 } -type mockConstructorTestingTNewStateMachine interface { +// NewStateMachine creates a new instance of StateMachine. 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 NewStateMachine(t interface { mock.TestingT Cleanup(func()) -} - -// NewStateMachine creates a new instance of StateMachine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStateMachine(t mockConstructorTestingTNewStateMachine) *StateMachine { +}) *StateMachine { mock := &StateMachine{} mock.Mock.Test(t) diff --git a/state/protocol/protocol_state/epochs/mock/state_machine_factory_method.go b/state/protocol/protocol_state/epochs/mock/state_machine_factory_method.go index a5dbbf1906b..ca37e029167 100644 --- a/state/protocol/protocol_state/epochs/mock/state_machine_factory_method.go +++ b/state/protocol/protocol_state/epochs/mock/state_machine_factory_method.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type StateMachineFactoryMethod struct { func (_m *StateMachineFactoryMethod) Execute(candidateView uint64, parentState *flow.RichEpochProtocolStateEntry) (epochs.StateMachine, error) { ret := _m.Called(candidateView, parentState) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 epochs.StateMachine var r1 error if rf, ok := ret.Get(0).(func(uint64, *flow.RichEpochProtocolStateEntry) (epochs.StateMachine, error)); ok { @@ -40,13 +44,12 @@ func (_m *StateMachineFactoryMethod) Execute(candidateView uint64, parentState * return r0, r1 } -type mockConstructorTestingTNewStateMachineFactoryMethod interface { +// NewStateMachineFactoryMethod creates a new instance of StateMachineFactoryMethod. 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 NewStateMachineFactoryMethod(t interface { mock.TestingT Cleanup(func()) -} - -// NewStateMachineFactoryMethod creates a new instance of StateMachineFactoryMethod. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewStateMachineFactoryMethod(t mockConstructorTestingTNewStateMachineFactoryMethod) *StateMachineFactoryMethod { +}) *StateMachineFactoryMethod { mock := &StateMachineFactoryMethod{} mock.Mock.Test(t) diff --git a/state/protocol/protocol_state/mock/key_value_store_state_machine_factory.go b/state/protocol/protocol_state/mock/key_value_store_state_machine_factory.go index ea8f3917789..0d5d8402f52 100644 --- a/state/protocol/protocol_state/mock/key_value_store_state_machine_factory.go +++ b/state/protocol/protocol_state/mock/key_value_store_state_machine_factory.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type KeyValueStoreStateMachineFactory struct { func (_m *KeyValueStoreStateMachineFactory) Create(candidateView uint64, parentID flow.Identifier, parentState protocol.KVStoreReader, mutator protocol_state.KVStoreMutator) (protocol_state.OrthogonalStoreStateMachine[protocol.KVStoreReader], error) { ret := _m.Called(candidateView, parentID, parentState, mutator) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 protocol_state.OrthogonalStoreStateMachine[protocol.KVStoreReader] var r1 error if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, protocol.KVStoreReader, protocol_state.KVStoreMutator) (protocol_state.OrthogonalStoreStateMachine[protocol.KVStoreReader], error)); ok { @@ -42,13 +46,12 @@ func (_m *KeyValueStoreStateMachineFactory) Create(candidateView uint64, parentI return r0, r1 } -type mockConstructorTestingTNewKeyValueStoreStateMachineFactory interface { +// NewKeyValueStoreStateMachineFactory creates a new instance of KeyValueStoreStateMachineFactory. 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 NewKeyValueStoreStateMachineFactory(t interface { mock.TestingT Cleanup(func()) -} - -// NewKeyValueStoreStateMachineFactory creates a new instance of KeyValueStoreStateMachineFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewKeyValueStoreStateMachineFactory(t mockConstructorTestingTNewKeyValueStoreStateMachineFactory) *KeyValueStoreStateMachineFactory { +}) *KeyValueStoreStateMachineFactory { mock := &KeyValueStoreStateMachineFactory{} mock.Mock.Test(t) diff --git a/state/protocol/protocol_state/mock/kv_store_api.go b/state/protocol/protocol_state/mock/kv_store_api.go index 823348f15ed..3be8d85e13c 100644 --- a/state/protocol/protocol_state/mock/kv_store_api.go +++ b/state/protocol/protocol_state/mock/kv_store_api.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type KVStoreAPI struct { func (_m *KVStoreAPI) GetEpochStateID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetEpochStateID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -36,6 +40,10 @@ func (_m *KVStoreAPI) GetEpochStateID() flow.Identifier { func (_m *KVStoreAPI) GetProtocolStateVersion() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateVersion") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -50,6 +58,10 @@ func (_m *KVStoreAPI) GetProtocolStateVersion() uint64 { func (_m *KVStoreAPI) GetVersionUpgrade() *protocol.ViewBasedActivator[uint64] { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetVersionUpgrade") + } + var r0 *protocol.ViewBasedActivator[uint64] if rf, ok := ret.Get(0).(func() *protocol.ViewBasedActivator[uint64]); ok { r0 = rf() @@ -66,6 +78,10 @@ func (_m *KVStoreAPI) GetVersionUpgrade() *protocol.ViewBasedActivator[uint64] { func (_m *KVStoreAPI) ID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -82,6 +98,10 @@ func (_m *KVStoreAPI) ID() flow.Identifier { func (_m *KVStoreAPI) Replicate(protocolVersion uint64) (protocol_state.KVStoreMutator, error) { ret := _m.Called(protocolVersion) + if len(ret) == 0 { + panic("no return value specified for Replicate") + } + var r0 protocol_state.KVStoreMutator var r1 error if rf, ok := ret.Get(0).(func(uint64) (protocol_state.KVStoreMutator, error)); ok { @@ -108,6 +128,10 @@ func (_m *KVStoreAPI) Replicate(protocolVersion uint64) (protocol_state.KVStoreM func (_m *KVStoreAPI) VersionedEncode() (uint64, []byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VersionedEncode") + } + var r0 uint64 var r1 []byte var r2 error @@ -137,13 +161,12 @@ func (_m *KVStoreAPI) VersionedEncode() (uint64, []byte, error) { return r0, r1, r2 } -type mockConstructorTestingTNewKVStoreAPI interface { +// NewKVStoreAPI creates a new instance of KVStoreAPI. 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 NewKVStoreAPI(t interface { mock.TestingT Cleanup(func()) -} - -// NewKVStoreAPI creates a new instance of KVStoreAPI. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewKVStoreAPI(t mockConstructorTestingTNewKVStoreAPI) *KVStoreAPI { +}) *KVStoreAPI { mock := &KVStoreAPI{} mock.Mock.Test(t) diff --git a/state/protocol/protocol_state/mock/kv_store_mutator.go b/state/protocol/protocol_state/mock/kv_store_mutator.go index ec3c5310c02..df9fa0a9226 100644 --- a/state/protocol/protocol_state/mock/kv_store_mutator.go +++ b/state/protocol/protocol_state/mock/kv_store_mutator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type KVStoreMutator struct { func (_m *KVStoreMutator) GetEpochStateID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetEpochStateID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -34,6 +38,10 @@ func (_m *KVStoreMutator) GetEpochStateID() flow.Identifier { func (_m *KVStoreMutator) GetProtocolStateVersion() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetProtocolStateVersion") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *KVStoreMutator) GetProtocolStateVersion() uint64 { func (_m *KVStoreMutator) GetVersionUpgrade() *protocol.ViewBasedActivator[uint64] { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetVersionUpgrade") + } + var r0 *protocol.ViewBasedActivator[uint64] if rf, ok := ret.Get(0).(func() *protocol.ViewBasedActivator[uint64]); ok { r0 = rf() @@ -64,6 +76,10 @@ func (_m *KVStoreMutator) GetVersionUpgrade() *protocol.ViewBasedActivator[uint6 func (_m *KVStoreMutator) ID() flow.Identifier { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 flow.Identifier if rf, ok := ret.Get(0).(func() flow.Identifier); ok { r0 = rf() @@ -90,6 +106,10 @@ func (_m *KVStoreMutator) SetVersionUpgrade(version *protocol.ViewBasedActivator func (_m *KVStoreMutator) VersionedEncode() (uint64, []byte, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VersionedEncode") + } + var r0 uint64 var r1 []byte var r2 error @@ -119,13 +139,12 @@ func (_m *KVStoreMutator) VersionedEncode() (uint64, []byte, error) { return r0, r1, r2 } -type mockConstructorTestingTNewKVStoreMutator interface { +// NewKVStoreMutator creates a new instance of KVStoreMutator. 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 NewKVStoreMutator(t interface { mock.TestingT Cleanup(func()) -} - -// NewKVStoreMutator creates a new instance of KVStoreMutator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewKVStoreMutator(t mockConstructorTestingTNewKVStoreMutator) *KVStoreMutator { +}) *KVStoreMutator { mock := &KVStoreMutator{} mock.Mock.Test(t) diff --git a/state/protocol/protocol_state/mock/orthogonal_store_state_machine.go b/state/protocol/protocol_state/mock/orthogonal_store_state_machine.go index 316d07a4d5f..d6aef61a124 100644 --- a/state/protocol/protocol_state/mock/orthogonal_store_state_machine.go +++ b/state/protocol/protocol_state/mock/orthogonal_store_state_machine.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type OrthogonalStoreStateMachine[P interface{}] struct { func (_m *OrthogonalStoreStateMachine[P]) Build() (*transaction.DeferredBlockPersist, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Build") + } + var r0 *transaction.DeferredBlockPersist var r1 error if rf, ok := ret.Get(0).(func() (*transaction.DeferredBlockPersist, error)); ok { @@ -44,6 +48,10 @@ func (_m *OrthogonalStoreStateMachine[P]) Build() (*transaction.DeferredBlockPer func (_m *OrthogonalStoreStateMachine[P]) EvolveState(sealedServiceEvents []flow.ServiceEvent) error { ret := _m.Called(sealedServiceEvents) + if len(ret) == 0 { + panic("no return value specified for EvolveState") + } + var r0 error if rf, ok := ret.Get(0).(func([]flow.ServiceEvent) error); ok { r0 = rf(sealedServiceEvents) @@ -58,6 +66,10 @@ func (_m *OrthogonalStoreStateMachine[P]) EvolveState(sealedServiceEvents []flow func (_m *OrthogonalStoreStateMachine[P]) ParentState() P { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ParentState") + } + var r0 P if rf, ok := ret.Get(0).(func() P); ok { r0 = rf() @@ -72,6 +84,10 @@ func (_m *OrthogonalStoreStateMachine[P]) ParentState() P { func (_m *OrthogonalStoreStateMachine[P]) View() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for View") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -82,13 +98,12 @@ func (_m *OrthogonalStoreStateMachine[P]) View() uint64 { return r0 } -type mockConstructorTestingTNewOrthogonalStoreStateMachine interface { +// NewOrthogonalStoreStateMachine creates a new instance of OrthogonalStoreStateMachine. 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 NewOrthogonalStoreStateMachine[P interface{}](t interface { mock.TestingT Cleanup(func()) -} - -// NewOrthogonalStoreStateMachine creates a new instance of OrthogonalStoreStateMachine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewOrthogonalStoreStateMachine[P interface{}](t mockConstructorTestingTNewOrthogonalStoreStateMachine) *OrthogonalStoreStateMachine[P] { +}) *OrthogonalStoreStateMachine[P] { mock := &OrthogonalStoreStateMachine[P]{} mock.Mock.Test(t) diff --git a/state/protocol/protocol_state/mock/protocol_kv_store.go b/state/protocol/protocol_state/mock/protocol_kv_store.go index 1f311e60e1a..f0ff62d7371 100644 --- a/state/protocol/protocol_state/mock/protocol_kv_store.go +++ b/state/protocol/protocol_state/mock/protocol_kv_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -22,6 +22,10 @@ type ProtocolKVStore struct { func (_m *ProtocolKVStore) ByBlockID(blockID flow.Identifier) (protocol_state.KVStoreAPI, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 protocol_state.KVStoreAPI var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (protocol_state.KVStoreAPI, error)); ok { @@ -48,6 +52,10 @@ func (_m *ProtocolKVStore) ByBlockID(blockID flow.Identifier) (protocol_state.KV func (_m *ProtocolKVStore) ByID(id flow.Identifier) (protocol_state.KVStoreAPI, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 protocol_state.KVStoreAPI var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (protocol_state.KVStoreAPI, error)); ok { @@ -74,6 +82,10 @@ func (_m *ProtocolKVStore) ByID(id flow.Identifier) (protocol_state.KVStoreAPI, func (_m *ProtocolKVStore) IndexTx(blockID flow.Identifier, stateID flow.Identifier) func(*transaction.Tx) error { ret := _m.Called(blockID, stateID) + if len(ret) == 0 { + panic("no return value specified for IndexTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) func(*transaction.Tx) error); ok { r0 = rf(blockID, stateID) @@ -90,6 +102,10 @@ func (_m *ProtocolKVStore) IndexTx(blockID flow.Identifier, stateID flow.Identif func (_m *ProtocolKVStore) StoreTx(stateID flow.Identifier, kvStore protocol.KVStoreReader) func(*transaction.Tx) error { ret := _m.Called(stateID, kvStore) + if len(ret) == 0 { + panic("no return value specified for StoreTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(flow.Identifier, protocol.KVStoreReader) func(*transaction.Tx) error); ok { r0 = rf(stateID, kvStore) @@ -102,13 +118,12 @@ func (_m *ProtocolKVStore) StoreTx(stateID flow.Identifier, kvStore protocol.KVS return r0 } -type mockConstructorTestingTNewProtocolKVStore interface { +// NewProtocolKVStore creates a new instance of ProtocolKVStore. 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 NewProtocolKVStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewProtocolKVStore creates a new instance of ProtocolKVStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProtocolKVStore(t mockConstructorTestingTNewProtocolKVStore) *ProtocolKVStore { +}) *ProtocolKVStore { mock := &ProtocolKVStore{} mock.Mock.Test(t) diff --git a/storage/mock/batch_storage.go b/storage/mock/batch_storage.go index 356832a3131..1ec85ca506a 100644 --- a/storage/mock/batch_storage.go +++ b/storage/mock/batch_storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type BatchStorage struct { func (_m *BatchStorage) Flush() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Flush") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *BatchStorage) Flush() error { func (_m *BatchStorage) GetWriter() *badger.WriteBatch { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetWriter") + } + var r0 *badger.WriteBatch if rf, ok := ret.Get(0).(func() *badger.WriteBatch); ok { r0 = rf() @@ -47,13 +55,12 @@ func (_m *BatchStorage) OnSucceed(callback func()) { _m.Called(callback) } -type mockConstructorTestingTNewBatchStorage interface { +// NewBatchStorage creates a new instance of BatchStorage. 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 NewBatchStorage(t interface { mock.TestingT Cleanup(func()) -} - -// NewBatchStorage creates a new instance of BatchStorage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBatchStorage(t mockConstructorTestingTNewBatchStorage) *BatchStorage { +}) *BatchStorage { mock := &BatchStorage{} mock.Mock.Test(t) diff --git a/storage/mock/blocks.go b/storage/mock/blocks.go index 124485093d4..558350de22a 100644 --- a/storage/mock/blocks.go +++ b/storage/mock/blocks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type Blocks struct { func (_m *Blocks) ByCollectionID(collID flow.Identifier) (*flow.Block, error) { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for ByCollectionID") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Block, error)); ok { @@ -44,6 +48,10 @@ func (_m *Blocks) ByCollectionID(collID flow.Identifier) (*flow.Block, error) { func (_m *Blocks) ByHeight(height uint64) (*flow.Block, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for ByHeight") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(uint64) (*flow.Block, error)); ok { @@ -70,6 +78,10 @@ func (_m *Blocks) ByHeight(height uint64) (*flow.Block, error) { func (_m *Blocks) ByID(blockID flow.Identifier) (*flow.Block, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.Block var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Block, error)); ok { @@ -96,6 +108,10 @@ func (_m *Blocks) ByID(blockID flow.Identifier) (*flow.Block, error) { func (_m *Blocks) IndexBlockForCollections(blockID flow.Identifier, collIDs []flow.Identifier) error { ret := _m.Called(blockID, collIDs) + if len(ret) == 0 { + panic("no return value specified for IndexBlockForCollections") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.Identifier) error); ok { r0 = rf(blockID, collIDs) @@ -110,6 +126,10 @@ func (_m *Blocks) IndexBlockForCollections(blockID flow.Identifier, collIDs []fl func (_m *Blocks) Store(block *flow.Block) error { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.Block) error); ok { r0 = rf(block) @@ -124,6 +144,10 @@ func (_m *Blocks) Store(block *flow.Block) error { func (_m *Blocks) StoreTx(block *flow.Block) func(*transaction.Tx) error { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for StoreTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(*flow.Block) func(*transaction.Tx) error); ok { r0 = rf(block) @@ -136,13 +160,12 @@ func (_m *Blocks) StoreTx(block *flow.Block) func(*transaction.Tx) error { return r0 } -type mockConstructorTestingTNewBlocks interface { +// NewBlocks creates a new instance of Blocks. 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 NewBlocks(t interface { mock.TestingT Cleanup(func()) -} - -// NewBlocks creates a new instance of Blocks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewBlocks(t mockConstructorTestingTNewBlocks) *Blocks { +}) *Blocks { mock := &Blocks{} mock.Mock.Test(t) diff --git a/storage/mock/chunk_data_packs.go b/storage/mock/chunk_data_packs.go index 6082d72beff..3fbacab10d8 100644 --- a/storage/mock/chunk_data_packs.go +++ b/storage/mock/chunk_data_packs.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ChunkDataPacks struct { func (_m *ChunkDataPacks) BatchRemove(chunkID flow.Identifier, batch storage.BatchStorage) error { ret := _m.Called(chunkID, batch) + if len(ret) == 0 { + panic("no return value specified for BatchRemove") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok { r0 = rf(chunkID, batch) @@ -32,6 +36,10 @@ func (_m *ChunkDataPacks) BatchRemove(chunkID flow.Identifier, batch storage.Bat func (_m *ChunkDataPacks) BatchStore(c *flow.ChunkDataPack, batch storage.BatchStorage) error { ret := _m.Called(c, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStore") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ChunkDataPack, storage.BatchStorage) error); ok { r0 = rf(c, batch) @@ -46,6 +54,10 @@ func (_m *ChunkDataPacks) BatchStore(c *flow.ChunkDataPack, batch storage.BatchS func (_m *ChunkDataPacks) ByChunkID(chunkID flow.Identifier) (*flow.ChunkDataPack, error) { ret := _m.Called(chunkID) + if len(ret) == 0 { + panic("no return value specified for ByChunkID") + } + var r0 *flow.ChunkDataPack var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ChunkDataPack, error)); ok { @@ -72,6 +84,10 @@ func (_m *ChunkDataPacks) ByChunkID(chunkID flow.Identifier) (*flow.ChunkDataPac func (_m *ChunkDataPacks) Remove(cs []flow.Identifier) error { ret := _m.Called(cs) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 error if rf, ok := ret.Get(0).(func([]flow.Identifier) error); ok { r0 = rf(cs) @@ -86,6 +102,10 @@ func (_m *ChunkDataPacks) Remove(cs []flow.Identifier) error { func (_m *ChunkDataPacks) Store(cs []*flow.ChunkDataPack) error { ret := _m.Called(cs) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func([]*flow.ChunkDataPack) error); ok { r0 = rf(cs) @@ -96,13 +116,12 @@ func (_m *ChunkDataPacks) Store(cs []*flow.ChunkDataPack) error { return r0 } -type mockConstructorTestingTNewChunkDataPacks interface { +// NewChunkDataPacks creates a new instance of ChunkDataPacks. 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 NewChunkDataPacks(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunkDataPacks creates a new instance of ChunkDataPacks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunkDataPacks(t mockConstructorTestingTNewChunkDataPacks) *ChunkDataPacks { +}) *ChunkDataPacks { mock := &ChunkDataPacks{} mock.Mock.Test(t) diff --git a/storage/mock/chunks_queue.go b/storage/mock/chunks_queue.go index e2c37661554..e4003ce0465 100644 --- a/storage/mock/chunks_queue.go +++ b/storage/mock/chunks_queue.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type ChunksQueue struct { func (_m *ChunksQueue) AtIndex(index uint64) (*chunks.Locator, error) { ret := _m.Called(index) + if len(ret) == 0 { + panic("no return value specified for AtIndex") + } + var r0 *chunks.Locator var r1 error if rf, ok := ret.Get(0).(func(uint64) (*chunks.Locator, error)); ok { @@ -42,6 +46,10 @@ func (_m *ChunksQueue) AtIndex(index uint64) (*chunks.Locator, error) { func (_m *ChunksQueue) LatestIndex() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LatestIndex") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -66,6 +74,10 @@ func (_m *ChunksQueue) LatestIndex() (uint64, error) { func (_m *ChunksQueue) StoreChunkLocator(locator *chunks.Locator) (bool, error) { ret := _m.Called(locator) + if len(ret) == 0 { + panic("no return value specified for StoreChunkLocator") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*chunks.Locator) (bool, error)); ok { @@ -86,13 +98,12 @@ func (_m *ChunksQueue) StoreChunkLocator(locator *chunks.Locator) (bool, error) return r0, r1 } -type mockConstructorTestingTNewChunksQueue interface { +// NewChunksQueue creates a new instance of ChunksQueue. 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 NewChunksQueue(t interface { mock.TestingT Cleanup(func()) -} - -// NewChunksQueue creates a new instance of ChunksQueue. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewChunksQueue(t mockConstructorTestingTNewChunksQueue) *ChunksQueue { +}) *ChunksQueue { mock := &ChunksQueue{} mock.Mock.Test(t) diff --git a/storage/mock/cluster_blocks.go b/storage/mock/cluster_blocks.go index ad4787f5128..83e40e54db6 100644 --- a/storage/mock/cluster_blocks.go +++ b/storage/mock/cluster_blocks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ClusterBlocks struct { func (_m *ClusterBlocks) ByHeight(height uint64) (*cluster.Block, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for ByHeight") + } + var r0 *cluster.Block var r1 error if rf, ok := ret.Get(0).(func(uint64) (*cluster.Block, error)); ok { @@ -44,6 +48,10 @@ func (_m *ClusterBlocks) ByHeight(height uint64) (*cluster.Block, error) { func (_m *ClusterBlocks) ByID(blockID flow.Identifier) (*cluster.Block, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *cluster.Block var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*cluster.Block, error)); ok { @@ -70,6 +78,10 @@ func (_m *ClusterBlocks) ByID(blockID flow.Identifier) (*cluster.Block, error) { func (_m *ClusterBlocks) Store(block *cluster.Block) error { ret := _m.Called(block) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*cluster.Block) error); ok { r0 = rf(block) @@ -80,13 +92,12 @@ func (_m *ClusterBlocks) Store(block *cluster.Block) error { return r0 } -type mockConstructorTestingTNewClusterBlocks interface { +// NewClusterBlocks creates a new instance of ClusterBlocks. 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 NewClusterBlocks(t interface { mock.TestingT Cleanup(func()) -} - -// NewClusterBlocks creates a new instance of ClusterBlocks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClusterBlocks(t mockConstructorTestingTNewClusterBlocks) *ClusterBlocks { +}) *ClusterBlocks { mock := &ClusterBlocks{} mock.Mock.Test(t) diff --git a/storage/mock/cluster_payloads.go b/storage/mock/cluster_payloads.go index e4e1d00616b..67d5ad3f3c3 100644 --- a/storage/mock/cluster_payloads.go +++ b/storage/mock/cluster_payloads.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ClusterPayloads struct { func (_m *ClusterPayloads) ByBlockID(blockID flow.Identifier) (*cluster.Payload, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 *cluster.Payload var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*cluster.Payload, error)); ok { @@ -44,6 +48,10 @@ func (_m *ClusterPayloads) ByBlockID(blockID flow.Identifier) (*cluster.Payload, func (_m *ClusterPayloads) Store(blockID flow.Identifier, payload *cluster.Payload) error { ret := _m.Called(blockID, payload) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, *cluster.Payload) error); ok { r0 = rf(blockID, payload) @@ -54,13 +62,12 @@ func (_m *ClusterPayloads) Store(blockID flow.Identifier, payload *cluster.Paylo return r0 } -type mockConstructorTestingTNewClusterPayloads interface { +// NewClusterPayloads creates a new instance of ClusterPayloads. 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 NewClusterPayloads(t interface { mock.TestingT Cleanup(func()) -} - -// NewClusterPayloads creates a new instance of ClusterPayloads. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewClusterPayloads(t mockConstructorTestingTNewClusterPayloads) *ClusterPayloads { +}) *ClusterPayloads { mock := &ClusterPayloads{} mock.Mock.Test(t) diff --git a/storage/mock/collections.go b/storage/mock/collections.go index 2927d8a27ec..c7f5eba2c28 100644 --- a/storage/mock/collections.go +++ b/storage/mock/collections.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Collections struct { func (_m *Collections) ByID(collID flow.Identifier) (*flow.Collection, error) { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.Collection var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Collection, error)); ok { @@ -42,6 +46,10 @@ func (_m *Collections) ByID(collID flow.Identifier) (*flow.Collection, error) { func (_m *Collections) LightByID(collID flow.Identifier) (*flow.LightCollection, error) { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for LightByID") + } + var r0 *flow.LightCollection var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.LightCollection, error)); ok { @@ -68,6 +76,10 @@ func (_m *Collections) LightByID(collID flow.Identifier) (*flow.LightCollection, func (_m *Collections) LightByTransactionID(txID flow.Identifier) (*flow.LightCollection, error) { ret := _m.Called(txID) + if len(ret) == 0 { + panic("no return value specified for LightByTransactionID") + } + var r0 *flow.LightCollection var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.LightCollection, error)); ok { @@ -94,6 +106,10 @@ func (_m *Collections) LightByTransactionID(txID flow.Identifier) (*flow.LightCo func (_m *Collections) Remove(collID flow.Identifier) error { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { r0 = rf(collID) @@ -108,6 +124,10 @@ func (_m *Collections) Remove(collID flow.Identifier) error { func (_m *Collections) Store(collection *flow.Collection) error { ret := _m.Called(collection) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.Collection) error); ok { r0 = rf(collection) @@ -122,6 +142,10 @@ func (_m *Collections) Store(collection *flow.Collection) error { func (_m *Collections) StoreLight(collection *flow.LightCollection) error { ret := _m.Called(collection) + if len(ret) == 0 { + panic("no return value specified for StoreLight") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.LightCollection) error); ok { r0 = rf(collection) @@ -136,6 +160,10 @@ func (_m *Collections) StoreLight(collection *flow.LightCollection) error { func (_m *Collections) StoreLightAndIndexByTransaction(collection *flow.LightCollection) error { ret := _m.Called(collection) + if len(ret) == 0 { + panic("no return value specified for StoreLightAndIndexByTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.LightCollection) error); ok { r0 = rf(collection) @@ -146,13 +174,12 @@ func (_m *Collections) StoreLightAndIndexByTransaction(collection *flow.LightCol return r0 } -type mockConstructorTestingTNewCollections interface { +// NewCollections creates a new instance of Collections. 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 NewCollections(t interface { mock.TestingT Cleanup(func()) -} - -// NewCollections creates a new instance of Collections. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCollections(t mockConstructorTestingTNewCollections) *Collections { +}) *Collections { mock := &Collections{} mock.Mock.Test(t) diff --git a/storage/mock/commits.go b/storage/mock/commits.go index a3adc0979ab..d8e1513dccb 100644 --- a/storage/mock/commits.go +++ b/storage/mock/commits.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type Commits struct { func (_m *Commits) BatchRemoveByBlockID(blockID flow.Identifier, batch storage.BatchStorage) error { ret := _m.Called(blockID, batch) + if len(ret) == 0 { + panic("no return value specified for BatchRemoveByBlockID") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok { r0 = rf(blockID, batch) @@ -32,6 +36,10 @@ func (_m *Commits) BatchRemoveByBlockID(blockID flow.Identifier, batch storage.B func (_m *Commits) BatchStore(blockID flow.Identifier, commit flow.StateCommitment, batch storage.BatchStorage) error { ret := _m.Called(blockID, commit, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStore") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.StateCommitment, storage.BatchStorage) error); ok { r0 = rf(blockID, commit, batch) @@ -46,6 +54,10 @@ func (_m *Commits) BatchStore(blockID flow.Identifier, commit flow.StateCommitme func (_m *Commits) ByBlockID(blockID flow.Identifier) (flow.StateCommitment, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 flow.StateCommitment var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.StateCommitment, error)); ok { @@ -72,6 +84,10 @@ func (_m *Commits) ByBlockID(blockID flow.Identifier) (flow.StateCommitment, err func (_m *Commits) Store(blockID flow.Identifier, commit flow.StateCommitment) error { ret := _m.Called(blockID, commit) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.StateCommitment) error); ok { r0 = rf(blockID, commit) @@ -82,13 +98,12 @@ func (_m *Commits) Store(blockID flow.Identifier, commit flow.StateCommitment) e return r0 } -type mockConstructorTestingTNewCommits interface { +// NewCommits creates a new instance of Commits. 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 NewCommits(t interface { mock.TestingT Cleanup(func()) -} - -// NewCommits creates a new instance of Commits. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewCommits(t mockConstructorTestingTNewCommits) *Commits { +}) *Commits { mock := &Commits{} mock.Mock.Test(t) diff --git a/storage/mock/computation_result_upload_status.go b/storage/mock/computation_result_upload_status.go index 11b772c9e80..eedc64591a3 100644 --- a/storage/mock/computation_result_upload_status.go +++ b/storage/mock/computation_result_upload_status.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type ComputationResultUploadStatus struct { func (_m *ComputationResultUploadStatus) ByID(blockID flow.Identifier) (bool, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (bool, error)); ok { @@ -40,6 +44,10 @@ func (_m *ComputationResultUploadStatus) ByID(blockID flow.Identifier) (bool, er func (_m *ComputationResultUploadStatus) GetIDsByUploadStatus(targetUploadStatus bool) ([]flow.Identifier, error) { ret := _m.Called(targetUploadStatus) + if len(ret) == 0 { + panic("no return value specified for GetIDsByUploadStatus") + } + var r0 []flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(bool) ([]flow.Identifier, error)); ok { @@ -66,6 +74,10 @@ func (_m *ComputationResultUploadStatus) GetIDsByUploadStatus(targetUploadStatus func (_m *ComputationResultUploadStatus) Remove(blockID flow.Identifier) error { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for Remove") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok { r0 = rf(blockID) @@ -80,6 +92,10 @@ func (_m *ComputationResultUploadStatus) Remove(blockID flow.Identifier) error { func (_m *ComputationResultUploadStatus) Upsert(blockID flow.Identifier, wasUploadCompleted bool) error { ret := _m.Called(blockID, wasUploadCompleted) + if len(ret) == 0 { + panic("no return value specified for Upsert") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, bool) error); ok { r0 = rf(blockID, wasUploadCompleted) @@ -90,13 +106,12 @@ func (_m *ComputationResultUploadStatus) Upsert(blockID flow.Identifier, wasUplo return r0 } -type mockConstructorTestingTNewComputationResultUploadStatus interface { +// NewComputationResultUploadStatus creates a new instance of ComputationResultUploadStatus. 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 NewComputationResultUploadStatus(t interface { mock.TestingT Cleanup(func()) -} - -// NewComputationResultUploadStatus creates a new instance of ComputationResultUploadStatus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewComputationResultUploadStatus(t mockConstructorTestingTNewComputationResultUploadStatus) *ComputationResultUploadStatus { +}) *ComputationResultUploadStatus { mock := &ComputationResultUploadStatus{} mock.Mock.Test(t) diff --git a/storage/mock/consumer_progress.go b/storage/mock/consumer_progress.go index 9410bc76ea4..591fbd39af7 100644 --- a/storage/mock/consumer_progress.go +++ b/storage/mock/consumer_progress.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type ConsumerProgress struct { func (_m *ConsumerProgress) InitProcessedIndex(defaultIndex uint64) error { ret := _m.Called(defaultIndex) + if len(ret) == 0 { + panic("no return value specified for InitProcessedIndex") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(defaultIndex) @@ -27,6 +31,10 @@ func (_m *ConsumerProgress) InitProcessedIndex(defaultIndex uint64) error { func (_m *ConsumerProgress) ProcessedIndex() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ProcessedIndex") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -51,6 +59,10 @@ func (_m *ConsumerProgress) ProcessedIndex() (uint64, error) { func (_m *ConsumerProgress) SetProcessedIndex(processed uint64) error { ret := _m.Called(processed) + if len(ret) == 0 { + panic("no return value specified for SetProcessedIndex") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(processed) @@ -61,13 +73,12 @@ func (_m *ConsumerProgress) SetProcessedIndex(processed uint64) error { return r0 } -type mockConstructorTestingTNewConsumerProgress interface { +// NewConsumerProgress creates a new instance of ConsumerProgress. 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 NewConsumerProgress(t interface { mock.TestingT Cleanup(func()) -} - -// NewConsumerProgress creates a new instance of ConsumerProgress. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewConsumerProgress(t mockConstructorTestingTNewConsumerProgress) *ConsumerProgress { +}) *ConsumerProgress { mock := &ConsumerProgress{} mock.Mock.Test(t) diff --git a/storage/mock/deferred_db_update.go b/storage/mock/deferred_db_update.go index c7de452c29f..15a8a2b8d23 100644 --- a/storage/mock/deferred_db_update.go +++ b/storage/mock/deferred_db_update.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type DeferredDBUpdate struct { func (_m *DeferredDBUpdate) Execute(_a0 *transaction.Tx) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Execute") + } + var r0 error if rf, ok := ret.Get(0).(func(*transaction.Tx) error); ok { r0 = rf(_a0) @@ -26,13 +30,12 @@ func (_m *DeferredDBUpdate) Execute(_a0 *transaction.Tx) error { return r0 } -type mockConstructorTestingTNewDeferredDBUpdate interface { +// NewDeferredDBUpdate creates a new instance of DeferredDBUpdate. 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 NewDeferredDBUpdate(t interface { mock.TestingT Cleanup(func()) -} - -// NewDeferredDBUpdate creates a new instance of DeferredDBUpdate. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDeferredDBUpdate(t mockConstructorTestingTNewDeferredDBUpdate) *DeferredDBUpdate { +}) *DeferredDBUpdate { mock := &DeferredDBUpdate{} mock.Mock.Test(t) diff --git a/storage/mock/dkg_state.go b/storage/mock/dkg_state.go index 18a3e808a0c..10451250fbf 100644 --- a/storage/mock/dkg_state.go +++ b/storage/mock/dkg_state.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type DKGState struct { func (_m *DKGState) GetDKGEndState(epochCounter uint64) (flow.DKGEndState, error) { ret := _m.Called(epochCounter) + if len(ret) == 0 { + panic("no return value specified for GetDKGEndState") + } + var r0 flow.DKGEndState var r1 error if rf, ok := ret.Get(0).(func(uint64) (flow.DKGEndState, error)); ok { @@ -42,6 +46,10 @@ func (_m *DKGState) GetDKGEndState(epochCounter uint64) (flow.DKGEndState, error func (_m *DKGState) GetDKGStarted(epochCounter uint64) (bool, error) { ret := _m.Called(epochCounter) + if len(ret) == 0 { + panic("no return value specified for GetDKGStarted") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(uint64) (bool, error)); ok { @@ -66,6 +74,10 @@ func (_m *DKGState) GetDKGStarted(epochCounter uint64) (bool, error) { func (_m *DKGState) InsertMyBeaconPrivateKey(epochCounter uint64, key crypto.PrivateKey) error { ret := _m.Called(epochCounter, key) + if len(ret) == 0 { + panic("no return value specified for InsertMyBeaconPrivateKey") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64, crypto.PrivateKey) error); ok { r0 = rf(epochCounter, key) @@ -80,6 +92,10 @@ func (_m *DKGState) InsertMyBeaconPrivateKey(epochCounter uint64, key crypto.Pri func (_m *DKGState) RetrieveMyBeaconPrivateKey(epochCounter uint64) (crypto.PrivateKey, error) { ret := _m.Called(epochCounter) + if len(ret) == 0 { + panic("no return value specified for RetrieveMyBeaconPrivateKey") + } + var r0 crypto.PrivateKey var r1 error if rf, ok := ret.Get(0).(func(uint64) (crypto.PrivateKey, error)); ok { @@ -106,6 +122,10 @@ func (_m *DKGState) RetrieveMyBeaconPrivateKey(epochCounter uint64) (crypto.Priv func (_m *DKGState) SetDKGEndState(epochCounter uint64, endState flow.DKGEndState) error { ret := _m.Called(epochCounter, endState) + if len(ret) == 0 { + panic("no return value specified for SetDKGEndState") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64, flow.DKGEndState) error); ok { r0 = rf(epochCounter, endState) @@ -120,6 +140,10 @@ func (_m *DKGState) SetDKGEndState(epochCounter uint64, endState flow.DKGEndStat func (_m *DKGState) SetDKGStarted(epochCounter uint64) error { ret := _m.Called(epochCounter) + if len(ret) == 0 { + panic("no return value specified for SetDKGStarted") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(epochCounter) @@ -130,13 +154,12 @@ func (_m *DKGState) SetDKGStarted(epochCounter uint64) error { return r0 } -type mockConstructorTestingTNewDKGState interface { +// NewDKGState creates a new instance of DKGState. 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 NewDKGState(t interface { mock.TestingT Cleanup(func()) -} - -// NewDKGState creates a new instance of DKGState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewDKGState(t mockConstructorTestingTNewDKGState) *DKGState { +}) *DKGState { mock := &DKGState{} mock.Mock.Test(t) diff --git a/storage/mock/epoch_commits.go b/storage/mock/epoch_commits.go index 33ebd5d8486..bb5acb6b283 100644 --- a/storage/mock/epoch_commits.go +++ b/storage/mock/epoch_commits.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type EpochCommits struct { func (_m *EpochCommits) ByID(_a0 flow.Identifier) (*flow.EpochCommit, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.EpochCommit var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.EpochCommit, error)); ok { @@ -44,6 +48,10 @@ func (_m *EpochCommits) ByID(_a0 flow.Identifier) (*flow.EpochCommit, error) { func (_m *EpochCommits) StoreTx(commit *flow.EpochCommit) func(*transaction.Tx) error { ret := _m.Called(commit) + if len(ret) == 0 { + panic("no return value specified for StoreTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(*flow.EpochCommit) func(*transaction.Tx) error); ok { r0 = rf(commit) @@ -56,13 +64,12 @@ func (_m *EpochCommits) StoreTx(commit *flow.EpochCommit) func(*transaction.Tx) return r0 } -type mockConstructorTestingTNewEpochCommits interface { +// NewEpochCommits creates a new instance of EpochCommits. 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 NewEpochCommits(t interface { mock.TestingT Cleanup(func()) -} - -// NewEpochCommits creates a new instance of EpochCommits. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEpochCommits(t mockConstructorTestingTNewEpochCommits) *EpochCommits { +}) *EpochCommits { mock := &EpochCommits{} mock.Mock.Test(t) diff --git a/storage/mock/epoch_protocol_state_entries.go b/storage/mock/epoch_protocol_state_entries.go index 8e9f546616a..248c8ffec84 100644 --- a/storage/mock/epoch_protocol_state_entries.go +++ b/storage/mock/epoch_protocol_state_entries.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type EpochProtocolStateEntries struct { func (_m *EpochProtocolStateEntries) ByBlockID(blockID flow.Identifier) (*flow.RichEpochProtocolStateEntry, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 *flow.RichEpochProtocolStateEntry var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.RichEpochProtocolStateEntry, error)); ok { @@ -44,6 +48,10 @@ func (_m *EpochProtocolStateEntries) ByBlockID(blockID flow.Identifier) (*flow.R func (_m *EpochProtocolStateEntries) ByID(id flow.Identifier) (*flow.RichEpochProtocolStateEntry, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.RichEpochProtocolStateEntry var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.RichEpochProtocolStateEntry, error)); ok { @@ -70,6 +78,10 @@ func (_m *EpochProtocolStateEntries) ByID(id flow.Identifier) (*flow.RichEpochPr func (_m *EpochProtocolStateEntries) Index(blockID flow.Identifier, epochProtocolStateID flow.Identifier) func(*transaction.Tx) error { ret := _m.Called(blockID, epochProtocolStateID) + if len(ret) == 0 { + panic("no return value specified for Index") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) func(*transaction.Tx) error); ok { r0 = rf(blockID, epochProtocolStateID) @@ -86,6 +98,10 @@ func (_m *EpochProtocolStateEntries) Index(blockID flow.Identifier, epochProtoco func (_m *EpochProtocolStateEntries) StoreTx(epochProtocolStateID flow.Identifier, epochProtocolStateEntry *flow.EpochProtocolStateEntry) func(*transaction.Tx) error { ret := _m.Called(epochProtocolStateID, epochProtocolStateEntry) + if len(ret) == 0 { + panic("no return value specified for StoreTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(flow.Identifier, *flow.EpochProtocolStateEntry) func(*transaction.Tx) error); ok { r0 = rf(epochProtocolStateID, epochProtocolStateEntry) @@ -98,13 +114,12 @@ func (_m *EpochProtocolStateEntries) StoreTx(epochProtocolStateID flow.Identifie return r0 } -type mockConstructorTestingTNewEpochProtocolStateEntries interface { +// NewEpochProtocolStateEntries creates a new instance of EpochProtocolStateEntries. 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 NewEpochProtocolStateEntries(t interface { mock.TestingT Cleanup(func()) -} - -// NewEpochProtocolStateEntries creates a new instance of EpochProtocolStateEntries. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEpochProtocolStateEntries(t mockConstructorTestingTNewEpochProtocolStateEntries) *EpochProtocolStateEntries { +}) *EpochProtocolStateEntries { mock := &EpochProtocolStateEntries{} mock.Mock.Test(t) diff --git a/storage/mock/epoch_setups.go b/storage/mock/epoch_setups.go index 0b7386c1af6..7d50bcb80a3 100644 --- a/storage/mock/epoch_setups.go +++ b/storage/mock/epoch_setups.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type EpochSetups struct { func (_m *EpochSetups) ByID(_a0 flow.Identifier) (*flow.EpochSetup, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.EpochSetup var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.EpochSetup, error)); ok { @@ -44,6 +48,10 @@ func (_m *EpochSetups) ByID(_a0 flow.Identifier) (*flow.EpochSetup, error) { func (_m *EpochSetups) StoreTx(_a0 *flow.EpochSetup) func(*transaction.Tx) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for StoreTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(*flow.EpochSetup) func(*transaction.Tx) error); ok { r0 = rf(_a0) @@ -56,13 +64,12 @@ func (_m *EpochSetups) StoreTx(_a0 *flow.EpochSetup) func(*transaction.Tx) error return r0 } -type mockConstructorTestingTNewEpochSetups interface { +// NewEpochSetups creates a new instance of EpochSetups. 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 NewEpochSetups(t interface { mock.TestingT Cleanup(func()) -} - -// NewEpochSetups creates a new instance of EpochSetups. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEpochSetups(t mockConstructorTestingTNewEpochSetups) *EpochSetups { +}) *EpochSetups { mock := &EpochSetups{} mock.Mock.Test(t) diff --git a/storage/mock/events.go b/storage/mock/events.go index 57ecb4ffd5f..f23160b8c15 100644 --- a/storage/mock/events.go +++ b/storage/mock/events.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type Events struct { func (_m *Events) BatchRemoveByBlockID(blockID flow.Identifier, batch storage.BatchStorage) error { ret := _m.Called(blockID, batch) + if len(ret) == 0 { + panic("no return value specified for BatchRemoveByBlockID") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok { r0 = rf(blockID, batch) @@ -32,6 +36,10 @@ func (_m *Events) BatchRemoveByBlockID(blockID flow.Identifier, batch storage.Ba func (_m *Events) BatchStore(blockID flow.Identifier, events []flow.EventsList, batch storage.BatchStorage) error { ret := _m.Called(blockID, events, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStore") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.EventsList, storage.BatchStorage) error); ok { r0 = rf(blockID, events, batch) @@ -46,6 +54,10 @@ func (_m *Events) BatchStore(blockID flow.Identifier, events []flow.EventsList, func (_m *Events) ByBlockID(blockID flow.Identifier) ([]flow.Event, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 []flow.Event var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.Event, error)); ok { @@ -72,6 +84,10 @@ func (_m *Events) ByBlockID(blockID flow.Identifier) ([]flow.Event, error) { func (_m *Events) ByBlockIDEventType(blockID flow.Identifier, eventType flow.EventType) ([]flow.Event, error) { ret := _m.Called(blockID, eventType) + if len(ret) == 0 { + panic("no return value specified for ByBlockIDEventType") + } + var r0 []flow.Event var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.EventType) ([]flow.Event, error)); ok { @@ -98,6 +114,10 @@ func (_m *Events) ByBlockIDEventType(blockID flow.Identifier, eventType flow.Eve func (_m *Events) ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) ([]flow.Event, error) { ret := _m.Called(blockID, transactionID) + if len(ret) == 0 { + panic("no return value specified for ByBlockIDTransactionID") + } + var r0 []flow.Event var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) ([]flow.Event, error)); ok { @@ -124,6 +144,10 @@ func (_m *Events) ByBlockIDTransactionID(blockID flow.Identifier, transactionID func (_m *Events) ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) ([]flow.Event, error) { ret := _m.Called(blockID, txIndex) + if len(ret) == 0 { + panic("no return value specified for ByBlockIDTransactionIndex") + } + var r0 []flow.Event var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) ([]flow.Event, error)); ok { @@ -150,6 +174,10 @@ func (_m *Events) ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uin func (_m *Events) Store(blockID flow.Identifier, blockEvents []flow.EventsList) error { ret := _m.Called(blockID, blockEvents) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.EventsList) error); ok { r0 = rf(blockID, blockEvents) @@ -160,13 +188,12 @@ func (_m *Events) Store(blockID flow.Identifier, blockEvents []flow.EventsList) return r0 } -type mockConstructorTestingTNewEvents interface { +// NewEvents creates a new instance of Events. 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 NewEvents(t interface { mock.TestingT Cleanup(func()) -} - -// NewEvents creates a new instance of Events. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewEvents(t mockConstructorTestingTNewEvents) *Events { +}) *Events { mock := &Events{} mock.Mock.Test(t) diff --git a/storage/mock/execution_receipts.go b/storage/mock/execution_receipts.go index b1c0d1fd6de..da96d6dddb3 100644 --- a/storage/mock/execution_receipts.go +++ b/storage/mock/execution_receipts.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ExecutionReceipts struct { func (_m *ExecutionReceipts) BatchStore(receipt *flow.ExecutionReceipt, batch storage.BatchStorage) error { ret := _m.Called(receipt, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStore") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt, storage.BatchStorage) error); ok { r0 = rf(receipt, batch) @@ -32,6 +36,10 @@ func (_m *ExecutionReceipts) BatchStore(receipt *flow.ExecutionReceipt, batch st func (_m *ExecutionReceipts) ByBlockID(blockID flow.Identifier) (flow.ExecutionReceiptList, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 flow.ExecutionReceiptList var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (flow.ExecutionReceiptList, error)); ok { @@ -58,6 +66,10 @@ func (_m *ExecutionReceipts) ByBlockID(blockID flow.Identifier) (flow.ExecutionR func (_m *ExecutionReceipts) ByID(receiptID flow.Identifier) (*flow.ExecutionReceipt, error) { ret := _m.Called(receiptID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.ExecutionReceipt var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ExecutionReceipt, error)); ok { @@ -84,6 +96,10 @@ func (_m *ExecutionReceipts) ByID(receiptID flow.Identifier) (*flow.ExecutionRec func (_m *ExecutionReceipts) Store(receipt *flow.ExecutionReceipt) error { ret := _m.Called(receipt) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) error); ok { r0 = rf(receipt) @@ -94,13 +110,12 @@ func (_m *ExecutionReceipts) Store(receipt *flow.ExecutionReceipt) error { return r0 } -type mockConstructorTestingTNewExecutionReceipts interface { +// NewExecutionReceipts creates a new instance of ExecutionReceipts. 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 NewExecutionReceipts(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionReceipts creates a new instance of ExecutionReceipts. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionReceipts(t mockConstructorTestingTNewExecutionReceipts) *ExecutionReceipts { +}) *ExecutionReceipts { mock := &ExecutionReceipts{} mock.Mock.Test(t) diff --git a/storage/mock/execution_results.go b/storage/mock/execution_results.go index c9ad6b09035..f701356adae 100644 --- a/storage/mock/execution_results.go +++ b/storage/mock/execution_results.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -20,6 +20,10 @@ type ExecutionResults struct { func (_m *ExecutionResults) BatchIndex(blockID flow.Identifier, resultID flow.Identifier, batch storage.BatchStorage) error { ret := _m.Called(blockID, resultID, batch) + if len(ret) == 0 { + panic("no return value specified for BatchIndex") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier, storage.BatchStorage) error); ok { r0 = rf(blockID, resultID, batch) @@ -34,6 +38,10 @@ func (_m *ExecutionResults) BatchIndex(blockID flow.Identifier, resultID flow.Id func (_m *ExecutionResults) BatchRemoveIndexByBlockID(blockID flow.Identifier, batch storage.BatchStorage) error { ret := _m.Called(blockID, batch) + if len(ret) == 0 { + panic("no return value specified for BatchRemoveIndexByBlockID") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok { r0 = rf(blockID, batch) @@ -48,6 +56,10 @@ func (_m *ExecutionResults) BatchRemoveIndexByBlockID(blockID flow.Identifier, b func (_m *ExecutionResults) BatchStore(result *flow.ExecutionResult, batch storage.BatchStorage) error { ret := _m.Called(result, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStore") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionResult, storage.BatchStorage) error); ok { r0 = rf(result, batch) @@ -62,6 +74,10 @@ func (_m *ExecutionResults) BatchStore(result *flow.ExecutionResult, batch stora func (_m *ExecutionResults) ByBlockID(blockID flow.Identifier) (*flow.ExecutionResult, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 *flow.ExecutionResult var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ExecutionResult, error)); ok { @@ -88,6 +104,10 @@ func (_m *ExecutionResults) ByBlockID(blockID flow.Identifier) (*flow.ExecutionR func (_m *ExecutionResults) ByID(resultID flow.Identifier) (*flow.ExecutionResult, error) { ret := _m.Called(resultID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.ExecutionResult var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ExecutionResult, error)); ok { @@ -114,6 +134,10 @@ func (_m *ExecutionResults) ByID(resultID flow.Identifier) (*flow.ExecutionResul func (_m *ExecutionResults) ByIDTx(resultID flow.Identifier) func(*transaction.Tx) (*flow.ExecutionResult, error) { ret := _m.Called(resultID) + if len(ret) == 0 { + panic("no return value specified for ByIDTx") + } + var r0 func(*transaction.Tx) (*flow.ExecutionResult, error) if rf, ok := ret.Get(0).(func(flow.Identifier) func(*transaction.Tx) (*flow.ExecutionResult, error)); ok { r0 = rf(resultID) @@ -130,6 +154,10 @@ func (_m *ExecutionResults) ByIDTx(resultID flow.Identifier) func(*transaction.T func (_m *ExecutionResults) ForceIndex(blockID flow.Identifier, resultID flow.Identifier) error { ret := _m.Called(blockID, resultID) + if len(ret) == 0 { + panic("no return value specified for ForceIndex") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { r0 = rf(blockID, resultID) @@ -144,6 +172,10 @@ func (_m *ExecutionResults) ForceIndex(blockID flow.Identifier, resultID flow.Id func (_m *ExecutionResults) Index(blockID flow.Identifier, resultID flow.Identifier) error { ret := _m.Called(blockID, resultID) + if len(ret) == 0 { + panic("no return value specified for Index") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { r0 = rf(blockID, resultID) @@ -158,6 +190,10 @@ func (_m *ExecutionResults) Index(blockID flow.Identifier, resultID flow.Identif func (_m *ExecutionResults) Store(result *flow.ExecutionResult) error { ret := _m.Called(result) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionResult) error); ok { r0 = rf(result) @@ -168,13 +204,12 @@ func (_m *ExecutionResults) Store(result *flow.ExecutionResult) error { return r0 } -type mockConstructorTestingTNewExecutionResults interface { +// NewExecutionResults creates a new instance of ExecutionResults. 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 NewExecutionResults(t interface { mock.TestingT Cleanup(func()) -} - -// NewExecutionResults creates a new instance of ExecutionResults. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewExecutionResults(t mockConstructorTestingTNewExecutionResults) *ExecutionResults { +}) *ExecutionResults { mock := &ExecutionResults{} mock.Mock.Test(t) diff --git a/storage/mock/guarantees.go b/storage/mock/guarantees.go index 4ea09b69fad..69a01a23040 100644 --- a/storage/mock/guarantees.go +++ b/storage/mock/guarantees.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Guarantees struct { func (_m *Guarantees) ByCollectionID(collID flow.Identifier) (*flow.CollectionGuarantee, error) { ret := _m.Called(collID) + if len(ret) == 0 { + panic("no return value specified for ByCollectionID") + } + var r0 *flow.CollectionGuarantee var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.CollectionGuarantee, error)); ok { @@ -42,6 +46,10 @@ func (_m *Guarantees) ByCollectionID(collID flow.Identifier) (*flow.CollectionGu func (_m *Guarantees) Store(guarantee *flow.CollectionGuarantee) error { ret := _m.Called(guarantee) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.CollectionGuarantee) error); ok { r0 = rf(guarantee) @@ -52,13 +60,12 @@ func (_m *Guarantees) Store(guarantee *flow.CollectionGuarantee) error { return r0 } -type mockConstructorTestingTNewGuarantees interface { +// NewGuarantees creates a new instance of Guarantees. 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 NewGuarantees(t interface { mock.TestingT Cleanup(func()) -} - -// NewGuarantees creates a new instance of Guarantees. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewGuarantees(t mockConstructorTestingTNewGuarantees) *Guarantees { +}) *Guarantees { mock := &Guarantees{} mock.Mock.Test(t) diff --git a/storage/mock/headers.go b/storage/mock/headers.go index f130a452946..0c1f732e523 100644 --- a/storage/mock/headers.go +++ b/storage/mock/headers.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Headers struct { func (_m *Headers) BlockIDByHeight(height uint64) (flow.Identifier, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for BlockIDByHeight") + } + var r0 flow.Identifier var r1 error if rf, ok := ret.Get(0).(func(uint64) (flow.Identifier, error)); ok { @@ -42,6 +46,10 @@ func (_m *Headers) BlockIDByHeight(height uint64) (flow.Identifier, error) { func (_m *Headers) ByBlockID(blockID flow.Identifier) (*flow.Header, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Header, error)); ok { @@ -68,6 +76,10 @@ func (_m *Headers) ByBlockID(blockID flow.Identifier) (*flow.Header, error) { func (_m *Headers) ByHeight(height uint64) (*flow.Header, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for ByHeight") + } + var r0 *flow.Header var r1 error if rf, ok := ret.Get(0).(func(uint64) (*flow.Header, error)); ok { @@ -94,6 +106,10 @@ func (_m *Headers) ByHeight(height uint64) (*flow.Header, error) { func (_m *Headers) ByParentID(parentID flow.Identifier) ([]*flow.Header, error) { ret := _m.Called(parentID) + if len(ret) == 0 { + panic("no return value specified for ByParentID") + } + var r0 []*flow.Header var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) ([]*flow.Header, error)); ok { @@ -120,6 +136,10 @@ func (_m *Headers) ByParentID(parentID flow.Identifier) ([]*flow.Header, error) func (_m *Headers) Exists(blockID flow.Identifier) (bool, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for Exists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (bool, error)); ok { @@ -144,6 +164,10 @@ func (_m *Headers) Exists(blockID flow.Identifier) (bool, error) { func (_m *Headers) Store(header *flow.Header) error { ret := _m.Called(header) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.Header) error); ok { r0 = rf(header) @@ -154,13 +178,12 @@ func (_m *Headers) Store(header *flow.Header) error { return r0 } -type mockConstructorTestingTNewHeaders interface { +// NewHeaders creates a new instance of Headers. 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 NewHeaders(t interface { mock.TestingT Cleanup(func()) -} - -// NewHeaders creates a new instance of Headers. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHeaders(t mockConstructorTestingTNewHeaders) *Headers { +}) *Headers { mock := &Headers{} mock.Mock.Test(t) diff --git a/storage/mock/height_index.go b/storage/mock/height_index.go index f69177c4cf9..7497efd538b 100644 --- a/storage/mock/height_index.go +++ b/storage/mock/height_index.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type HeightIndex struct { func (_m *HeightIndex) FirstHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FirstHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -37,6 +41,10 @@ func (_m *HeightIndex) FirstHeight() (uint64, error) { func (_m *HeightIndex) LatestHeight() (uint64, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LatestHeight") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func() (uint64, error)); ok { @@ -61,6 +69,10 @@ func (_m *HeightIndex) LatestHeight() (uint64, error) { func (_m *HeightIndex) SetLatestHeight(height uint64) error { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for SetLatestHeight") + } + var r0 error if rf, ok := ret.Get(0).(func(uint64) error); ok { r0 = rf(height) @@ -71,13 +83,12 @@ func (_m *HeightIndex) SetLatestHeight(height uint64) error { return r0 } -type mockConstructorTestingTNewHeightIndex interface { +// NewHeightIndex creates a new instance of HeightIndex. 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 NewHeightIndex(t interface { mock.TestingT Cleanup(func()) -} - -// NewHeightIndex creates a new instance of HeightIndex. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHeightIndex(t mockConstructorTestingTNewHeightIndex) *HeightIndex { +}) *HeightIndex { mock := &HeightIndex{} mock.Mock.Test(t) diff --git a/storage/mock/index.go b/storage/mock/index.go index d0d2472e181..bb160154a70 100644 --- a/storage/mock/index.go +++ b/storage/mock/index.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Index struct { func (_m *Index) ByBlockID(blockID flow.Identifier) (*flow.Index, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 *flow.Index var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Index, error)); ok { @@ -42,6 +46,10 @@ func (_m *Index) ByBlockID(blockID flow.Identifier) (*flow.Index, error) { func (_m *Index) Store(blockID flow.Identifier, index *flow.Index) error { ret := _m.Called(blockID, index) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, *flow.Index) error); ok { r0 = rf(blockID, index) @@ -52,13 +60,12 @@ func (_m *Index) Store(blockID flow.Identifier, index *flow.Index) error { return r0 } -type mockConstructorTestingTNewIndex interface { +// NewIndex creates a new instance of Index. 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 NewIndex(t interface { mock.TestingT Cleanup(func()) -} - -// NewIndex creates a new instance of Index. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewIndex(t mockConstructorTestingTNewIndex) *Index { +}) *Index { mock := &Index{} mock.Mock.Test(t) diff --git a/storage/mock/ledger.go b/storage/mock/ledger.go index 6d5bee1a697..a42104378d7 100644 --- a/storage/mock/ledger.go +++ b/storage/mock/ledger.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Ledger struct { func (_m *Ledger) EmptyStateCommitment() flow.StateCommitment { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EmptyStateCommitment") + } + var r0 flow.StateCommitment if rf, ok := ret.Get(0).(func() flow.StateCommitment); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Ledger) EmptyStateCommitment() flow.StateCommitment { func (_m *Ledger) GetRegisters(registerIDs []flow.RegisterID, stateCommitment flow.StateCommitment) ([][]byte, error) { ret := _m.Called(registerIDs, stateCommitment) + if len(ret) == 0 { + panic("no return value specified for GetRegisters") + } + var r0 [][]byte var r1 error if rf, ok := ret.Get(0).(func([]flow.RegisterID, flow.StateCommitment) ([][]byte, error)); ok { @@ -58,6 +66,10 @@ func (_m *Ledger) GetRegisters(registerIDs []flow.RegisterID, stateCommitment fl func (_m *Ledger) GetRegistersWithProof(registerIDs []flow.RegisterID, stateCommitment flow.StateCommitment) ([][]byte, [][]byte, error) { ret := _m.Called(registerIDs, stateCommitment) + if len(ret) == 0 { + panic("no return value specified for GetRegistersWithProof") + } + var r0 [][]byte var r1 [][]byte var r2 error @@ -93,6 +105,10 @@ func (_m *Ledger) GetRegistersWithProof(registerIDs []flow.RegisterID, stateComm func (_m *Ledger) UpdateRegisters(registerIDs []flow.RegisterID, values [][]byte, stateCommitment flow.StateCommitment) (flow.StateCommitment, error) { ret := _m.Called(registerIDs, values, stateCommitment) + if len(ret) == 0 { + panic("no return value specified for UpdateRegisters") + } + var r0 flow.StateCommitment var r1 error if rf, ok := ret.Get(0).(func([]flow.RegisterID, [][]byte, flow.StateCommitment) (flow.StateCommitment, error)); ok { @@ -119,6 +135,10 @@ func (_m *Ledger) UpdateRegisters(registerIDs []flow.RegisterID, values [][]byte func (_m *Ledger) UpdateRegistersWithProof(registerIDs []flow.RegisterID, values [][]byte, stateCommitment flow.StateCommitment) (flow.StateCommitment, [][]byte, error) { ret := _m.Called(registerIDs, values, stateCommitment) + if len(ret) == 0 { + panic("no return value specified for UpdateRegistersWithProof") + } + var r0 flow.StateCommitment var r1 [][]byte var r2 error @@ -150,13 +170,12 @@ func (_m *Ledger) UpdateRegistersWithProof(registerIDs []flow.RegisterID, values return r0, r1, r2 } -type mockConstructorTestingTNewLedger interface { +// NewLedger creates a new instance of Ledger. 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 NewLedger(t interface { mock.TestingT Cleanup(func()) -} - -// NewLedger creates a new instance of Ledger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLedger(t mockConstructorTestingTNewLedger) *Ledger { +}) *Ledger { mock := &Ledger{} mock.Mock.Test(t) diff --git a/storage/mock/ledger_verifier.go b/storage/mock/ledger_verifier.go index 9a823e5fa0e..e699c166cb6 100644 --- a/storage/mock/ledger_verifier.go +++ b/storage/mock/ledger_verifier.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type LedgerVerifier struct { func (_m *LedgerVerifier) VerifyRegistersProof(registerIDs []flow.RegisterID, stateCommitment flow.StateCommitment, values [][]byte, proof [][]byte) (bool, error) { ret := _m.Called(registerIDs, stateCommitment, values, proof) + if len(ret) == 0 { + panic("no return value specified for VerifyRegistersProof") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func([]flow.RegisterID, flow.StateCommitment, [][]byte, [][]byte) (bool, error)); ok { @@ -36,13 +40,12 @@ func (_m *LedgerVerifier) VerifyRegistersProof(registerIDs []flow.RegisterID, st return r0, r1 } -type mockConstructorTestingTNewLedgerVerifier interface { +// NewLedgerVerifier creates a new instance of LedgerVerifier. 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 NewLedgerVerifier(t interface { mock.TestingT Cleanup(func()) -} - -// NewLedgerVerifier creates a new instance of LedgerVerifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLedgerVerifier(t mockConstructorTestingTNewLedgerVerifier) *LedgerVerifier { +}) *LedgerVerifier { mock := &LedgerVerifier{} mock.Mock.Test(t) diff --git a/storage/mock/light_transaction_results.go b/storage/mock/light_transaction_results.go index 4b8f1f6980e..5548377176b 100644 --- a/storage/mock/light_transaction_results.go +++ b/storage/mock/light_transaction_results.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type LightTransactionResults struct { func (_m *LightTransactionResults) BatchStore(blockID flow.Identifier, transactionResults []flow.LightTransactionResult, batch storage.BatchStorage) error { ret := _m.Called(blockID, transactionResults, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStore") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.LightTransactionResult, storage.BatchStorage) error); ok { r0 = rf(blockID, transactionResults, batch) @@ -32,6 +36,10 @@ func (_m *LightTransactionResults) BatchStore(blockID flow.Identifier, transacti func (_m *LightTransactionResults) ByBlockID(id flow.Identifier) ([]flow.LightTransactionResult, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 []flow.LightTransactionResult var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.LightTransactionResult, error)); ok { @@ -58,6 +66,10 @@ func (_m *LightTransactionResults) ByBlockID(id flow.Identifier) ([]flow.LightTr func (_m *LightTransactionResults) ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) (*flow.LightTransactionResult, error) { ret := _m.Called(blockID, transactionID) + if len(ret) == 0 { + panic("no return value specified for ByBlockIDTransactionID") + } + var r0 *flow.LightTransactionResult var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) (*flow.LightTransactionResult, error)); ok { @@ -84,6 +96,10 @@ func (_m *LightTransactionResults) ByBlockIDTransactionID(blockID flow.Identifie func (_m *LightTransactionResults) ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) (*flow.LightTransactionResult, error) { ret := _m.Called(blockID, txIndex) + if len(ret) == 0 { + panic("no return value specified for ByBlockIDTransactionIndex") + } + var r0 *flow.LightTransactionResult var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) (*flow.LightTransactionResult, error)); ok { @@ -106,13 +122,12 @@ func (_m *LightTransactionResults) ByBlockIDTransactionIndex(blockID flow.Identi return r0, r1 } -type mockConstructorTestingTNewLightTransactionResults interface { +// NewLightTransactionResults creates a new instance of LightTransactionResults. 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 NewLightTransactionResults(t interface { mock.TestingT Cleanup(func()) -} - -// NewLightTransactionResults creates a new instance of LightTransactionResults. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewLightTransactionResults(t mockConstructorTestingTNewLightTransactionResults) *LightTransactionResults { +}) *LightTransactionResults { mock := &LightTransactionResults{} mock.Mock.Test(t) diff --git a/storage/mock/my_execution_receipts.go b/storage/mock/my_execution_receipts.go index 6ebba2fb4b5..ea249927bb3 100644 --- a/storage/mock/my_execution_receipts.go +++ b/storage/mock/my_execution_receipts.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type MyExecutionReceipts struct { func (_m *MyExecutionReceipts) BatchRemoveIndexByBlockID(blockID flow.Identifier, batch storage.BatchStorage) error { ret := _m.Called(blockID, batch) + if len(ret) == 0 { + panic("no return value specified for BatchRemoveIndexByBlockID") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok { r0 = rf(blockID, batch) @@ -32,6 +36,10 @@ func (_m *MyExecutionReceipts) BatchRemoveIndexByBlockID(blockID flow.Identifier func (_m *MyExecutionReceipts) BatchStoreMyReceipt(receipt *flow.ExecutionReceipt, batch storage.BatchStorage) error { ret := _m.Called(receipt, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStoreMyReceipt") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt, storage.BatchStorage) error); ok { r0 = rf(receipt, batch) @@ -46,6 +54,10 @@ func (_m *MyExecutionReceipts) BatchStoreMyReceipt(receipt *flow.ExecutionReceip func (_m *MyExecutionReceipts) MyReceipt(blockID flow.Identifier) (*flow.ExecutionReceipt, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for MyReceipt") + } + var r0 *flow.ExecutionReceipt var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ExecutionReceipt, error)); ok { @@ -72,6 +84,10 @@ func (_m *MyExecutionReceipts) MyReceipt(blockID flow.Identifier) (*flow.Executi func (_m *MyExecutionReceipts) StoreMyReceipt(receipt *flow.ExecutionReceipt) error { ret := _m.Called(receipt) + if len(ret) == 0 { + panic("no return value specified for StoreMyReceipt") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) error); ok { r0 = rf(receipt) @@ -82,13 +98,12 @@ func (_m *MyExecutionReceipts) StoreMyReceipt(receipt *flow.ExecutionReceipt) er return r0 } -type mockConstructorTestingTNewMyExecutionReceipts interface { +// NewMyExecutionReceipts creates a new instance of MyExecutionReceipts. 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 NewMyExecutionReceipts(t interface { mock.TestingT Cleanup(func()) -} - -// NewMyExecutionReceipts creates a new instance of MyExecutionReceipts. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMyExecutionReceipts(t mockConstructorTestingTNewMyExecutionReceipts) *MyExecutionReceipts { +}) *MyExecutionReceipts { mock := &MyExecutionReceipts{} mock.Mock.Test(t) diff --git a/storage/mock/payloads.go b/storage/mock/payloads.go index 8da3720c709..eccab005116 100644 --- a/storage/mock/payloads.go +++ b/storage/mock/payloads.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Payloads struct { func (_m *Payloads) ByBlockID(blockID flow.Identifier) (*flow.Payload, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 *flow.Payload var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Payload, error)); ok { @@ -42,6 +46,10 @@ func (_m *Payloads) ByBlockID(blockID flow.Identifier) (*flow.Payload, error) { func (_m *Payloads) Store(blockID flow.Identifier, payload *flow.Payload) error { ret := _m.Called(blockID, payload) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, *flow.Payload) error); ok { r0 = rf(blockID, payload) @@ -52,13 +60,12 @@ func (_m *Payloads) Store(blockID flow.Identifier, payload *flow.Payload) error return r0 } -type mockConstructorTestingTNewPayloads interface { +// NewPayloads creates a new instance of Payloads. 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 NewPayloads(t interface { mock.TestingT Cleanup(func()) -} - -// NewPayloads creates a new instance of Payloads. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewPayloads(t mockConstructorTestingTNewPayloads) *Payloads { +}) *Payloads { mock := &Payloads{} mock.Mock.Test(t) diff --git a/storage/mock/protocol_kv_store.go b/storage/mock/protocol_kv_store.go index bea5f5e8cd0..b6989034e40 100644 --- a/storage/mock/protocol_kv_store.go +++ b/storage/mock/protocol_kv_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ProtocolKVStore struct { func (_m *ProtocolKVStore) ByBlockID(blockID flow.Identifier) (*flow.PSKeyValueStoreData, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 *flow.PSKeyValueStoreData var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.PSKeyValueStoreData, error)); ok { @@ -44,6 +48,10 @@ func (_m *ProtocolKVStore) ByBlockID(blockID flow.Identifier) (*flow.PSKeyValueS func (_m *ProtocolKVStore) ByID(id flow.Identifier) (*flow.PSKeyValueStoreData, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.PSKeyValueStoreData var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.PSKeyValueStoreData, error)); ok { @@ -70,6 +78,10 @@ func (_m *ProtocolKVStore) ByID(id flow.Identifier) (*flow.PSKeyValueStoreData, func (_m *ProtocolKVStore) IndexTx(blockID flow.Identifier, stateID flow.Identifier) func(*transaction.Tx) error { ret := _m.Called(blockID, stateID) + if len(ret) == 0 { + panic("no return value specified for IndexTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) func(*transaction.Tx) error); ok { r0 = rf(blockID, stateID) @@ -86,6 +98,10 @@ func (_m *ProtocolKVStore) IndexTx(blockID flow.Identifier, stateID flow.Identif func (_m *ProtocolKVStore) StoreTx(stateID flow.Identifier, data *flow.PSKeyValueStoreData) func(*transaction.Tx) error { ret := _m.Called(stateID, data) + if len(ret) == 0 { + panic("no return value specified for StoreTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(flow.Identifier, *flow.PSKeyValueStoreData) func(*transaction.Tx) error); ok { r0 = rf(stateID, data) @@ -98,13 +114,12 @@ func (_m *ProtocolKVStore) StoreTx(stateID flow.Identifier, data *flow.PSKeyValu return r0 } -type mockConstructorTestingTNewProtocolKVStore interface { +// NewProtocolKVStore creates a new instance of ProtocolKVStore. 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 NewProtocolKVStore(t interface { mock.TestingT Cleanup(func()) -} - -// NewProtocolKVStore creates a new instance of ProtocolKVStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewProtocolKVStore(t mockConstructorTestingTNewProtocolKVStore) *ProtocolKVStore { +}) *ProtocolKVStore { mock := &ProtocolKVStore{} mock.Mock.Test(t) diff --git a/storage/mock/quorum_certificates.go b/storage/mock/quorum_certificates.go index 980836dbce2..68b234ecd05 100644 --- a/storage/mock/quorum_certificates.go +++ b/storage/mock/quorum_certificates.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type QuorumCertificates struct { func (_m *QuorumCertificates) ByBlockID(blockID flow.Identifier) (*flow.QuorumCertificate, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 *flow.QuorumCertificate var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.QuorumCertificate, error)); ok { @@ -44,6 +48,10 @@ func (_m *QuorumCertificates) ByBlockID(blockID flow.Identifier) (*flow.QuorumCe func (_m *QuorumCertificates) StoreTx(qc *flow.QuorumCertificate) func(*transaction.Tx) error { ret := _m.Called(qc) + if len(ret) == 0 { + panic("no return value specified for StoreTx") + } + var r0 func(*transaction.Tx) error if rf, ok := ret.Get(0).(func(*flow.QuorumCertificate) func(*transaction.Tx) error); ok { r0 = rf(qc) @@ -56,13 +64,12 @@ func (_m *QuorumCertificates) StoreTx(qc *flow.QuorumCertificate) func(*transact return r0 } -type mockConstructorTestingTNewQuorumCertificates interface { +// NewQuorumCertificates creates a new instance of QuorumCertificates. 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 NewQuorumCertificates(t interface { mock.TestingT Cleanup(func()) -} - -// NewQuorumCertificates creates a new instance of QuorumCertificates. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewQuorumCertificates(t mockConstructorTestingTNewQuorumCertificates) *QuorumCertificates { +}) *QuorumCertificates { mock := &QuorumCertificates{} mock.Mock.Test(t) diff --git a/storage/mock/register_index.go b/storage/mock/register_index.go index 40a8bd3da7d..197d25a59a2 100644 --- a/storage/mock/register_index.go +++ b/storage/mock/register_index.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type RegisterIndex struct { func (_m *RegisterIndex) FirstHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for FirstHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *RegisterIndex) FirstHeight() uint64 { func (_m *RegisterIndex) Get(ID flow.RegisterID, height uint64) ([]byte, error) { ret := _m.Called(ID, height) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(flow.RegisterID, uint64) ([]byte, error)); ok { @@ -56,6 +64,10 @@ func (_m *RegisterIndex) Get(ID flow.RegisterID, height uint64) ([]byte, error) func (_m *RegisterIndex) LatestHeight() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LatestHeight") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -70,6 +82,10 @@ func (_m *RegisterIndex) LatestHeight() uint64 { func (_m *RegisterIndex) Store(entries flow.RegisterEntries, height uint64) error { ret := _m.Called(entries, height) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.RegisterEntries, uint64) error); ok { r0 = rf(entries, height) @@ -80,13 +96,12 @@ func (_m *RegisterIndex) Store(entries flow.RegisterEntries, height uint64) erro return r0 } -type mockConstructorTestingTNewRegisterIndex interface { +// NewRegisterIndex creates a new instance of RegisterIndex. 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 NewRegisterIndex(t interface { mock.TestingT Cleanup(func()) -} - -// NewRegisterIndex creates a new instance of RegisterIndex. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRegisterIndex(t mockConstructorTestingTNewRegisterIndex) *RegisterIndex { +}) *RegisterIndex { mock := &RegisterIndex{} mock.Mock.Test(t) diff --git a/storage/mock/result_approvals.go b/storage/mock/result_approvals.go index 9084f2dabbb..d76a7ce09ce 100644 --- a/storage/mock/result_approvals.go +++ b/storage/mock/result_approvals.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type ResultApprovals struct { func (_m *ResultApprovals) ByChunk(resultID flow.Identifier, chunkIndex uint64) (*flow.ResultApproval, error) { ret := _m.Called(resultID, chunkIndex) + if len(ret) == 0 { + panic("no return value specified for ByChunk") + } + var r0 *flow.ResultApproval var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, uint64) (*flow.ResultApproval, error)); ok { @@ -42,6 +46,10 @@ func (_m *ResultApprovals) ByChunk(resultID flow.Identifier, chunkIndex uint64) func (_m *ResultApprovals) ByID(approvalID flow.Identifier) (*flow.ResultApproval, error) { ret := _m.Called(approvalID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.ResultApproval var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ResultApproval, error)); ok { @@ -68,6 +76,10 @@ func (_m *ResultApprovals) ByID(approvalID flow.Identifier) (*flow.ResultApprova func (_m *ResultApprovals) Index(resultID flow.Identifier, chunkIndex uint64, approvalID flow.Identifier) error { ret := _m.Called(resultID, chunkIndex, approvalID) + if len(ret) == 0 { + panic("no return value specified for Index") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, uint64, flow.Identifier) error); ok { r0 = rf(resultID, chunkIndex, approvalID) @@ -82,6 +94,10 @@ func (_m *ResultApprovals) Index(resultID flow.Identifier, chunkIndex uint64, ap func (_m *ResultApprovals) Store(result *flow.ResultApproval) error { ret := _m.Called(result) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.ResultApproval) error); ok { r0 = rf(result) @@ -92,13 +108,12 @@ func (_m *ResultApprovals) Store(result *flow.ResultApproval) error { return r0 } -type mockConstructorTestingTNewResultApprovals interface { +// NewResultApprovals creates a new instance of ResultApprovals. 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 NewResultApprovals(t interface { mock.TestingT Cleanup(func()) -} - -// NewResultApprovals creates a new instance of ResultApprovals. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewResultApprovals(t mockConstructorTestingTNewResultApprovals) *ResultApprovals { +}) *ResultApprovals { mock := &ResultApprovals{} mock.Mock.Test(t) diff --git a/storage/mock/safe_beacon_keys.go b/storage/mock/safe_beacon_keys.go index fecfdc4c81e..9baedf60e75 100644 --- a/storage/mock/safe_beacon_keys.go +++ b/storage/mock/safe_beacon_keys.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type SafeBeaconKeys struct { func (_m *SafeBeaconKeys) RetrieveMyBeaconPrivateKey(epochCounter uint64) (crypto.PrivateKey, bool, error) { ret := _m.Called(epochCounter) + if len(ret) == 0 { + panic("no return value specified for RetrieveMyBeaconPrivateKey") + } + var r0 crypto.PrivateKey var r1 bool var r2 error @@ -45,13 +49,12 @@ func (_m *SafeBeaconKeys) RetrieveMyBeaconPrivateKey(epochCounter uint64) (crypt return r0, r1, r2 } -type mockConstructorTestingTNewSafeBeaconKeys interface { +// NewSafeBeaconKeys creates a new instance of SafeBeaconKeys. 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 NewSafeBeaconKeys(t interface { mock.TestingT Cleanup(func()) -} - -// NewSafeBeaconKeys creates a new instance of SafeBeaconKeys. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSafeBeaconKeys(t mockConstructorTestingTNewSafeBeaconKeys) *SafeBeaconKeys { +}) *SafeBeaconKeys { mock := &SafeBeaconKeys{} mock.Mock.Test(t) diff --git a/storage/mock/seals.go b/storage/mock/seals.go index 0c26f7b6737..7714cc1be8a 100644 --- a/storage/mock/seals.go +++ b/storage/mock/seals.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Seals struct { func (_m *Seals) ByID(sealID flow.Identifier) (*flow.Seal, error) { ret := _m.Called(sealID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.Seal var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Seal, error)); ok { @@ -42,6 +46,10 @@ func (_m *Seals) ByID(sealID flow.Identifier) (*flow.Seal, error) { func (_m *Seals) FinalizedSealForBlock(blockID flow.Identifier) (*flow.Seal, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for FinalizedSealForBlock") + } + var r0 *flow.Seal var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Seal, error)); ok { @@ -68,6 +76,10 @@ func (_m *Seals) FinalizedSealForBlock(blockID flow.Identifier) (*flow.Seal, err func (_m *Seals) HighestInFork(blockID flow.Identifier) (*flow.Seal, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for HighestInFork") + } + var r0 *flow.Seal var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Seal, error)); ok { @@ -94,6 +106,10 @@ func (_m *Seals) HighestInFork(blockID flow.Identifier) (*flow.Seal, error) { func (_m *Seals) Store(seal *flow.Seal) error { ret := _m.Called(seal) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.Seal) error); ok { r0 = rf(seal) @@ -104,13 +120,12 @@ func (_m *Seals) Store(seal *flow.Seal) error { return r0 } -type mockConstructorTestingTNewSeals interface { +// NewSeals creates a new instance of Seals. 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 NewSeals(t interface { mock.TestingT Cleanup(func()) -} - -// NewSeals creates a new instance of Seals. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewSeals(t mockConstructorTestingTNewSeals) *Seals { +}) *Seals { mock := &Seals{} mock.Mock.Test(t) diff --git a/storage/mock/service_events.go b/storage/mock/service_events.go index e065d969b23..923c8f700c5 100644 --- a/storage/mock/service_events.go +++ b/storage/mock/service_events.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type ServiceEvents struct { func (_m *ServiceEvents) BatchRemoveByBlockID(blockID flow.Identifier, batch storage.BatchStorage) error { ret := _m.Called(blockID, batch) + if len(ret) == 0 { + panic("no return value specified for BatchRemoveByBlockID") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok { r0 = rf(blockID, batch) @@ -32,6 +36,10 @@ func (_m *ServiceEvents) BatchRemoveByBlockID(blockID flow.Identifier, batch sto func (_m *ServiceEvents) BatchStore(blockID flow.Identifier, events []flow.Event, batch storage.BatchStorage) error { ret := _m.Called(blockID, events, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStore") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.Event, storage.BatchStorage) error); ok { r0 = rf(blockID, events, batch) @@ -46,6 +54,10 @@ func (_m *ServiceEvents) BatchStore(blockID flow.Identifier, events []flow.Event func (_m *ServiceEvents) ByBlockID(blockID flow.Identifier) ([]flow.Event, error) { ret := _m.Called(blockID) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 []flow.Event var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.Event, error)); ok { @@ -68,13 +80,12 @@ func (_m *ServiceEvents) ByBlockID(blockID flow.Identifier) ([]flow.Event, error return r0, r1 } -type mockConstructorTestingTNewServiceEvents interface { +// NewServiceEvents creates a new instance of ServiceEvents. 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 NewServiceEvents(t interface { mock.TestingT Cleanup(func()) -} - -// NewServiceEvents creates a new instance of ServiceEvents. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewServiceEvents(t mockConstructorTestingTNewServiceEvents) *ServiceEvents { +}) *ServiceEvents { mock := &ServiceEvents{} mock.Mock.Test(t) diff --git a/storage/mock/transaction.go b/storage/mock/transaction.go index 97a4de1493c..4c8da524a52 100644 --- a/storage/mock/transaction.go +++ b/storage/mock/transaction.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -13,6 +13,10 @@ type Transaction struct { func (_m *Transaction) Set(key []byte, val []byte) error { ret := _m.Called(key, val) + if len(ret) == 0 { + panic("no return value specified for Set") + } + var r0 error if rf, ok := ret.Get(0).(func([]byte, []byte) error); ok { r0 = rf(key, val) @@ -23,13 +27,12 @@ func (_m *Transaction) Set(key []byte, val []byte) error { return r0 } -type mockConstructorTestingTNewTransaction interface { +// NewTransaction creates a new instance of Transaction. 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 NewTransaction(t interface { mock.TestingT Cleanup(func()) -} - -// NewTransaction creates a new instance of Transaction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransaction(t mockConstructorTestingTNewTransaction) *Transaction { +}) *Transaction { mock := &Transaction{} mock.Mock.Test(t) diff --git a/storage/mock/transaction_results.go b/storage/mock/transaction_results.go index 33b975ff007..bfe3e094fdf 100644 --- a/storage/mock/transaction_results.go +++ b/storage/mock/transaction_results.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -18,6 +18,10 @@ type TransactionResults struct { func (_m *TransactionResults) BatchStore(blockID flow.Identifier, transactionResults []flow.TransactionResult, batch storage.BatchStorage) error { ret := _m.Called(blockID, transactionResults, batch) + if len(ret) == 0 { + panic("no return value specified for BatchStore") + } + var r0 error if rf, ok := ret.Get(0).(func(flow.Identifier, []flow.TransactionResult, storage.BatchStorage) error); ok { r0 = rf(blockID, transactionResults, batch) @@ -32,6 +36,10 @@ func (_m *TransactionResults) BatchStore(blockID flow.Identifier, transactionRes func (_m *TransactionResults) ByBlockID(id flow.Identifier) ([]flow.TransactionResult, error) { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for ByBlockID") + } + var r0 []flow.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.TransactionResult, error)); ok { @@ -58,6 +66,10 @@ func (_m *TransactionResults) ByBlockID(id flow.Identifier) ([]flow.TransactionR func (_m *TransactionResults) ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) (*flow.TransactionResult, error) { ret := _m.Called(blockID, transactionID) + if len(ret) == 0 { + panic("no return value specified for ByBlockIDTransactionID") + } + var r0 *flow.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) (*flow.TransactionResult, error)); ok { @@ -84,6 +96,10 @@ func (_m *TransactionResults) ByBlockIDTransactionID(blockID flow.Identifier, tr func (_m *TransactionResults) ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) (*flow.TransactionResult, error) { ret := _m.Called(blockID, txIndex) + if len(ret) == 0 { + panic("no return value specified for ByBlockIDTransactionIndex") + } + var r0 *flow.TransactionResult var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) (*flow.TransactionResult, error)); ok { @@ -106,13 +122,12 @@ func (_m *TransactionResults) ByBlockIDTransactionIndex(blockID flow.Identifier, return r0, r1 } -type mockConstructorTestingTNewTransactionResults interface { +// NewTransactionResults creates a new instance of TransactionResults. 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 NewTransactionResults(t interface { mock.TestingT Cleanup(func()) -} - -// NewTransactionResults creates a new instance of TransactionResults. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransactionResults(t mockConstructorTestingTNewTransactionResults) *TransactionResults { +}) *TransactionResults { mock := &TransactionResults{} mock.Mock.Test(t) diff --git a/storage/mock/transactions.go b/storage/mock/transactions.go index b15c922be60..c067e9c204b 100644 --- a/storage/mock/transactions.go +++ b/storage/mock/transactions.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type Transactions struct { func (_m *Transactions) ByID(txID flow.Identifier) (*flow.TransactionBody, error) { ret := _m.Called(txID) + if len(ret) == 0 { + panic("no return value specified for ByID") + } + var r0 *flow.TransactionBody var r1 error if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.TransactionBody, error)); ok { @@ -42,6 +46,10 @@ func (_m *Transactions) ByID(txID flow.Identifier) (*flow.TransactionBody, error func (_m *Transactions) Store(tx *flow.TransactionBody) error { ret := _m.Called(tx) + if len(ret) == 0 { + panic("no return value specified for Store") + } + var r0 error if rf, ok := ret.Get(0).(func(*flow.TransactionBody) error); ok { r0 = rf(tx) @@ -52,13 +60,12 @@ func (_m *Transactions) Store(tx *flow.TransactionBody) error { return r0 } -type mockConstructorTestingTNewTransactions interface { +// NewTransactions creates a new instance of Transactions. 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 NewTransactions(t interface { mock.TestingT Cleanup(func()) -} - -// NewTransactions creates a new instance of Transactions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewTransactions(t mockConstructorTestingTNewTransactions) *Transactions { +}) *Transactions { mock := &Transactions{} mock.Mock.Test(t) diff --git a/storage/mock/version_beacons.go b/storage/mock/version_beacons.go index dd06ce17dd2..a29de5f3cbb 100644 --- a/storage/mock/version_beacons.go +++ b/storage/mock/version_beacons.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.4. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mock @@ -16,6 +16,10 @@ type VersionBeacons struct { func (_m *VersionBeacons) Highest(belowOrEqualTo uint64) (*flow.SealedVersionBeacon, error) { ret := _m.Called(belowOrEqualTo) + if len(ret) == 0 { + panic("no return value specified for Highest") + } + var r0 *flow.SealedVersionBeacon var r1 error if rf, ok := ret.Get(0).(func(uint64) (*flow.SealedVersionBeacon, error)); ok { @@ -38,13 +42,12 @@ func (_m *VersionBeacons) Highest(belowOrEqualTo uint64) (*flow.SealedVersionBea return r0, r1 } -type mockConstructorTestingTNewVersionBeacons interface { +// NewVersionBeacons creates a new instance of VersionBeacons. 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 NewVersionBeacons(t interface { mock.TestingT Cleanup(func()) -} - -// NewVersionBeacons creates a new instance of VersionBeacons. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewVersionBeacons(t mockConstructorTestingTNewVersionBeacons) *VersionBeacons { +}) *VersionBeacons { mock := &VersionBeacons{} mock.Mock.Test(t) From c9417d9d37a8fe6a495f639cce7cf42a6739d1c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Wed, 5 Jun 2024 08:01:53 -0700 Subject: [PATCH 5/5] fix tests --- engine/access/rpc/backend/backend_transactions_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/access/rpc/backend/backend_transactions_test.go b/engine/access/rpc/backend/backend_transactions_test.go index e68cdef9a4d..5d1c513cef8 100644 --- a/engine/access/rpc/backend/backend_transactions_test.go +++ b/engine/access/rpc/backend/backend_transactions_test.go @@ -206,7 +206,7 @@ func (suite *Suite) TestGetTransactionResultFromCache() { } suite.historicalAccessClient. - On("GetTransactionResult", mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*access.GetTransactionRequest")). + On("GetTransactionResult", mock.Anything, mock.AnythingOfType("*access.GetTransactionRequest")). Return(&transactionResultResponse, nil).Once() params := suite.defaultBackendParams() @@ -249,7 +249,7 @@ func (suite *Suite) TestGetTransactionResultFromCache() { func (suite *Suite) TestGetTransactionResultCacheNonExistent() { suite.withGetTransactionCachingTestSetup(func(block *flow.Block, tx *flow.Transaction) { suite.historicalAccessClient. - On("GetTransactionResult", mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*access.GetTransactionRequest")). + On("GetTransactionResult", mock.Anything, mock.AnythingOfType("*access.GetTransactionRequest")). Return(nil, status.Errorf(codes.NotFound, "no known transaction with ID %s", tx.ID())).Once() params := suite.defaultBackendParams() @@ -290,7 +290,7 @@ func (suite *Suite) TestGetTransactionResultCacheNonExistent() { func (suite *Suite) TestGetTransactionResultUnknownFromCache() { suite.withGetTransactionCachingTestSetup(func(block *flow.Block, tx *flow.Transaction) { suite.historicalAccessClient. - On("GetTransactionResult", mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*access.GetTransactionRequest")). + On("GetTransactionResult", mock.Anything, mock.AnythingOfType("*access.GetTransactionRequest")). Return(nil, status.Errorf(codes.NotFound, "no known transaction with ID %s", tx.ID())).Once() params := suite.defaultBackendParams()