From 28c86aa5b3b14aad7c51a8788a11217de357563a Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Tue, 20 Feb 2024 10:45:16 +0000 Subject: [PATCH 1/6] Update CHANGELOG.md --- CHANGELOG.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d4f16a0882..a4fa0368437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,8 +98,6 @@ configuration is as follows: ### Improvements -* [#5564](https://github.com/spacemeshos/go-spacemesh/pull/5564) Use decaying tags for fetch peers. This prevents - libp2p's Connection Manager from breaking sync. * [#5418](https://github.com/spacemeshos/go-spacemesh/pull/5418) Add `grpc-post-listener` to separate post service from `grpc-private-listener` and not require mTLS for the post service. @@ -107,6 +105,28 @@ configuration is as follows: make sure your post service now connects to `grpc-post-listener` instead of `grpc-private-listener`. If you are connecting to a remote post service over the internet we strongly recommend using mTLS via `grpc-tls-listener`. +## Release v1.3.10 + +### Improvements + +* [#5564](https://github.com/spacemeshos/go-spacemesh/pull/5564) Use decaying tags for fetch peers. This prevents + libp2p's Connection Manager from breaking sync. + +* [#5522](https://github.com/spacemeshos/go-spacemesh/pull/5522) Disable mesh agreement sync protocol. + It reduces number of requests for historical activation ids. + +* [#5571](https://github.com/spacemeshos/go-spacemesh/pull/5571) Adjust to 2.2M ATXs + +## Release v1.3.9 + +### Improvements + +* [#5530](https://github.com/spacemeshos/go-spacemesh/pull/5530) + Adjusted cache sizes for the increased number of ATXs on the network. + +* [#5511](https://github.com/spacemeshos/go-spacemesh/pull/5511) + Fix dialing peers on their private IPs, which was causing "portscan" complaints. + ## Release v1.3.8 ### Features From 21cc5a40bf856057d130e8a622418d7143fb58d7 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Wed, 21 Feb 2024 22:49:04 +0000 Subject: [PATCH 2/6] Restructure PostSupervisor to require NodeID on StartSession and PrepareInitializer --- Makefile | 2 +- activation/e2e/activation_test.go | 6 +- activation/e2e/nipost_test.go | 25 +- activation/e2e/validation_test.go | 6 +- activation/interface.go | 4 +- activation/mocks.go | 587 +++++++++--------- activation/post.go | 25 +- activation/post_supervisor.go | 7 +- activation/post_supervisor_test.go | 55 +- activation/post_test.go | 163 +++-- activation/post_verifier.go | 4 +- api/grpcserver/grpcserver_test.go | 37 +- api/grpcserver/interface.go | 2 +- api/grpcserver/mocks.go | 581 ++++++++--------- api/grpcserver/post_service_test.go | 14 +- api/grpcserver/smesher_service.go | 8 +- api/grpcserver/smesher_service_test.go | 10 +- beacon/mocks.go | 211 +++---- beacon/weakcoin/mocks.go | 71 +-- blocks/mocks/mocks.go | 141 ++--- bootstrap/mocks.go | 15 +- datastore/mocks/mocks.go | 29 +- fetch/mocks/mocks.go | 71 +-- genvm/core/mocks/handler.go | 71 +-- genvm/core/mocks/template.go | 85 +-- genvm/core/mocks/updater.go | 15 +- hare3/eligibility/mocks.go | 85 +-- log/log_mock.go | 113 ++-- malfeasance/mocks.go | 43 +- mesh/mocks/mocks.go | 113 ++-- miner/mocks/mocks.go | 113 ++-- node/node.go | 7 +- node/node_test.go | 9 +- p2p/pubsub/mocks/publisher.go | 57 +- p2p/server/mocks/mocks.go | 113 ++-- proposals/mocks.go | 141 ++--- proposals/util/util.go | 10 +- sql/localsql/0003_mocks.go | 29 +- sql/mocks.go | 57 +- sql/mocks/mocks.go | 15 +- syncer/blockssync/mocks.go | 15 +- syncer/mocks/mocks.go | 533 ++++++++-------- system/mocks/beacons.go | 29 +- system/mocks/fetcher.go | 253 ++++---- system/mocks/sync.go | 29 +- system/mocks/tortoise.go | 141 ++--- system/mocks/vm.go | 29 +- .../distributed_post_verification_test.go | 3 +- timesync/peersync/mocks/mocks.go | 29 +- txs/txs_mocks.go | 183 +++--- 50 files changed, 2224 insertions(+), 2170 deletions(-) diff --git a/Makefile b/Makefile index 128d3a73fd4..2f3843021c0 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ install: go mod download curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.54.2 go install github.com/spacemeshos/go-scale/scalegen@v1.1.12 - go install go.uber.org/mock/mockgen@v0.3.0 + go install go.uber.org/mock/mockgen@v0.4.0 go install gotest.tools/gotestsum@v1.10.1 go install honnef.co/go/tools/cmd/staticcheck@v0.4.5 .PHONY: install diff --git a/activation/e2e/activation_test.go b/activation/e2e/activation_test.go index d27b25ca578..70caf0c904c 100644 --- a/activation/e2e/activation_test.go +++ b/activation/e2e/activation_test.go @@ -66,12 +66,12 @@ func Test_BuilderWithMultipleClients(t *testing.T) { opts := opts eg.Go(func() error { validator := activation.NewMocknipostValidator(ctrl) - mgr, err := activation.NewPostSetupManager(sig.NodeID(), cfg, logger, cdb, goldenATX, syncer, validator) + mgr, err := activation.NewPostSetupManager(cfg, logger, cdb, goldenATX, syncer, validator) require.NoError(t, err) opts.DataDir = t.TempDir() - initPost(t, mgr, opts) - t.Cleanup(launchPostSupervisor(t, logger, mgr, grpcCfg, opts)) + initPost(t, mgr, opts, sig.NodeID()) + t.Cleanup(launchPostSupervisor(t, logger, mgr, sig.NodeID(), grpcCfg, opts)) require.Eventually(t, func() bool { _, err := svc.Client(sig.NodeID()) diff --git a/activation/e2e/nipost_test.go b/activation/e2e/nipost_test.go index 1ba62cef65d..923c438ff6b 100644 --- a/activation/e2e/nipost_test.go +++ b/activation/e2e/nipost_test.go @@ -64,6 +64,7 @@ func launchPostSupervisor( tb testing.TB, log *zap.Logger, mgr *activation.PostSetupManager, + id types.NodeID, cfg grpcserver.Config, postOpts activation.PostSetupOpts, ) func() { @@ -76,7 +77,7 @@ func launchPostSupervisor( ps, err := activation.NewPostSupervisor(log, cmdCfg, postCfg, provingOpts, mgr) require.NoError(tb, err) require.NotNil(tb, ps) - require.NoError(tb, ps.Start(postOpts)) + require.NoError(tb, ps.Start(postOpts, id)) return func() { assert.NoError(tb, ps.Stop(false)) } } @@ -99,12 +100,12 @@ func launchServer(tb testing.TB, services ...grpcserver.ServiceAPI) (grpcserver. return cfg, func() { assert.NoError(tb, server.Close()) } } -func initPost(tb testing.TB, mgr *activation.PostSetupManager, opts activation.PostSetupOpts) { +func initPost(tb testing.TB, mgr *activation.PostSetupManager, opts activation.PostSetupOpts, id types.NodeID) { tb.Helper() // Create data. - require.NoError(tb, mgr.PrepareInitializer(context.Background(), opts)) - require.NoError(tb, mgr.StartSession(context.Background())) + require.NoError(tb, mgr.PrepareInitializer(context.Background(), opts, id)) + require.NoError(tb, mgr.StartSession(context.Background(), id)) require.Equal(tb, activation.PostSetupStateComplete, mgr.Status().State) } @@ -128,14 +129,14 @@ func TestNIPostBuilderWithClients(t *testing.T) { }) validator := activation.NewMocknipostValidator(ctrl) - mgr, err := activation.NewPostSetupManager(sig.NodeID(), cfg, logger, cdb, goldenATX, syncer, validator) + mgr, err := activation.NewPostSetupManager(cfg, logger, cdb, goldenATX, syncer, validator) require.NoError(t, err) opts := activation.DefaultPostSetupOpts() opts.DataDir = t.TempDir() opts.ProviderID.SetUint32(initialization.CPUProviderID()) opts.Scrypt.N = 2 // Speedup initialization in tests. - initPost(t, mgr, opts) + initPost(t, mgr, opts, sig.NodeID()) // ensure that genesis aligns with layer timings genesis := time.Now().Add(layerDuration).Round(layerDuration) @@ -173,7 +174,7 @@ func TestNIPostBuilderWithClients(t *testing.T) { grpcCfg, cleanup := launchServer(t, svc) t.Cleanup(cleanup) - t.Cleanup(launchPostSupervisor(t, logger, mgr, grpcCfg, opts)) + t.Cleanup(launchPostSupervisor(t, logger, mgr, sig.NodeID(), grpcCfg, opts)) require.Eventually(t, func() bool { _, err := svc.Client(sig.NodeID()) @@ -274,7 +275,7 @@ func TestNewNIPostBuilderNotInitialized(t *testing.T) { }) validator := activation.NewMocknipostValidator(ctrl) - mgr, err := activation.NewPostSetupManager(sig.NodeID(), cfg, logger, cdb, goldenATX, syncer, validator) + mgr, err := activation.NewPostSetupManager(cfg, logger, cdb, goldenATX, syncer, validator) require.NoError(t, err) // ensure that genesis aligns with layer timings @@ -325,7 +326,7 @@ func TestNewNIPostBuilderNotInitialized(t *testing.T) { opts.DataDir = t.TempDir() opts.ProviderID.SetUint32(initialization.CPUProviderID()) opts.Scrypt.N = 2 // Speedup initialization in tests. - t.Cleanup(launchPostSupervisor(t, logger, mgr, grpcCfg, opts)) + t.Cleanup(launchPostSupervisor(t, logger, mgr, sig.NodeID(), grpcCfg, opts)) require.Eventually(t, func() bool { _, err := svc.Client(sig.NodeID()) @@ -393,12 +394,12 @@ func Test_NIPostBuilderWithMultipleClients(t *testing.T) { sig := sig opts := opts eg.Go(func() error { - mgr, err := activation.NewPostSetupManager(sig.NodeID(), cfg, logger, cdb, goldenATX, syncer, validator) + mgr, err := activation.NewPostSetupManager(cfg, logger, cdb, goldenATX, syncer, validator) require.NoError(t, err) opts.DataDir = t.TempDir() - initPost(t, mgr, opts) - t.Cleanup(launchPostSupervisor(t, logger, mgr, grpcCfg, opts)) + initPost(t, mgr, opts, sig.NodeID()) + t.Cleanup(launchPostSupervisor(t, logger, mgr, sig.NodeID(), grpcCfg, opts)) require.Eventually(t, func() bool { _, err := svc.Client(sig.NodeID()) diff --git a/activation/e2e/validation_test.go b/activation/e2e/validation_test.go index 376a059f91e..045e0fc407b 100644 --- a/activation/e2e/validation_test.go +++ b/activation/e2e/validation_test.go @@ -42,14 +42,14 @@ func TestValidator_Validate(t *testing.T) { return synced }) - mgr, err := activation.NewPostSetupManager(sig.NodeID(), cfg, logger, cdb, goldenATX, syncer, validator) + mgr, err := activation.NewPostSetupManager(cfg, logger, cdb, goldenATX, syncer, validator) require.NoError(t, err) opts := activation.DefaultPostSetupOpts() opts.DataDir = t.TempDir() opts.ProviderID.SetUint32(initialization.CPUProviderID()) opts.Scrypt.N = 2 // Speedup initialization in tests. - initPost(t, mgr, opts) + initPost(t, mgr, opts, sig.NodeID()) // ensure that genesis aligns with layer timings genesis := time.Now().Add(layerDuration).Round(layerDuration) @@ -87,7 +87,7 @@ func TestValidator_Validate(t *testing.T) { grpcCfg, cleanup := launchServer(t, svc) t.Cleanup(cleanup) - t.Cleanup(launchPostSupervisor(t, logger, mgr, grpcCfg, opts)) + t.Cleanup(launchPostSupervisor(t, logger, mgr, sig.NodeID(), grpcCfg, opts)) require.Eventually(t, func() bool { _, err := svc.Client(sig.NodeID()) diff --git a/activation/interface.go b/activation/interface.go index e196f9eeeb6..05ab56aa5ae 100644 --- a/activation/interface.go +++ b/activation/interface.go @@ -97,8 +97,8 @@ type atxProvider interface { // This interface is used by the atx builder and currently implemented by the PostSetupManager. // Eventually most of the functionality will be moved to the PoSTClient. type postSetupProvider interface { - PrepareInitializer(ctx context.Context, opts PostSetupOpts) error - StartSession(context context.Context) error + PrepareInitializer(ctx context.Context, opts PostSetupOpts, id types.NodeID) error + StartSession(context context.Context, id types.NodeID) error Status() *PostSetupStatus Reset() error } diff --git a/activation/mocks.go b/activation/mocks.go index d59cb7a83ea..3456b0bda7a 100644 --- a/activation/mocks.go +++ b/activation/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=activation -destination=./mocks.go -source=./interface.go // + // Package activation is a generated GoMock package. package activation @@ -51,31 +52,31 @@ func (m *MockAtxReceiver) OnAtx(arg0 *types.ActivationTxHeader) { } // OnAtx indicates an expected call of OnAtx. -func (mr *MockAtxReceiverMockRecorder) OnAtx(arg0 any) *AtxReceiverOnAtxCall { +func (mr *MockAtxReceiverMockRecorder) OnAtx(arg0 any) *MockAtxReceiverOnAtxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnAtx", reflect.TypeOf((*MockAtxReceiver)(nil).OnAtx), arg0) - return &AtxReceiverOnAtxCall{Call: call} + return &MockAtxReceiverOnAtxCall{Call: call} } -// AtxReceiverOnAtxCall wrap *gomock.Call -type AtxReceiverOnAtxCall struct { +// MockAtxReceiverOnAtxCall wrap *gomock.Call +type MockAtxReceiverOnAtxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *AtxReceiverOnAtxCall) Return() *AtxReceiverOnAtxCall { +func (c *MockAtxReceiverOnAtxCall) Return() *MockAtxReceiverOnAtxCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *AtxReceiverOnAtxCall) Do(f func(*types.ActivationTxHeader)) *AtxReceiverOnAtxCall { +func (c *MockAtxReceiverOnAtxCall) Do(f func(*types.ActivationTxHeader)) *MockAtxReceiverOnAtxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *AtxReceiverOnAtxCall) DoAndReturn(f func(*types.ActivationTxHeader)) *AtxReceiverOnAtxCall { +func (c *MockAtxReceiverOnAtxCall) DoAndReturn(f func(*types.ActivationTxHeader)) *MockAtxReceiverOnAtxCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -112,31 +113,31 @@ func (m *MockPostVerifier) Close() error { } // Close indicates an expected call of Close. -func (mr *MockPostVerifierMockRecorder) Close() *PostVerifierCloseCall { +func (mr *MockPostVerifierMockRecorder) Close() *MockPostVerifierCloseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPostVerifier)(nil).Close)) - return &PostVerifierCloseCall{Call: call} + return &MockPostVerifierCloseCall{Call: call} } -// PostVerifierCloseCall wrap *gomock.Call -type PostVerifierCloseCall struct { +// MockPostVerifierCloseCall wrap *gomock.Call +type MockPostVerifierCloseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PostVerifierCloseCall) Return(arg0 error) *PostVerifierCloseCall { +func (c *MockPostVerifierCloseCall) Return(arg0 error) *MockPostVerifierCloseCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *PostVerifierCloseCall) Do(f func() error) *PostVerifierCloseCall { +func (c *MockPostVerifierCloseCall) Do(f func() error) *MockPostVerifierCloseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PostVerifierCloseCall) DoAndReturn(f func() error) *PostVerifierCloseCall { +func (c *MockPostVerifierCloseCall) DoAndReturn(f func() error) *MockPostVerifierCloseCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -154,32 +155,32 @@ func (m_2 *MockPostVerifier) Verify(ctx context.Context, p *shared.Proof, m *sha } // Verify indicates an expected call of Verify. -func (mr *MockPostVerifierMockRecorder) Verify(ctx, p, m any, opts ...any) *PostVerifierVerifyCall { +func (mr *MockPostVerifierMockRecorder) Verify(ctx, p, m any, opts ...any) *MockPostVerifierVerifyCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, p, m}, opts...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockPostVerifier)(nil).Verify), varargs...) - return &PostVerifierVerifyCall{Call: call} + return &MockPostVerifierVerifyCall{Call: call} } -// PostVerifierVerifyCall wrap *gomock.Call -type PostVerifierVerifyCall struct { +// MockPostVerifierVerifyCall wrap *gomock.Call +type MockPostVerifierVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PostVerifierVerifyCall) Return(arg0 error) *PostVerifierVerifyCall { +func (c *MockPostVerifierVerifyCall) Return(arg0 error) *MockPostVerifierVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *PostVerifierVerifyCall) Do(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *PostVerifierVerifyCall { +func (c *MockPostVerifierVerifyCall) Do(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *MockPostVerifierVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PostVerifierVerifyCall) DoAndReturn(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *PostVerifierVerifyCall { +func (c *MockPostVerifierVerifyCall) DoAndReturn(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *MockPostVerifierVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -214,31 +215,31 @@ func (m *Mockscaler) scale(arg0 int) { } // scale indicates an expected call of scale. -func (mr *MockscalerMockRecorder) scale(arg0 any) *scalerscaleCall { +func (mr *MockscalerMockRecorder) scale(arg0 any) *MockscalerscaleCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "scale", reflect.TypeOf((*Mockscaler)(nil).scale), arg0) - return &scalerscaleCall{Call: call} + return &MockscalerscaleCall{Call: call} } -// scalerscaleCall wrap *gomock.Call -type scalerscaleCall struct { +// MockscalerscaleCall wrap *gomock.Call +type MockscalerscaleCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *scalerscaleCall) Return() *scalerscaleCall { +func (c *MockscalerscaleCall) Return() *MockscalerscaleCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *scalerscaleCall) Do(f func(int)) *scalerscaleCall { +func (c *MockscalerscaleCall) Do(f func(int)) *MockscalerscaleCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *scalerscaleCall) DoAndReturn(f func(int)) *scalerscaleCall { +func (c *MockscalerscaleCall) DoAndReturn(f func(int)) *MockscalerscaleCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -275,31 +276,31 @@ func (m *MocknipostValidator) InitialNIPostChallenge(challenge *types.NIPostChal } // InitialNIPostChallenge indicates an expected call of InitialNIPostChallenge. -func (mr *MocknipostValidatorMockRecorder) InitialNIPostChallenge(challenge, atxs, goldenATXID any) *nipostValidatorInitialNIPostChallengeCall { +func (mr *MocknipostValidatorMockRecorder) InitialNIPostChallenge(challenge, atxs, goldenATXID any) *MocknipostValidatorInitialNIPostChallengeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialNIPostChallenge", reflect.TypeOf((*MocknipostValidator)(nil).InitialNIPostChallenge), challenge, atxs, goldenATXID) - return &nipostValidatorInitialNIPostChallengeCall{Call: call} + return &MocknipostValidatorInitialNIPostChallengeCall{Call: call} } -// nipostValidatorInitialNIPostChallengeCall wrap *gomock.Call -type nipostValidatorInitialNIPostChallengeCall struct { +// MocknipostValidatorInitialNIPostChallengeCall wrap *gomock.Call +type MocknipostValidatorInitialNIPostChallengeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorInitialNIPostChallengeCall) Return(arg0 error) *nipostValidatorInitialNIPostChallengeCall { +func (c *MocknipostValidatorInitialNIPostChallengeCall) Return(arg0 error) *MocknipostValidatorInitialNIPostChallengeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorInitialNIPostChallengeCall) Do(f func(*types.NIPostChallenge, atxProvider, types.ATXID) error) *nipostValidatorInitialNIPostChallengeCall { +func (c *MocknipostValidatorInitialNIPostChallengeCall) Do(f func(*types.NIPostChallenge, atxProvider, types.ATXID) error) *MocknipostValidatorInitialNIPostChallengeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorInitialNIPostChallengeCall) DoAndReturn(f func(*types.NIPostChallenge, atxProvider, types.ATXID) error) *nipostValidatorInitialNIPostChallengeCall { +func (c *MocknipostValidatorInitialNIPostChallengeCall) DoAndReturn(f func(*types.NIPostChallenge, atxProvider, types.ATXID) error) *MocknipostValidatorInitialNIPostChallengeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -313,31 +314,31 @@ func (m *MocknipostValidator) IsVerifyingFullPost() bool { } // IsVerifyingFullPost indicates an expected call of IsVerifyingFullPost. -func (mr *MocknipostValidatorMockRecorder) IsVerifyingFullPost() *nipostValidatorIsVerifyingFullPostCall { +func (mr *MocknipostValidatorMockRecorder) IsVerifyingFullPost() *MocknipostValidatorIsVerifyingFullPostCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsVerifyingFullPost", reflect.TypeOf((*MocknipostValidator)(nil).IsVerifyingFullPost)) - return &nipostValidatorIsVerifyingFullPostCall{Call: call} + return &MocknipostValidatorIsVerifyingFullPostCall{Call: call} } -// nipostValidatorIsVerifyingFullPostCall wrap *gomock.Call -type nipostValidatorIsVerifyingFullPostCall struct { +// MocknipostValidatorIsVerifyingFullPostCall wrap *gomock.Call +type MocknipostValidatorIsVerifyingFullPostCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorIsVerifyingFullPostCall) Return(arg0 bool) *nipostValidatorIsVerifyingFullPostCall { +func (c *MocknipostValidatorIsVerifyingFullPostCall) Return(arg0 bool) *MocknipostValidatorIsVerifyingFullPostCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorIsVerifyingFullPostCall) Do(f func() bool) *nipostValidatorIsVerifyingFullPostCall { +func (c *MocknipostValidatorIsVerifyingFullPostCall) Do(f func() bool) *MocknipostValidatorIsVerifyingFullPostCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorIsVerifyingFullPostCall) DoAndReturn(f func() bool) *nipostValidatorIsVerifyingFullPostCall { +func (c *MocknipostValidatorIsVerifyingFullPostCall) DoAndReturn(f func() bool) *MocknipostValidatorIsVerifyingFullPostCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -356,32 +357,32 @@ func (m *MocknipostValidator) NIPost(ctx context.Context, nodeId types.NodeID, c } // NIPost indicates an expected call of NIPost. -func (mr *MocknipostValidatorMockRecorder) NIPost(ctx, nodeId, commitmentAtxId, NIPost, expectedChallenge, numUnits any, opts ...any) *nipostValidatorNIPostCall { +func (mr *MocknipostValidatorMockRecorder) NIPost(ctx, nodeId, commitmentAtxId, NIPost, expectedChallenge, numUnits any, opts ...any) *MocknipostValidatorNIPostCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, nodeId, commitmentAtxId, NIPost, expectedChallenge, numUnits}, opts...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NIPost", reflect.TypeOf((*MocknipostValidator)(nil).NIPost), varargs...) - return &nipostValidatorNIPostCall{Call: call} + return &MocknipostValidatorNIPostCall{Call: call} } -// nipostValidatorNIPostCall wrap *gomock.Call -type nipostValidatorNIPostCall struct { +// MocknipostValidatorNIPostCall wrap *gomock.Call +type MocknipostValidatorNIPostCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorNIPostCall) Return(arg0 uint64, arg1 error) *nipostValidatorNIPostCall { +func (c *MocknipostValidatorNIPostCall) Return(arg0 uint64, arg1 error) *MocknipostValidatorNIPostCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorNIPostCall) Do(f func(context.Context, types.NodeID, types.ATXID, *types.NIPost, types.Hash32, uint32, ...validatorOption) (uint64, error)) *nipostValidatorNIPostCall { +func (c *MocknipostValidatorNIPostCall) Do(f func(context.Context, types.NodeID, types.ATXID, *types.NIPost, types.Hash32, uint32, ...validatorOption) (uint64, error)) *MocknipostValidatorNIPostCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorNIPostCall) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.NIPost, types.Hash32, uint32, ...validatorOption) (uint64, error)) *nipostValidatorNIPostCall { +func (c *MocknipostValidatorNIPostCall) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.NIPost, types.Hash32, uint32, ...validatorOption) (uint64, error)) *MocknipostValidatorNIPostCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -395,31 +396,31 @@ func (m *MocknipostValidator) NIPostChallenge(challenge *types.NIPostChallenge, } // NIPostChallenge indicates an expected call of NIPostChallenge. -func (mr *MocknipostValidatorMockRecorder) NIPostChallenge(challenge, atxs, nodeID any) *nipostValidatorNIPostChallengeCall { +func (mr *MocknipostValidatorMockRecorder) NIPostChallenge(challenge, atxs, nodeID any) *MocknipostValidatorNIPostChallengeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NIPostChallenge", reflect.TypeOf((*MocknipostValidator)(nil).NIPostChallenge), challenge, atxs, nodeID) - return &nipostValidatorNIPostChallengeCall{Call: call} + return &MocknipostValidatorNIPostChallengeCall{Call: call} } -// nipostValidatorNIPostChallengeCall wrap *gomock.Call -type nipostValidatorNIPostChallengeCall struct { +// MocknipostValidatorNIPostChallengeCall wrap *gomock.Call +type MocknipostValidatorNIPostChallengeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorNIPostChallengeCall) Return(arg0 error) *nipostValidatorNIPostChallengeCall { +func (c *MocknipostValidatorNIPostChallengeCall) Return(arg0 error) *MocknipostValidatorNIPostChallengeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorNIPostChallengeCall) Do(f func(*types.NIPostChallenge, atxProvider, types.NodeID) error) *nipostValidatorNIPostChallengeCall { +func (c *MocknipostValidatorNIPostChallengeCall) Do(f func(*types.NIPostChallenge, atxProvider, types.NodeID) error) *MocknipostValidatorNIPostChallengeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorNIPostChallengeCall) DoAndReturn(f func(*types.NIPostChallenge, atxProvider, types.NodeID) error) *nipostValidatorNIPostChallengeCall { +func (c *MocknipostValidatorNIPostChallengeCall) DoAndReturn(f func(*types.NIPostChallenge, atxProvider, types.NodeID) error) *MocknipostValidatorNIPostChallengeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -433,31 +434,31 @@ func (m *MocknipostValidator) NumUnits(cfg *PostConfig, numUnits uint32) error { } // NumUnits indicates an expected call of NumUnits. -func (mr *MocknipostValidatorMockRecorder) NumUnits(cfg, numUnits any) *nipostValidatorNumUnitsCall { +func (mr *MocknipostValidatorMockRecorder) NumUnits(cfg, numUnits any) *MocknipostValidatorNumUnitsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NumUnits", reflect.TypeOf((*MocknipostValidator)(nil).NumUnits), cfg, numUnits) - return &nipostValidatorNumUnitsCall{Call: call} + return &MocknipostValidatorNumUnitsCall{Call: call} } -// nipostValidatorNumUnitsCall wrap *gomock.Call -type nipostValidatorNumUnitsCall struct { +// MocknipostValidatorNumUnitsCall wrap *gomock.Call +type MocknipostValidatorNumUnitsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorNumUnitsCall) Return(arg0 error) *nipostValidatorNumUnitsCall { +func (c *MocknipostValidatorNumUnitsCall) Return(arg0 error) *MocknipostValidatorNumUnitsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorNumUnitsCall) Do(f func(*PostConfig, uint32) error) *nipostValidatorNumUnitsCall { +func (c *MocknipostValidatorNumUnitsCall) Do(f func(*PostConfig, uint32) error) *MocknipostValidatorNumUnitsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorNumUnitsCall) DoAndReturn(f func(*PostConfig, uint32) error) *nipostValidatorNumUnitsCall { +func (c *MocknipostValidatorNumUnitsCall) DoAndReturn(f func(*PostConfig, uint32) error) *MocknipostValidatorNumUnitsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -471,31 +472,31 @@ func (m *MocknipostValidator) PositioningAtx(id types.ATXID, atxs atxProvider, g } // PositioningAtx indicates an expected call of PositioningAtx. -func (mr *MocknipostValidatorMockRecorder) PositioningAtx(id, atxs, goldenATXID, pubepoch any) *nipostValidatorPositioningAtxCall { +func (mr *MocknipostValidatorMockRecorder) PositioningAtx(id, atxs, goldenATXID, pubepoch any) *MocknipostValidatorPositioningAtxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PositioningAtx", reflect.TypeOf((*MocknipostValidator)(nil).PositioningAtx), id, atxs, goldenATXID, pubepoch) - return &nipostValidatorPositioningAtxCall{Call: call} + return &MocknipostValidatorPositioningAtxCall{Call: call} } -// nipostValidatorPositioningAtxCall wrap *gomock.Call -type nipostValidatorPositioningAtxCall struct { +// MocknipostValidatorPositioningAtxCall wrap *gomock.Call +type MocknipostValidatorPositioningAtxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorPositioningAtxCall) Return(arg0 error) *nipostValidatorPositioningAtxCall { +func (c *MocknipostValidatorPositioningAtxCall) Return(arg0 error) *MocknipostValidatorPositioningAtxCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorPositioningAtxCall) Do(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *nipostValidatorPositioningAtxCall { +func (c *MocknipostValidatorPositioningAtxCall) Do(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *MocknipostValidatorPositioningAtxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorPositioningAtxCall) DoAndReturn(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *nipostValidatorPositioningAtxCall { +func (c *MocknipostValidatorPositioningAtxCall) DoAndReturn(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *MocknipostValidatorPositioningAtxCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -513,32 +514,32 @@ func (m *MocknipostValidator) Post(ctx context.Context, nodeId types.NodeID, com } // Post indicates an expected call of Post. -func (mr *MocknipostValidatorMockRecorder) Post(ctx, nodeId, commitmentAtxId, Post, PostMetadata, numUnits any, opts ...any) *nipostValidatorPostCall { +func (mr *MocknipostValidatorMockRecorder) Post(ctx, nodeId, commitmentAtxId, Post, PostMetadata, numUnits any, opts ...any) *MocknipostValidatorPostCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, nodeId, commitmentAtxId, Post, PostMetadata, numUnits}, opts...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MocknipostValidator)(nil).Post), varargs...) - return &nipostValidatorPostCall{Call: call} + return &MocknipostValidatorPostCall{Call: call} } -// nipostValidatorPostCall wrap *gomock.Call -type nipostValidatorPostCall struct { +// MocknipostValidatorPostCall wrap *gomock.Call +type MocknipostValidatorPostCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorPostCall) Return(arg0 error) *nipostValidatorPostCall { +func (c *MocknipostValidatorPostCall) Return(arg0 error) *MocknipostValidatorPostCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorPostCall) Do(f func(context.Context, types.NodeID, types.ATXID, *types.Post, *types.PostMetadata, uint32, ...validatorOption) error) *nipostValidatorPostCall { +func (c *MocknipostValidatorPostCall) Do(f func(context.Context, types.NodeID, types.ATXID, *types.Post, *types.PostMetadata, uint32, ...validatorOption) error) *MocknipostValidatorPostCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorPostCall) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.Post, *types.PostMetadata, uint32, ...validatorOption) error) *nipostValidatorPostCall { +func (c *MocknipostValidatorPostCall) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.Post, *types.PostMetadata, uint32, ...validatorOption) error) *MocknipostValidatorPostCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -552,31 +553,31 @@ func (m *MocknipostValidator) PostMetadata(cfg *PostConfig, metadata *types.Post } // PostMetadata indicates an expected call of PostMetadata. -func (mr *MocknipostValidatorMockRecorder) PostMetadata(cfg, metadata any) *nipostValidatorPostMetadataCall { +func (mr *MocknipostValidatorMockRecorder) PostMetadata(cfg, metadata any) *MocknipostValidatorPostMetadataCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostMetadata", reflect.TypeOf((*MocknipostValidator)(nil).PostMetadata), cfg, metadata) - return &nipostValidatorPostMetadataCall{Call: call} + return &MocknipostValidatorPostMetadataCall{Call: call} } -// nipostValidatorPostMetadataCall wrap *gomock.Call -type nipostValidatorPostMetadataCall struct { +// MocknipostValidatorPostMetadataCall wrap *gomock.Call +type MocknipostValidatorPostMetadataCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorPostMetadataCall) Return(arg0 error) *nipostValidatorPostMetadataCall { +func (c *MocknipostValidatorPostMetadataCall) Return(arg0 error) *MocknipostValidatorPostMetadataCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorPostMetadataCall) Do(f func(*PostConfig, *types.PostMetadata) error) *nipostValidatorPostMetadataCall { +func (c *MocknipostValidatorPostMetadataCall) Do(f func(*PostConfig, *types.PostMetadata) error) *MocknipostValidatorPostMetadataCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorPostMetadataCall) DoAndReturn(f func(*PostConfig, *types.PostMetadata) error) *nipostValidatorPostMetadataCall { +func (c *MocknipostValidatorPostMetadataCall) DoAndReturn(f func(*PostConfig, *types.PostMetadata) error) *MocknipostValidatorPostMetadataCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -590,31 +591,31 @@ func (m *MocknipostValidator) VRFNonce(nodeId types.NodeID, commitmentAtxId type } // VRFNonce indicates an expected call of VRFNonce. -func (mr *MocknipostValidatorMockRecorder) VRFNonce(nodeId, commitmentAtxId, vrfNonce, PostMetadata, numUnits any) *nipostValidatorVRFNonceCall { +func (mr *MocknipostValidatorMockRecorder) VRFNonce(nodeId, commitmentAtxId, vrfNonce, PostMetadata, numUnits any) *MocknipostValidatorVRFNonceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VRFNonce", reflect.TypeOf((*MocknipostValidator)(nil).VRFNonce), nodeId, commitmentAtxId, vrfNonce, PostMetadata, numUnits) - return &nipostValidatorVRFNonceCall{Call: call} + return &MocknipostValidatorVRFNonceCall{Call: call} } -// nipostValidatorVRFNonceCall wrap *gomock.Call -type nipostValidatorVRFNonceCall struct { +// MocknipostValidatorVRFNonceCall wrap *gomock.Call +type MocknipostValidatorVRFNonceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorVRFNonceCall) Return(arg0 error) *nipostValidatorVRFNonceCall { +func (c *MocknipostValidatorVRFNonceCall) Return(arg0 error) *MocknipostValidatorVRFNonceCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorVRFNonceCall) Do(f func(types.NodeID, types.ATXID, *types.VRFPostIndex, *types.PostMetadata, uint32) error) *nipostValidatorVRFNonceCall { +func (c *MocknipostValidatorVRFNonceCall) Do(f func(types.NodeID, types.ATXID, *types.VRFPostIndex, *types.PostMetadata, uint32) error) *MocknipostValidatorVRFNonceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorVRFNonceCall) DoAndReturn(f func(types.NodeID, types.ATXID, *types.VRFPostIndex, *types.PostMetadata, uint32) error) *nipostValidatorVRFNonceCall { +func (c *MocknipostValidatorVRFNonceCall) DoAndReturn(f func(types.NodeID, types.ATXID, *types.VRFPostIndex, *types.PostMetadata, uint32) error) *MocknipostValidatorVRFNonceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -632,32 +633,32 @@ func (m *MocknipostValidator) VerifyChain(ctx context.Context, id, goldenATXID t } // VerifyChain indicates an expected call of VerifyChain. -func (mr *MocknipostValidatorMockRecorder) VerifyChain(ctx, id, goldenATXID any, opts ...any) *nipostValidatorVerifyChainCall { +func (mr *MocknipostValidatorMockRecorder) VerifyChain(ctx, id, goldenATXID any, opts ...any) *MocknipostValidatorVerifyChainCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, id, goldenATXID}, opts...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyChain", reflect.TypeOf((*MocknipostValidator)(nil).VerifyChain), varargs...) - return &nipostValidatorVerifyChainCall{Call: call} + return &MocknipostValidatorVerifyChainCall{Call: call} } -// nipostValidatorVerifyChainCall wrap *gomock.Call -type nipostValidatorVerifyChainCall struct { +// MocknipostValidatorVerifyChainCall wrap *gomock.Call +type MocknipostValidatorVerifyChainCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostValidatorVerifyChainCall) Return(arg0 error) *nipostValidatorVerifyChainCall { +func (c *MocknipostValidatorVerifyChainCall) Return(arg0 error) *MocknipostValidatorVerifyChainCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostValidatorVerifyChainCall) Do(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *nipostValidatorVerifyChainCall { +func (c *MocknipostValidatorVerifyChainCall) Do(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *MocknipostValidatorVerifyChainCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostValidatorVerifyChainCall) DoAndReturn(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *nipostValidatorVerifyChainCall { +func (c *MocknipostValidatorVerifyChainCall) DoAndReturn(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *MocknipostValidatorVerifyChainCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -694,31 +695,31 @@ func (m *MocklayerClock) AwaitLayer(layerID types.LayerID) <-chan struct{} { } // AwaitLayer indicates an expected call of AwaitLayer. -func (mr *MocklayerClockMockRecorder) AwaitLayer(layerID any) *layerClockAwaitLayerCall { +func (mr *MocklayerClockMockRecorder) AwaitLayer(layerID any) *MocklayerClockAwaitLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AwaitLayer", reflect.TypeOf((*MocklayerClock)(nil).AwaitLayer), layerID) - return &layerClockAwaitLayerCall{Call: call} + return &MocklayerClockAwaitLayerCall{Call: call} } -// layerClockAwaitLayerCall wrap *gomock.Call -type layerClockAwaitLayerCall struct { +// MocklayerClockAwaitLayerCall wrap *gomock.Call +type MocklayerClockAwaitLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -732,31 +733,31 @@ func (m *MocklayerClock) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MocklayerClockMockRecorder) CurrentLayer() *layerClockCurrentLayerCall { +func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer)) - return &layerClockCurrentLayerCall{Call: call} + return &MocklayerClockCurrentLayerCall{Call: call} } -// layerClockCurrentLayerCall wrap *gomock.Call -type layerClockCurrentLayerCall struct { +// MocklayerClockCurrentLayerCall wrap *gomock.Call +type MocklayerClockCurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockCurrentLayerCall) Return(arg0 types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockCurrentLayerCall) Do(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -770,31 +771,31 @@ func (m *MocklayerClock) LayerToTime(arg0 types.LayerID) time.Time { } // LayerToTime indicates an expected call of LayerToTime. -func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *layerClockLayerToTimeCall { +func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *MocklayerClockLayerToTimeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LayerToTime", reflect.TypeOf((*MocklayerClock)(nil).LayerToTime), arg0) - return &layerClockLayerToTimeCall{Call: call} + return &MocklayerClockLayerToTimeCall{Call: call} } -// layerClockLayerToTimeCall wrap *gomock.Call -type layerClockLayerToTimeCall struct { +// MocklayerClockLayerToTimeCall wrap *gomock.Call +type MocklayerClockLayerToTimeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockLayerToTimeCall) Return(arg0 time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) Return(arg0 time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -832,31 +833,31 @@ func (m *MocknipostBuilder) BuildNIPost(ctx context.Context, sig *signing.EdSign } // BuildNIPost indicates an expected call of BuildNIPost. -func (mr *MocknipostBuilderMockRecorder) BuildNIPost(ctx, sig, challenge any) *nipostBuilderBuildNIPostCall { +func (mr *MocknipostBuilderMockRecorder) BuildNIPost(ctx, sig, challenge any) *MocknipostBuilderBuildNIPostCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildNIPost", reflect.TypeOf((*MocknipostBuilder)(nil).BuildNIPost), ctx, sig, challenge) - return &nipostBuilderBuildNIPostCall{Call: call} + return &MocknipostBuilderBuildNIPostCall{Call: call} } -// nipostBuilderBuildNIPostCall wrap *gomock.Call -type nipostBuilderBuildNIPostCall struct { +// MocknipostBuilderBuildNIPostCall wrap *gomock.Call +type MocknipostBuilderBuildNIPostCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostBuilderBuildNIPostCall) Return(arg0 *nipost.NIPostState, arg1 error) *nipostBuilderBuildNIPostCall { +func (c *MocknipostBuilderBuildNIPostCall) Return(arg0 *nipost.NIPostState, arg1 error) *MocknipostBuilderBuildNIPostCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *nipostBuilderBuildNIPostCall) Do(f func(context.Context, *signing.EdSigner, *types.NIPostChallenge) (*nipost.NIPostState, error)) *nipostBuilderBuildNIPostCall { +func (c *MocknipostBuilderBuildNIPostCall) Do(f func(context.Context, *signing.EdSigner, *types.NIPostChallenge) (*nipost.NIPostState, error)) *MocknipostBuilderBuildNIPostCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostBuilderBuildNIPostCall) DoAndReturn(f func(context.Context, *signing.EdSigner, *types.NIPostChallenge) (*nipost.NIPostState, error)) *nipostBuilderBuildNIPostCall { +func (c *MocknipostBuilderBuildNIPostCall) DoAndReturn(f func(context.Context, *signing.EdSigner, *types.NIPostChallenge) (*nipost.NIPostState, error)) *MocknipostBuilderBuildNIPostCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -872,31 +873,31 @@ func (m *MocknipostBuilder) Proof(ctx context.Context, nodeID types.NodeID, chal } // Proof indicates an expected call of Proof. -func (mr *MocknipostBuilderMockRecorder) Proof(ctx, nodeID, challenge any) *nipostBuilderProofCall { +func (mr *MocknipostBuilderMockRecorder) Proof(ctx, nodeID, challenge any) *MocknipostBuilderProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proof", reflect.TypeOf((*MocknipostBuilder)(nil).Proof), ctx, nodeID, challenge) - return &nipostBuilderProofCall{Call: call} + return &MocknipostBuilderProofCall{Call: call} } -// nipostBuilderProofCall wrap *gomock.Call -type nipostBuilderProofCall struct { +// MocknipostBuilderProofCall wrap *gomock.Call +type MocknipostBuilderProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostBuilderProofCall) Return(arg0 *types.Post, arg1 *types.PostInfo, arg2 error) *nipostBuilderProofCall { +func (c *MocknipostBuilderProofCall) Return(arg0 *types.Post, arg1 *types.PostInfo, arg2 error) *MocknipostBuilderProofCall { c.Call = c.Call.Return(arg0, arg1, arg2) return c } // Do rewrite *gomock.Call.Do -func (c *nipostBuilderProofCall) Do(f func(context.Context, types.NodeID, []byte) (*types.Post, *types.PostInfo, error)) *nipostBuilderProofCall { +func (c *MocknipostBuilderProofCall) Do(f func(context.Context, types.NodeID, []byte) (*types.Post, *types.PostInfo, error)) *MocknipostBuilderProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostBuilderProofCall) DoAndReturn(f func(context.Context, types.NodeID, []byte) (*types.Post, *types.PostInfo, error)) *nipostBuilderProofCall { +func (c *MocknipostBuilderProofCall) DoAndReturn(f func(context.Context, types.NodeID, []byte) (*types.Post, *types.PostInfo, error)) *MocknipostBuilderProofCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -910,31 +911,31 @@ func (m *MocknipostBuilder) ResetState(arg0 types.NodeID) error { } // ResetState indicates an expected call of ResetState. -func (mr *MocknipostBuilderMockRecorder) ResetState(arg0 any) *nipostBuilderResetStateCall { +func (mr *MocknipostBuilderMockRecorder) ResetState(arg0 any) *MocknipostBuilderResetStateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetState", reflect.TypeOf((*MocknipostBuilder)(nil).ResetState), arg0) - return &nipostBuilderResetStateCall{Call: call} + return &MocknipostBuilderResetStateCall{Call: call} } -// nipostBuilderResetStateCall wrap *gomock.Call -type nipostBuilderResetStateCall struct { +// MocknipostBuilderResetStateCall wrap *gomock.Call +type MocknipostBuilderResetStateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nipostBuilderResetStateCall) Return(arg0 error) *nipostBuilderResetStateCall { +func (c *MocknipostBuilderResetStateCall) Return(arg0 error) *MocknipostBuilderResetStateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *nipostBuilderResetStateCall) Do(f func(types.NodeID) error) *nipostBuilderResetStateCall { +func (c *MocknipostBuilderResetStateCall) Do(f func(types.NodeID) error) *MocknipostBuilderResetStateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nipostBuilderResetStateCall) DoAndReturn(f func(types.NodeID) error) *nipostBuilderResetStateCall { +func (c *MocknipostBuilderResetStateCall) DoAndReturn(f func(types.NodeID) error) *MocknipostBuilderResetStateCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -971,31 +972,31 @@ func (m *Mocksyncer) RegisterForATXSynced() <-chan struct{} { } // RegisterForATXSynced indicates an expected call of RegisterForATXSynced. -func (mr *MocksyncerMockRecorder) RegisterForATXSynced() *syncerRegisterForATXSyncedCall { +func (mr *MocksyncerMockRecorder) RegisterForATXSynced() *MocksyncerRegisterForATXSyncedCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterForATXSynced", reflect.TypeOf((*Mocksyncer)(nil).RegisterForATXSynced)) - return &syncerRegisterForATXSyncedCall{Call: call} + return &MocksyncerRegisterForATXSyncedCall{Call: call} } -// syncerRegisterForATXSyncedCall wrap *gomock.Call -type syncerRegisterForATXSyncedCall struct { +// MocksyncerRegisterForATXSyncedCall wrap *gomock.Call +type MocksyncerRegisterForATXSyncedCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *syncerRegisterForATXSyncedCall) Return(arg0 <-chan struct{}) *syncerRegisterForATXSyncedCall { +func (c *MocksyncerRegisterForATXSyncedCall) Return(arg0 <-chan struct{}) *MocksyncerRegisterForATXSyncedCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *syncerRegisterForATXSyncedCall) Do(f func() <-chan struct{}) *syncerRegisterForATXSyncedCall { +func (c *MocksyncerRegisterForATXSyncedCall) Do(f func() <-chan struct{}) *MocksyncerRegisterForATXSyncedCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *syncerRegisterForATXSyncedCall) DoAndReturn(f func() <-chan struct{}) *syncerRegisterForATXSyncedCall { +func (c *MocksyncerRegisterForATXSyncedCall) DoAndReturn(f func() <-chan struct{}) *MocksyncerRegisterForATXSyncedCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1033,31 +1034,31 @@ func (m *MockatxProvider) GetAtxHeader(id types.ATXID) (*types.ActivationTxHeade } // GetAtxHeader indicates an expected call of GetAtxHeader. -func (mr *MockatxProviderMockRecorder) GetAtxHeader(id any) *atxProviderGetAtxHeaderCall { +func (mr *MockatxProviderMockRecorder) GetAtxHeader(id any) *MockatxProviderGetAtxHeaderCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxHeader", reflect.TypeOf((*MockatxProvider)(nil).GetAtxHeader), id) - return &atxProviderGetAtxHeaderCall{Call: call} + return &MockatxProviderGetAtxHeaderCall{Call: call} } -// atxProviderGetAtxHeaderCall wrap *gomock.Call -type atxProviderGetAtxHeaderCall struct { +// MockatxProviderGetAtxHeaderCall wrap *gomock.Call +type MockatxProviderGetAtxHeaderCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *atxProviderGetAtxHeaderCall) Return(arg0 *types.ActivationTxHeader, arg1 error) *atxProviderGetAtxHeaderCall { +func (c *MockatxProviderGetAtxHeaderCall) Return(arg0 *types.ActivationTxHeader, arg1 error) *MockatxProviderGetAtxHeaderCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *atxProviderGetAtxHeaderCall) Do(f func(types.ATXID) (*types.ActivationTxHeader, error)) *atxProviderGetAtxHeaderCall { +func (c *MockatxProviderGetAtxHeaderCall) Do(f func(types.ATXID) (*types.ActivationTxHeader, error)) *MockatxProviderGetAtxHeaderCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *atxProviderGetAtxHeaderCall) DoAndReturn(f func(types.ATXID) (*types.ActivationTxHeader, error)) *atxProviderGetAtxHeaderCall { +func (c *MockatxProviderGetAtxHeaderCall) DoAndReturn(f func(types.ATXID) (*types.ActivationTxHeader, error)) *MockatxProviderGetAtxHeaderCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1086,39 +1087,39 @@ func (m *MockpostSetupProvider) EXPECT() *MockpostSetupProviderMockRecorder { } // PrepareInitializer mocks base method. -func (m *MockpostSetupProvider) PrepareInitializer(ctx context.Context, opts PostSetupOpts) error { +func (m *MockpostSetupProvider) PrepareInitializer(ctx context.Context, opts PostSetupOpts, id types.NodeID) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PrepareInitializer", ctx, opts) + ret := m.ctrl.Call(m, "PrepareInitializer", ctx, opts, id) ret0, _ := ret[0].(error) return ret0 } // PrepareInitializer indicates an expected call of PrepareInitializer. -func (mr *MockpostSetupProviderMockRecorder) PrepareInitializer(ctx, opts any) *postSetupProviderPrepareInitializerCall { +func (mr *MockpostSetupProviderMockRecorder) PrepareInitializer(ctx, opts, id any) *MockpostSetupProviderPrepareInitializerCall { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareInitializer", reflect.TypeOf((*MockpostSetupProvider)(nil).PrepareInitializer), ctx, opts) - return &postSetupProviderPrepareInitializerCall{Call: call} + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareInitializer", reflect.TypeOf((*MockpostSetupProvider)(nil).PrepareInitializer), ctx, opts, id) + return &MockpostSetupProviderPrepareInitializerCall{Call: call} } -// postSetupProviderPrepareInitializerCall wrap *gomock.Call -type postSetupProviderPrepareInitializerCall struct { +// MockpostSetupProviderPrepareInitializerCall wrap *gomock.Call +type MockpostSetupProviderPrepareInitializerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSetupProviderPrepareInitializerCall) Return(arg0 error) *postSetupProviderPrepareInitializerCall { +func (c *MockpostSetupProviderPrepareInitializerCall) Return(arg0 error) *MockpostSetupProviderPrepareInitializerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postSetupProviderPrepareInitializerCall) Do(f func(context.Context, PostSetupOpts) error) *postSetupProviderPrepareInitializerCall { +func (c *MockpostSetupProviderPrepareInitializerCall) Do(f func(context.Context, PostSetupOpts, types.NodeID) error) *MockpostSetupProviderPrepareInitializerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSetupProviderPrepareInitializerCall) DoAndReturn(f func(context.Context, PostSetupOpts) error) *postSetupProviderPrepareInitializerCall { +func (c *MockpostSetupProviderPrepareInitializerCall) DoAndReturn(f func(context.Context, PostSetupOpts, types.NodeID) error) *MockpostSetupProviderPrepareInitializerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1132,69 +1133,69 @@ func (m *MockpostSetupProvider) Reset() error { } // Reset indicates an expected call of Reset. -func (mr *MockpostSetupProviderMockRecorder) Reset() *postSetupProviderResetCall { +func (mr *MockpostSetupProviderMockRecorder) Reset() *MockpostSetupProviderResetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockpostSetupProvider)(nil).Reset)) - return &postSetupProviderResetCall{Call: call} + return &MockpostSetupProviderResetCall{Call: call} } -// postSetupProviderResetCall wrap *gomock.Call -type postSetupProviderResetCall struct { +// MockpostSetupProviderResetCall wrap *gomock.Call +type MockpostSetupProviderResetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSetupProviderResetCall) Return(arg0 error) *postSetupProviderResetCall { +func (c *MockpostSetupProviderResetCall) Return(arg0 error) *MockpostSetupProviderResetCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postSetupProviderResetCall) Do(f func() error) *postSetupProviderResetCall { +func (c *MockpostSetupProviderResetCall) Do(f func() error) *MockpostSetupProviderResetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSetupProviderResetCall) DoAndReturn(f func() error) *postSetupProviderResetCall { +func (c *MockpostSetupProviderResetCall) DoAndReturn(f func() error) *MockpostSetupProviderResetCall { c.Call = c.Call.DoAndReturn(f) return c } // StartSession mocks base method. -func (m *MockpostSetupProvider) StartSession(context context.Context) error { +func (m *MockpostSetupProvider) StartSession(context context.Context, id types.NodeID) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StartSession", context) + ret := m.ctrl.Call(m, "StartSession", context, id) ret0, _ := ret[0].(error) return ret0 } // StartSession indicates an expected call of StartSession. -func (mr *MockpostSetupProviderMockRecorder) StartSession(context any) *postSetupProviderStartSessionCall { +func (mr *MockpostSetupProviderMockRecorder) StartSession(context, id any) *MockpostSetupProviderStartSessionCall { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartSession", reflect.TypeOf((*MockpostSetupProvider)(nil).StartSession), context) - return &postSetupProviderStartSessionCall{Call: call} + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartSession", reflect.TypeOf((*MockpostSetupProvider)(nil).StartSession), context, id) + return &MockpostSetupProviderStartSessionCall{Call: call} } -// postSetupProviderStartSessionCall wrap *gomock.Call -type postSetupProviderStartSessionCall struct { +// MockpostSetupProviderStartSessionCall wrap *gomock.Call +type MockpostSetupProviderStartSessionCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSetupProviderStartSessionCall) Return(arg0 error) *postSetupProviderStartSessionCall { +func (c *MockpostSetupProviderStartSessionCall) Return(arg0 error) *MockpostSetupProviderStartSessionCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postSetupProviderStartSessionCall) Do(f func(context.Context) error) *postSetupProviderStartSessionCall { +func (c *MockpostSetupProviderStartSessionCall) Do(f func(context.Context, types.NodeID) error) *MockpostSetupProviderStartSessionCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSetupProviderStartSessionCall) DoAndReturn(f func(context.Context) error) *postSetupProviderStartSessionCall { +func (c *MockpostSetupProviderStartSessionCall) DoAndReturn(f func(context.Context, types.NodeID) error) *MockpostSetupProviderStartSessionCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1208,31 +1209,31 @@ func (m *MockpostSetupProvider) Status() *PostSetupStatus { } // Status indicates an expected call of Status. -func (mr *MockpostSetupProviderMockRecorder) Status() *postSetupProviderStatusCall { +func (mr *MockpostSetupProviderMockRecorder) Status() *MockpostSetupProviderStatusCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockpostSetupProvider)(nil).Status)) - return &postSetupProviderStatusCall{Call: call} + return &MockpostSetupProviderStatusCall{Call: call} } -// postSetupProviderStatusCall wrap *gomock.Call -type postSetupProviderStatusCall struct { +// MockpostSetupProviderStatusCall wrap *gomock.Call +type MockpostSetupProviderStatusCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSetupProviderStatusCall) Return(arg0 *PostSetupStatus) *postSetupProviderStatusCall { +func (c *MockpostSetupProviderStatusCall) Return(arg0 *PostSetupStatus) *MockpostSetupProviderStatusCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postSetupProviderStatusCall) Do(f func() *PostSetupStatus) *postSetupProviderStatusCall { +func (c *MockpostSetupProviderStatusCall) Do(f func() *PostSetupStatus) *MockpostSetupProviderStatusCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSetupProviderStatusCall) DoAndReturn(f func() *PostSetupStatus) *postSetupProviderStatusCall { +func (c *MockpostSetupProviderStatusCall) DoAndReturn(f func() *PostSetupStatus) *MockpostSetupProviderStatusCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1269,31 +1270,31 @@ func (m *MockSmeshingProvider) Coinbase() types.Address { } // Coinbase indicates an expected call of Coinbase. -func (mr *MockSmeshingProviderMockRecorder) Coinbase() *SmeshingProviderCoinbaseCall { +func (mr *MockSmeshingProviderMockRecorder) Coinbase() *MockSmeshingProviderCoinbaseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Coinbase", reflect.TypeOf((*MockSmeshingProvider)(nil).Coinbase)) - return &SmeshingProviderCoinbaseCall{Call: call} + return &MockSmeshingProviderCoinbaseCall{Call: call} } -// SmeshingProviderCoinbaseCall wrap *gomock.Call -type SmeshingProviderCoinbaseCall struct { +// MockSmeshingProviderCoinbaseCall wrap *gomock.Call +type MockSmeshingProviderCoinbaseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SmeshingProviderCoinbaseCall) Return(arg0 types.Address) *SmeshingProviderCoinbaseCall { +func (c *MockSmeshingProviderCoinbaseCall) Return(arg0 types.Address) *MockSmeshingProviderCoinbaseCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SmeshingProviderCoinbaseCall) Do(f func() types.Address) *SmeshingProviderCoinbaseCall { +func (c *MockSmeshingProviderCoinbaseCall) Do(f func() types.Address) *MockSmeshingProviderCoinbaseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmeshingProviderCoinbaseCall) DoAndReturn(f func() types.Address) *SmeshingProviderCoinbaseCall { +func (c *MockSmeshingProviderCoinbaseCall) DoAndReturn(f func() types.Address) *MockSmeshingProviderCoinbaseCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1305,31 +1306,31 @@ func (m *MockSmeshingProvider) SetCoinbase(coinbase types.Address) { } // SetCoinbase indicates an expected call of SetCoinbase. -func (mr *MockSmeshingProviderMockRecorder) SetCoinbase(coinbase any) *SmeshingProviderSetCoinbaseCall { +func (mr *MockSmeshingProviderMockRecorder) SetCoinbase(coinbase any) *MockSmeshingProviderSetCoinbaseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCoinbase", reflect.TypeOf((*MockSmeshingProvider)(nil).SetCoinbase), coinbase) - return &SmeshingProviderSetCoinbaseCall{Call: call} + return &MockSmeshingProviderSetCoinbaseCall{Call: call} } -// SmeshingProviderSetCoinbaseCall wrap *gomock.Call -type SmeshingProviderSetCoinbaseCall struct { +// MockSmeshingProviderSetCoinbaseCall wrap *gomock.Call +type MockSmeshingProviderSetCoinbaseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SmeshingProviderSetCoinbaseCall) Return() *SmeshingProviderSetCoinbaseCall { +func (c *MockSmeshingProviderSetCoinbaseCall) Return() *MockSmeshingProviderSetCoinbaseCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *SmeshingProviderSetCoinbaseCall) Do(f func(types.Address)) *SmeshingProviderSetCoinbaseCall { +func (c *MockSmeshingProviderSetCoinbaseCall) Do(f func(types.Address)) *MockSmeshingProviderSetCoinbaseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmeshingProviderSetCoinbaseCall) DoAndReturn(f func(types.Address)) *SmeshingProviderSetCoinbaseCall { +func (c *MockSmeshingProviderSetCoinbaseCall) DoAndReturn(f func(types.Address)) *MockSmeshingProviderSetCoinbaseCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1343,31 +1344,31 @@ func (m *MockSmeshingProvider) SmesherIDs() []types.NodeID { } // SmesherIDs indicates an expected call of SmesherIDs. -func (mr *MockSmeshingProviderMockRecorder) SmesherIDs() *SmeshingProviderSmesherIDsCall { +func (mr *MockSmeshingProviderMockRecorder) SmesherIDs() *MockSmeshingProviderSmesherIDsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SmesherIDs", reflect.TypeOf((*MockSmeshingProvider)(nil).SmesherIDs)) - return &SmeshingProviderSmesherIDsCall{Call: call} + return &MockSmeshingProviderSmesherIDsCall{Call: call} } -// SmeshingProviderSmesherIDsCall wrap *gomock.Call -type SmeshingProviderSmesherIDsCall struct { +// MockSmeshingProviderSmesherIDsCall wrap *gomock.Call +type MockSmeshingProviderSmesherIDsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SmeshingProviderSmesherIDsCall) Return(arg0 []types.NodeID) *SmeshingProviderSmesherIDsCall { +func (c *MockSmeshingProviderSmesherIDsCall) Return(arg0 []types.NodeID) *MockSmeshingProviderSmesherIDsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SmeshingProviderSmesherIDsCall) Do(f func() []types.NodeID) *SmeshingProviderSmesherIDsCall { +func (c *MockSmeshingProviderSmesherIDsCall) Do(f func() []types.NodeID) *MockSmeshingProviderSmesherIDsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmeshingProviderSmesherIDsCall) DoAndReturn(f func() []types.NodeID) *SmeshingProviderSmesherIDsCall { +func (c *MockSmeshingProviderSmesherIDsCall) DoAndReturn(f func() []types.NodeID) *MockSmeshingProviderSmesherIDsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1381,31 +1382,31 @@ func (m *MockSmeshingProvider) Smeshing() bool { } // Smeshing indicates an expected call of Smeshing. -func (mr *MockSmeshingProviderMockRecorder) Smeshing() *SmeshingProviderSmeshingCall { +func (mr *MockSmeshingProviderMockRecorder) Smeshing() *MockSmeshingProviderSmeshingCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Smeshing", reflect.TypeOf((*MockSmeshingProvider)(nil).Smeshing)) - return &SmeshingProviderSmeshingCall{Call: call} + return &MockSmeshingProviderSmeshingCall{Call: call} } -// SmeshingProviderSmeshingCall wrap *gomock.Call -type SmeshingProviderSmeshingCall struct { +// MockSmeshingProviderSmeshingCall wrap *gomock.Call +type MockSmeshingProviderSmeshingCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SmeshingProviderSmeshingCall) Return(arg0 bool) *SmeshingProviderSmeshingCall { +func (c *MockSmeshingProviderSmeshingCall) Return(arg0 bool) *MockSmeshingProviderSmeshingCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SmeshingProviderSmeshingCall) Do(f func() bool) *SmeshingProviderSmeshingCall { +func (c *MockSmeshingProviderSmeshingCall) Do(f func() bool) *MockSmeshingProviderSmeshingCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmeshingProviderSmeshingCall) DoAndReturn(f func() bool) *SmeshingProviderSmeshingCall { +func (c *MockSmeshingProviderSmeshingCall) DoAndReturn(f func() bool) *MockSmeshingProviderSmeshingCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1419,31 +1420,31 @@ func (m *MockSmeshingProvider) StartSmeshing(arg0 types.Address) error { } // StartSmeshing indicates an expected call of StartSmeshing. -func (mr *MockSmeshingProviderMockRecorder) StartSmeshing(arg0 any) *SmeshingProviderStartSmeshingCall { +func (mr *MockSmeshingProviderMockRecorder) StartSmeshing(arg0 any) *MockSmeshingProviderStartSmeshingCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartSmeshing", reflect.TypeOf((*MockSmeshingProvider)(nil).StartSmeshing), arg0) - return &SmeshingProviderStartSmeshingCall{Call: call} + return &MockSmeshingProviderStartSmeshingCall{Call: call} } -// SmeshingProviderStartSmeshingCall wrap *gomock.Call -type SmeshingProviderStartSmeshingCall struct { +// MockSmeshingProviderStartSmeshingCall wrap *gomock.Call +type MockSmeshingProviderStartSmeshingCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SmeshingProviderStartSmeshingCall) Return(arg0 error) *SmeshingProviderStartSmeshingCall { +func (c *MockSmeshingProviderStartSmeshingCall) Return(arg0 error) *MockSmeshingProviderStartSmeshingCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SmeshingProviderStartSmeshingCall) Do(f func(types.Address) error) *SmeshingProviderStartSmeshingCall { +func (c *MockSmeshingProviderStartSmeshingCall) Do(f func(types.Address) error) *MockSmeshingProviderStartSmeshingCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmeshingProviderStartSmeshingCall) DoAndReturn(f func(types.Address) error) *SmeshingProviderStartSmeshingCall { +func (c *MockSmeshingProviderStartSmeshingCall) DoAndReturn(f func(types.Address) error) *MockSmeshingProviderStartSmeshingCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1457,31 +1458,31 @@ func (m *MockSmeshingProvider) StopSmeshing(arg0 bool) error { } // StopSmeshing indicates an expected call of StopSmeshing. -func (mr *MockSmeshingProviderMockRecorder) StopSmeshing(arg0 any) *SmeshingProviderStopSmeshingCall { +func (mr *MockSmeshingProviderMockRecorder) StopSmeshing(arg0 any) *MockSmeshingProviderStopSmeshingCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopSmeshing", reflect.TypeOf((*MockSmeshingProvider)(nil).StopSmeshing), arg0) - return &SmeshingProviderStopSmeshingCall{Call: call} + return &MockSmeshingProviderStopSmeshingCall{Call: call} } -// SmeshingProviderStopSmeshingCall wrap *gomock.Call -type SmeshingProviderStopSmeshingCall struct { +// MockSmeshingProviderStopSmeshingCall wrap *gomock.Call +type MockSmeshingProviderStopSmeshingCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SmeshingProviderStopSmeshingCall) Return(arg0 error) *SmeshingProviderStopSmeshingCall { +func (c *MockSmeshingProviderStopSmeshingCall) Return(arg0 error) *MockSmeshingProviderStopSmeshingCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SmeshingProviderStopSmeshingCall) Do(f func(bool) error) *SmeshingProviderStopSmeshingCall { +func (c *MockSmeshingProviderStopSmeshingCall) Do(f func(bool) error) *MockSmeshingProviderStopSmeshingCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SmeshingProviderStopSmeshingCall) DoAndReturn(f func(bool) error) *SmeshingProviderStopSmeshingCall { +func (c *MockSmeshingProviderStopSmeshingCall) DoAndReturn(f func(bool) error) *MockSmeshingProviderStopSmeshingCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1518,31 +1519,31 @@ func (m *MockpoetClient) Address() string { } // Address indicates an expected call of Address. -func (mr *MockpoetClientMockRecorder) Address() *poetClientAddressCall { +func (mr *MockpoetClientMockRecorder) Address() *MockpoetClientAddressCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockpoetClient)(nil).Address)) - return &poetClientAddressCall{Call: call} + return &MockpoetClientAddressCall{Call: call} } -// poetClientAddressCall wrap *gomock.Call -type poetClientAddressCall struct { +// MockpoetClientAddressCall wrap *gomock.Call +type MockpoetClientAddressCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *poetClientAddressCall) Return(arg0 string) *poetClientAddressCall { +func (c *MockpoetClientAddressCall) Return(arg0 string) *MockpoetClientAddressCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *poetClientAddressCall) Do(f func() string) *poetClientAddressCall { +func (c *MockpoetClientAddressCall) Do(f func() string) *MockpoetClientAddressCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *poetClientAddressCall) DoAndReturn(f func() string) *poetClientAddressCall { +func (c *MockpoetClientAddressCall) DoAndReturn(f func() string) *MockpoetClientAddressCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1557,31 +1558,31 @@ func (m *MockpoetClient) PowParams(ctx context.Context) (*PoetPowParams, error) } // PowParams indicates an expected call of PowParams. -func (mr *MockpoetClientMockRecorder) PowParams(ctx any) *poetClientPowParamsCall { +func (mr *MockpoetClientMockRecorder) PowParams(ctx any) *MockpoetClientPowParamsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PowParams", reflect.TypeOf((*MockpoetClient)(nil).PowParams), ctx) - return &poetClientPowParamsCall{Call: call} + return &MockpoetClientPowParamsCall{Call: call} } -// poetClientPowParamsCall wrap *gomock.Call -type poetClientPowParamsCall struct { +// MockpoetClientPowParamsCall wrap *gomock.Call +type MockpoetClientPowParamsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *poetClientPowParamsCall) Return(arg0 *PoetPowParams, arg1 error) *poetClientPowParamsCall { +func (c *MockpoetClientPowParamsCall) Return(arg0 *PoetPowParams, arg1 error) *MockpoetClientPowParamsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *poetClientPowParamsCall) Do(f func(context.Context) (*PoetPowParams, error)) *poetClientPowParamsCall { +func (c *MockpoetClientPowParamsCall) Do(f func(context.Context) (*PoetPowParams, error)) *MockpoetClientPowParamsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *poetClientPowParamsCall) DoAndReturn(f func(context.Context) (*PoetPowParams, error)) *poetClientPowParamsCall { +func (c *MockpoetClientPowParamsCall) DoAndReturn(f func(context.Context) (*PoetPowParams, error)) *MockpoetClientPowParamsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1597,31 +1598,31 @@ func (m *MockpoetClient) Proof(ctx context.Context, roundID string) (*types.Poet } // Proof indicates an expected call of Proof. -func (mr *MockpoetClientMockRecorder) Proof(ctx, roundID any) *poetClientProofCall { +func (mr *MockpoetClientMockRecorder) Proof(ctx, roundID any) *MockpoetClientProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proof", reflect.TypeOf((*MockpoetClient)(nil).Proof), ctx, roundID) - return &poetClientProofCall{Call: call} + return &MockpoetClientProofCall{Call: call} } -// poetClientProofCall wrap *gomock.Call -type poetClientProofCall struct { +// MockpoetClientProofCall wrap *gomock.Call +type MockpoetClientProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *poetClientProofCall) Return(arg0 *types.PoetProofMessage, arg1 []types.Member, arg2 error) *poetClientProofCall { +func (c *MockpoetClientProofCall) Return(arg0 *types.PoetProofMessage, arg1 []types.Member, arg2 error) *MockpoetClientProofCall { c.Call = c.Call.Return(arg0, arg1, arg2) return c } // Do rewrite *gomock.Call.Do -func (c *poetClientProofCall) Do(f func(context.Context, string) (*types.PoetProofMessage, []types.Member, error)) *poetClientProofCall { +func (c *MockpoetClientProofCall) Do(f func(context.Context, string) (*types.PoetProofMessage, []types.Member, error)) *MockpoetClientProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *poetClientProofCall) DoAndReturn(f func(context.Context, string) (*types.PoetProofMessage, []types.Member, error)) *poetClientProofCall { +func (c *MockpoetClientProofCall) DoAndReturn(f func(context.Context, string) (*types.PoetProofMessage, []types.Member, error)) *MockpoetClientProofCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1636,31 +1637,31 @@ func (m *MockpoetClient) Submit(ctx context.Context, deadline time.Time, prefix, } // Submit indicates an expected call of Submit. -func (mr *MockpoetClientMockRecorder) Submit(ctx, deadline, prefix, challenge, signature, nodeID, pow any) *poetClientSubmitCall { +func (mr *MockpoetClientMockRecorder) Submit(ctx, deadline, prefix, challenge, signature, nodeID, pow any) *MockpoetClientSubmitCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Submit", reflect.TypeOf((*MockpoetClient)(nil).Submit), ctx, deadline, prefix, challenge, signature, nodeID, pow) - return &poetClientSubmitCall{Call: call} + return &MockpoetClientSubmitCall{Call: call} } -// poetClientSubmitCall wrap *gomock.Call -type poetClientSubmitCall struct { +// MockpoetClientSubmitCall wrap *gomock.Call +type MockpoetClientSubmitCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *poetClientSubmitCall) Return(arg0 *types.PoetRound, arg1 error) *poetClientSubmitCall { +func (c *MockpoetClientSubmitCall) Return(arg0 *types.PoetRound, arg1 error) *MockpoetClientSubmitCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *poetClientSubmitCall) Do(f func(context.Context, time.Time, []byte, []byte, types.EdSignature, types.NodeID, PoetPoW) (*types.PoetRound, error)) *poetClientSubmitCall { +func (c *MockpoetClientSubmitCall) Do(f func(context.Context, time.Time, []byte, []byte, types.EdSignature, types.NodeID, PoetPoW) (*types.PoetRound, error)) *MockpoetClientSubmitCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *poetClientSubmitCall) DoAndReturn(f func(context.Context, time.Time, []byte, []byte, types.EdSignature, types.NodeID, PoetPoW) (*types.PoetRound, error)) *poetClientSubmitCall { +func (c *MockpoetClientSubmitCall) DoAndReturn(f func(context.Context, time.Time, []byte, []byte, types.EdSignature, types.NodeID, PoetPoW) (*types.PoetRound, error)) *MockpoetClientSubmitCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1699,31 +1700,31 @@ func (m *MockpoetDbAPI) GetProof(arg0 types.PoetProofRef) (*types.PoetProof, *ty } // GetProof indicates an expected call of GetProof. -func (mr *MockpoetDbAPIMockRecorder) GetProof(arg0 any) *poetDbAPIGetProofCall { +func (mr *MockpoetDbAPIMockRecorder) GetProof(arg0 any) *MockpoetDbAPIGetProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProof", reflect.TypeOf((*MockpoetDbAPI)(nil).GetProof), arg0) - return &poetDbAPIGetProofCall{Call: call} + return &MockpoetDbAPIGetProofCall{Call: call} } -// poetDbAPIGetProofCall wrap *gomock.Call -type poetDbAPIGetProofCall struct { +// MockpoetDbAPIGetProofCall wrap *gomock.Call +type MockpoetDbAPIGetProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *poetDbAPIGetProofCall) Return(arg0 *types.PoetProof, arg1 *types.Hash32, arg2 error) *poetDbAPIGetProofCall { +func (c *MockpoetDbAPIGetProofCall) Return(arg0 *types.PoetProof, arg1 *types.Hash32, arg2 error) *MockpoetDbAPIGetProofCall { c.Call = c.Call.Return(arg0, arg1, arg2) return c } // Do rewrite *gomock.Call.Do -func (c *poetDbAPIGetProofCall) Do(f func(types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)) *poetDbAPIGetProofCall { +func (c *MockpoetDbAPIGetProofCall) Do(f func(types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)) *MockpoetDbAPIGetProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *poetDbAPIGetProofCall) DoAndReturn(f func(types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)) *poetDbAPIGetProofCall { +func (c *MockpoetDbAPIGetProofCall) DoAndReturn(f func(types.PoetProofRef) (*types.PoetProof, *types.Hash32, error)) *MockpoetDbAPIGetProofCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1737,31 +1738,31 @@ func (m *MockpoetDbAPI) ValidateAndStore(ctx context.Context, proofMessage *type } // ValidateAndStore indicates an expected call of ValidateAndStore. -func (mr *MockpoetDbAPIMockRecorder) ValidateAndStore(ctx, proofMessage any) *poetDbAPIValidateAndStoreCall { +func (mr *MockpoetDbAPIMockRecorder) ValidateAndStore(ctx, proofMessage any) *MockpoetDbAPIValidateAndStoreCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAndStore", reflect.TypeOf((*MockpoetDbAPI)(nil).ValidateAndStore), ctx, proofMessage) - return &poetDbAPIValidateAndStoreCall{Call: call} + return &MockpoetDbAPIValidateAndStoreCall{Call: call} } -// poetDbAPIValidateAndStoreCall wrap *gomock.Call -type poetDbAPIValidateAndStoreCall struct { +// MockpoetDbAPIValidateAndStoreCall wrap *gomock.Call +type MockpoetDbAPIValidateAndStoreCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *poetDbAPIValidateAndStoreCall) Return(arg0 error) *poetDbAPIValidateAndStoreCall { +func (c *MockpoetDbAPIValidateAndStoreCall) Return(arg0 error) *MockpoetDbAPIValidateAndStoreCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *poetDbAPIValidateAndStoreCall) Do(f func(context.Context, *types.PoetProofMessage) error) *poetDbAPIValidateAndStoreCall { +func (c *MockpoetDbAPIValidateAndStoreCall) Do(f func(context.Context, *types.PoetProofMessage) error) *MockpoetDbAPIValidateAndStoreCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *poetDbAPIValidateAndStoreCall) DoAndReturn(f func(context.Context, *types.PoetProofMessage) error) *poetDbAPIValidateAndStoreCall { +func (c *MockpoetDbAPIValidateAndStoreCall) DoAndReturn(f func(context.Context, *types.PoetProofMessage) error) *MockpoetDbAPIValidateAndStoreCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1799,31 +1800,31 @@ func (m *MockpostService) Client(nodeId types.NodeID) (PostClient, error) { } // Client indicates an expected call of Client. -func (mr *MockpostServiceMockRecorder) Client(nodeId any) *postServiceClientCall { +func (mr *MockpostServiceMockRecorder) Client(nodeId any) *MockpostServiceClientCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Client", reflect.TypeOf((*MockpostService)(nil).Client), nodeId) - return &postServiceClientCall{Call: call} + return &MockpostServiceClientCall{Call: call} } -// postServiceClientCall wrap *gomock.Call -type postServiceClientCall struct { +// MockpostServiceClientCall wrap *gomock.Call +type MockpostServiceClientCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postServiceClientCall) Return(arg0 PostClient, arg1 error) *postServiceClientCall { +func (c *MockpostServiceClientCall) Return(arg0 PostClient, arg1 error) *MockpostServiceClientCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *postServiceClientCall) Do(f func(types.NodeID) (PostClient, error)) *postServiceClientCall { +func (c *MockpostServiceClientCall) Do(f func(types.NodeID) (PostClient, error)) *MockpostServiceClientCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postServiceClientCall) DoAndReturn(f func(types.NodeID) (PostClient, error)) *postServiceClientCall { +func (c *MockpostServiceClientCall) DoAndReturn(f func(types.NodeID) (PostClient, error)) *MockpostServiceClientCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1861,31 +1862,31 @@ func (m *MockPostClient) Info(ctx context.Context) (*types.PostInfo, error) { } // Info indicates an expected call of Info. -func (mr *MockPostClientMockRecorder) Info(ctx any) *PostClientInfoCall { +func (mr *MockPostClientMockRecorder) Info(ctx any) *MockPostClientInfoCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockPostClient)(nil).Info), ctx) - return &PostClientInfoCall{Call: call} + return &MockPostClientInfoCall{Call: call} } -// PostClientInfoCall wrap *gomock.Call -type PostClientInfoCall struct { +// MockPostClientInfoCall wrap *gomock.Call +type MockPostClientInfoCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PostClientInfoCall) Return(arg0 *types.PostInfo, arg1 error) *PostClientInfoCall { +func (c *MockPostClientInfoCall) Return(arg0 *types.PostInfo, arg1 error) *MockPostClientInfoCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *PostClientInfoCall) Do(f func(context.Context) (*types.PostInfo, error)) *PostClientInfoCall { +func (c *MockPostClientInfoCall) Do(f func(context.Context) (*types.PostInfo, error)) *MockPostClientInfoCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PostClientInfoCall) DoAndReturn(f func(context.Context) (*types.PostInfo, error)) *PostClientInfoCall { +func (c *MockPostClientInfoCall) DoAndReturn(f func(context.Context) (*types.PostInfo, error)) *MockPostClientInfoCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1901,31 +1902,31 @@ func (m *MockPostClient) Proof(ctx context.Context, challenge []byte) (*types.Po } // Proof indicates an expected call of Proof. -func (mr *MockPostClientMockRecorder) Proof(ctx, challenge any) *PostClientProofCall { +func (mr *MockPostClientMockRecorder) Proof(ctx, challenge any) *MockPostClientProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proof", reflect.TypeOf((*MockPostClient)(nil).Proof), ctx, challenge) - return &PostClientProofCall{Call: call} + return &MockPostClientProofCall{Call: call} } -// PostClientProofCall wrap *gomock.Call -type PostClientProofCall struct { +// MockPostClientProofCall wrap *gomock.Call +type MockPostClientProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PostClientProofCall) Return(arg0 *types.Post, arg1 *types.PostInfo, arg2 error) *PostClientProofCall { +func (c *MockPostClientProofCall) Return(arg0 *types.Post, arg1 *types.PostInfo, arg2 error) *MockPostClientProofCall { c.Call = c.Call.Return(arg0, arg1, arg2) return c } // Do rewrite *gomock.Call.Do -func (c *PostClientProofCall) Do(f func(context.Context, []byte) (*types.Post, *types.PostInfo, error)) *PostClientProofCall { +func (c *MockPostClientProofCall) Do(f func(context.Context, []byte) (*types.Post, *types.PostInfo, error)) *MockPostClientProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PostClientProofCall) DoAndReturn(f func(context.Context, []byte) (*types.Post, *types.PostInfo, error)) *PostClientProofCall { +func (c *MockPostClientProofCall) DoAndReturn(f func(context.Context, []byte) (*types.Post, *types.PostInfo, error)) *MockPostClientProofCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/activation/post.go b/activation/post.go index 38ee4e0fdee..431e3cb52f7 100644 --- a/activation/post.go +++ b/activation/post.go @@ -175,7 +175,6 @@ func (o PostSetupOpts) ToInitOpts() config.InitOpts { // PostSetupManager implements the PostProvider interface. type PostSetupManager struct { - id types.NodeID commitmentAtxId types.ATXID syncer syncer @@ -206,7 +205,6 @@ func PostValidityDelay(delay time.Duration) PostSetupManagerOpt { // NewPostSetupManager creates a new instance of PostSetupManager. func NewPostSetupManager( - id types.NodeID, cfg PostConfig, logger *zap.Logger, db *datastore.CachedDB, @@ -216,7 +214,6 @@ func NewPostSetupManager( opts ...PostSetupManagerOpt, ) (*PostSetupManager, error) { mgr := &PostSetupManager{ - id: id, cfg: cfg, logger: logger, db: db, @@ -260,7 +257,7 @@ func (mgr *PostSetupManager) Status() *PostSetupStatus { // previously started session, and will return an error if a session is already // in progress. It must be ensured that PrepareInitializer is called once // before each call to StartSession and that the node is ATX synced. -func (mgr *PostSetupManager) StartSession(ctx context.Context) error { +func (mgr *PostSetupManager) StartSession(ctx context.Context, id types.NodeID) error { // Ensure only one goroutine can execute initialization at a time. err := func() error { mgr.mu.Lock() @@ -275,7 +272,7 @@ func (mgr *PostSetupManager) StartSession(ctx context.Context) error { return err } mgr.logger.Info("post setup session starting", - zap.Stringer("node_id", mgr.id), + zap.Stringer("node_id", id), zap.Stringer("commitment_atx", mgr.commitmentAtxId), zap.String("data_dir", mgr.lastOpts.DataDir), zap.Uint32("num_units", mgr.lastOpts.NumUnits), @@ -283,7 +280,7 @@ func (mgr *PostSetupManager) StartSession(ctx context.Context) error { zap.Stringer("provider", mgr.lastOpts.ProviderID), ) public.InitStart.Set(float64(mgr.lastOpts.NumUnits)) - events.EmitInitStart(mgr.id, mgr.commitmentAtxId) + events.EmitInitStart(id, mgr.commitmentAtxId) err = mgr.init.Initialize(ctx) mgr.mu.Lock() @@ -300,19 +297,19 @@ func (mgr *PostSetupManager) StartSession(ctx context.Context) error { zap.Error(errLabelMismatch), ) mgr.state = PostSetupStateError - events.EmitInitFailure(mgr.id, mgr.commitmentAtxId, errLabelMismatch) + events.EmitInitFailure(id, mgr.commitmentAtxId, errLabelMismatch) return nil case err != nil: mgr.logger.Error("post setup session failed", zap.Error(err)) mgr.state = PostSetupStateError - events.EmitInitFailure(mgr.id, mgr.commitmentAtxId, err) + events.EmitInitFailure(id, mgr.commitmentAtxId, err) return err } public.InitEnd.Set(float64(mgr.lastOpts.NumUnits)) events.EmitInitComplete() mgr.logger.Info("post setup completed", - zap.Stringer("node_id", mgr.id), + zap.Stringer("node_id", id), zap.Stringer("commitment_atx", mgr.commitmentAtxId), zap.String("data_dir", mgr.lastOpts.DataDir), zap.Uint32("num_units", mgr.lastOpts.NumUnits), @@ -330,7 +327,7 @@ func (mgr *PostSetupManager) StartSession(ctx context.Context) error { // (StartSession can take days to complete). After the first call to this // method subsequent calls to this method will return an error until // StartSession has completed execution. -func (mgr *PostSetupManager) PrepareInitializer(ctx context.Context, opts PostSetupOpts) error { +func (mgr *PostSetupManager) PrepareInitializer(ctx context.Context, opts PostSetupOpts, id types.NodeID) error { mgr.logger.Info("preparing post initializer", zap.Any("opts", opts)) mgr.mu.Lock() defer mgr.mu.Unlock() @@ -339,13 +336,13 @@ func (mgr *PostSetupManager) PrepareInitializer(ctx context.Context, opts PostSe } var err error - mgr.commitmentAtxId, err = mgr.commitmentAtx(ctx, opts.DataDir) + mgr.commitmentAtxId, err = mgr.commitmentAtx(ctx, opts.DataDir, id) if err != nil { return err } newInit, err := initialization.NewInitializer( - initialization.WithNodeId(mgr.id.Bytes()), + initialization.WithNodeId(id.Bytes()), initialization.WithCommitmentAtxId(mgr.commitmentAtxId.Bytes()), initialization.WithConfig(mgr.cfg.ToConfig()), initialization.WithInitOpts(opts.ToInitOpts()), @@ -362,14 +359,14 @@ func (mgr *PostSetupManager) PrepareInitializer(ctx context.Context, opts PostSe return nil } -func (mgr *PostSetupManager) commitmentAtx(ctx context.Context, dataDir string) (types.ATXID, error) { +func (mgr *PostSetupManager) commitmentAtx(ctx context.Context, dataDir string, id types.NodeID) (types.ATXID, error) { m, err := initialization.LoadMetadata(dataDir) switch { case err == nil: return types.ATXID(types.BytesToHash(m.CommitmentAtxId)), nil case errors.Is(err, initialization.ErrStateMetadataFileMissing): // if this node has already published an ATX, get its initial ATX and from it the commitment ATX - atxId, err := atxs.GetFirstIDByNodeID(mgr.db, mgr.id) + atxId, err := atxs.GetFirstIDByNodeID(mgr.db, id) if err == nil { atx, err := atxs.Get(mgr.db, atxId) if err != nil { diff --git a/activation/post_supervisor.go b/activation/post_supervisor.go index c59f04ec813..f33928ffea1 100644 --- a/activation/post_supervisor.go +++ b/activation/post_supervisor.go @@ -18,6 +18,7 @@ import ( "go.uber.org/zap" "golang.org/x/sync/errgroup" + "github.com/spacemeshos/go-spacemesh/common/types" "github.com/spacemeshos/go-spacemesh/events" ) @@ -131,7 +132,7 @@ func (ps *PostSupervisor) Status() *PostSetupStatus { return ps.postSetupProvider.Status() } -func (ps *PostSupervisor) Start(opts PostSetupOpts) error { +func (ps *PostSupervisor) Start(opts PostSetupOpts, id types.NodeID) error { ps.mtx.Lock() defer ps.mtx.Unlock() if ps.stop != nil { @@ -146,7 +147,7 @@ func (ps *PostSupervisor) Start(opts PostSetupOpts) error { ps.eg.Go(func() error { // If it returns any error other than context.Canceled // (which is how we signal it to stop) then we shutdown. - err := ps.postSetupProvider.PrepareInitializer(ctx, opts) + err := ps.postSetupProvider.PrepareInitializer(ctx, opts, id) switch { case errors.Is(err, context.Canceled): return nil @@ -155,7 +156,7 @@ func (ps *PostSupervisor) Start(opts PostSetupOpts) error { return err } - err = ps.postSetupProvider.StartSession(ctx) + err = ps.postSetupProvider.StartSession(ctx, id) switch { case errors.Is(err, context.Canceled): return nil diff --git a/activation/post_supervisor_test.go b/activation/post_supervisor_test.go index cee1657e1d8..f0a2900c085 100644 --- a/activation/post_supervisor_test.go +++ b/activation/post_supervisor_test.go @@ -15,6 +15,8 @@ import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" "go.uber.org/zap/zaptest" + + "github.com/spacemeshos/go-spacemesh/common/types" ) func closedChan() <-chan struct{} { @@ -57,16 +59,17 @@ func Test_PostSupervisor_Start_FailPrepare(t *testing.T) { postCfg := DefaultPostConfig() postOpts := DefaultPostSetupOpts() provingOpts := DefaultPostProvingOpts() + nodeID := types.RandomNodeID() mgr := NewMockpostSetupProvider(gomock.NewController(t)) testErr := errors.New("test error") - mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts).Return(testErr) + mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts, nodeID).Return(testErr) ps, err := NewPostSupervisor(log.Named("supervisor"), cmdCfg, postCfg, provingOpts, mgr) require.NoError(t, err) require.NotNil(t, ps) - require.NoError(t, ps.Start(postOpts)) + require.NoError(t, ps.Start(postOpts, nodeID)) require.ErrorIs(t, ps.Stop(false), testErr) } @@ -91,17 +94,18 @@ func Test_PostSupervisor_Start_FailStartSession(t *testing.T) { postCfg := DefaultPostConfig() postOpts := DefaultPostSetupOpts() provingOpts := DefaultPostProvingOpts() + nodeID := types.RandomNodeID() ctrl := gomock.NewController(t) mgr := NewMockpostSetupProvider(ctrl) - mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts).Return(nil) - mgr.EXPECT().StartSession(gomock.Any()).Return(errors.New("failed start session")) + mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts, nodeID).Return(nil) + mgr.EXPECT().StartSession(gomock.Any(), nodeID).Return(errors.New("failed start session")) ps, err := NewPostSupervisor(log.Named("supervisor"), cmdCfg, postCfg, provingOpts, mgr) require.NoError(t, err) require.NotNil(t, ps) - require.NoError(t, ps.Start(postOpts)) + require.NoError(t, ps.Start(postOpts, nodeID)) require.EqualError(t, ps.eg.Wait(), "failed start session") } @@ -112,17 +116,18 @@ func Test_PostSupervisor_StartsServiceCmd(t *testing.T) { postCfg := DefaultPostConfig() postOpts := DefaultPostSetupOpts() provingOpts := DefaultPostProvingOpts() + nodeID := types.RandomNodeID() ctrl := gomock.NewController(t) mgr := NewMockpostSetupProvider(ctrl) - mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts).Return(nil) - mgr.EXPECT().StartSession(gomock.Any()).Return(nil) + mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts, nodeID).Return(nil) + mgr.EXPECT().StartSession(gomock.Any(), nodeID).Return(nil) ps, err := NewPostSupervisor(log.Named("supervisor"), cmdCfg, postCfg, provingOpts, mgr) require.NoError(t, err) require.NotNil(t, ps) - require.NoError(t, ps.Start(postOpts)) + require.NoError(t, ps.Start(postOpts, nodeID)) t.Cleanup(func() { assert.NoError(t, ps.Stop(false)) }) require.Eventually(t, func() bool { return ps.pid.Load() != 0 }, 5*time.Second, 100*time.Millisecond) @@ -150,26 +155,27 @@ func Test_PostSupervisor_Restart_Possible(t *testing.T) { postCfg := DefaultPostConfig() postOpts := DefaultPostSetupOpts() provingOpts := DefaultPostProvingOpts() + nodeID := types.RandomNodeID() ctrl := gomock.NewController(t) mgr := NewMockpostSetupProvider(ctrl) - mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts).Return(nil) - mgr.EXPECT().StartSession(gomock.Any()).Return(nil) + mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts, nodeID).Return(nil) + mgr.EXPECT().StartSession(gomock.Any(), nodeID).Return(nil) ps, err := NewPostSupervisor(log.Named("supervisor"), cmdCfg, postCfg, provingOpts, mgr) require.NoError(t, err) require.NotNil(t, ps) - require.NoError(t, ps.Start(postOpts)) + require.NoError(t, ps.Start(postOpts, nodeID)) t.Cleanup(func() { assert.NoError(t, ps.Stop(false)) }) require.Eventually(t, func() bool { return ps.pid.Load() != 0 }, 5*time.Second, 100*time.Millisecond) require.NoError(t, ps.Stop(false)) require.Eventually(t, func() bool { return ps.pid.Load() == 0 }, 5*time.Second, 100*time.Millisecond) - mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts).Return(nil) - mgr.EXPECT().StartSession(gomock.Any()).Return(nil) - require.NoError(t, ps.Start(postOpts)) + mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts, nodeID).Return(nil) + mgr.EXPECT().StartSession(gomock.Any(), nodeID).Return(nil) + require.NoError(t, ps.Start(postOpts, nodeID)) require.Eventually(t, func() bool { return ps.pid.Load() != 0 }, 5*time.Second, 100*time.Millisecond) require.NoError(t, ps.Stop(false)) @@ -183,17 +189,18 @@ func Test_PostSupervisor_LogFatalOnCrash(t *testing.T) { postCfg := DefaultPostConfig() postOpts := DefaultPostSetupOpts() provingOpts := DefaultPostProvingOpts() + nodeID := types.RandomNodeID() ctrl := gomock.NewController(t) mgr := NewMockpostSetupProvider(ctrl) - mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts).Return(nil) - mgr.EXPECT().StartSession(gomock.Any()).Return(nil) + mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts, nodeID).Return(nil) + mgr.EXPECT().StartSession(gomock.Any(), nodeID).Return(nil) ps, err := NewPostSupervisor(log.Named("supervisor"), cmdCfg, postCfg, provingOpts, mgr) require.NoError(t, err) require.NotNil(t, ps) - require.NoError(t, ps.Start(postOpts)) + require.NoError(t, ps.Start(postOpts, nodeID)) t.Cleanup(func() { assert.NoError(t, ps.Stop(false)) }) require.Eventually(t, func() bool { return ps.pid.Load() != 0 }, 5*time.Second, 100*time.Millisecond) @@ -217,17 +224,18 @@ func Test_PostSupervisor_LogFatalOnInvalidConfig(t *testing.T) { postCfg := DefaultPostConfig() postOpts := DefaultPostSetupOpts() provingOpts := DefaultPostProvingOpts() + nodeID := types.RandomNodeID() ctrl := gomock.NewController(t) mgr := NewMockpostSetupProvider(ctrl) - mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts).Return(nil) - mgr.EXPECT().StartSession(gomock.Any()).Return(nil) + mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts, nodeID).Return(nil) + mgr.EXPECT().StartSession(gomock.Any(), nodeID).Return(nil) ps, err := NewPostSupervisor(log.Named("supervisor"), cmdCfg, postCfg, provingOpts, mgr) require.NoError(t, err) require.NotNil(t, ps) - require.NoError(t, ps.Start(postOpts)) + require.NoError(t, ps.Start(postOpts, nodeID)) t.Cleanup(func() { assert.NoError(t, ps.Stop(false)) }) require.Eventually(t, func() bool { return ps.pid.Load() != 0 }, 5*time.Second, 100*time.Millisecond) @@ -248,17 +256,18 @@ func Test_PostSupervisor_StopOnError(t *testing.T) { postCfg := DefaultPostConfig() postOpts := DefaultPostSetupOpts() provingOpts := DefaultPostProvingOpts() + nodeID := types.RandomNodeID() ctrl := gomock.NewController(t) mgr := NewMockpostSetupProvider(ctrl) - mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts).Return(nil) - mgr.EXPECT().StartSession(gomock.Any()).Return(nil) + mgr.EXPECT().PrepareInitializer(gomock.Any(), postOpts, nodeID).Return(nil) + mgr.EXPECT().StartSession(gomock.Any(), nodeID).Return(nil) ps, err := NewPostSupervisor(log.Named("supervisor"), cmdCfg, postCfg, provingOpts, mgr) require.NoError(t, err) require.NotNil(t, ps) - require.NoError(t, ps.Start(postOpts)) + require.NoError(t, ps.Start(postOpts, nodeID)) t.Cleanup(func() { assert.NoError(t, ps.Stop(false)) }) require.Eventually(t, func() bool { return ps.pid.Load() != 0 }, 5*time.Second, 100*time.Millisecond) diff --git a/activation/post_test.go b/activation/post_test.go index 065528228c7..be1e85de8a1 100644 --- a/activation/post_test.go +++ b/activation/post_test.go @@ -51,21 +51,22 @@ func TestPostSetupManager(t *testing.T) { }) // Create data. - require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts)) - require.NoError(t, mgr.StartSession(context.Background())) + nodeID := types.RandomNodeID() + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(context.Background(), nodeID)) require.NoError(t, eg.Wait()) require.Equal(t, PostSetupStateComplete, mgr.Status().State) // Create data (same opts). - require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts)) - require.NoError(t, mgr.StartSession(context.Background())) + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(context.Background(), nodeID)) // Cleanup. require.NoError(t, mgr.Reset()) // Create data (same opts, after deletion). - require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts)) - require.NoError(t, mgr.StartSession(context.Background())) + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(context.Background(), nodeID)) require.Equal(t, PostSetupStateComplete, mgr.Status().State) } @@ -74,60 +75,58 @@ func TestPostSetupManager(t *testing.T) { // and should be fully tested there but we check a few cases to be sure that // PrepareInitializer will return errors when the opts don't validate. func TestPostSetupManager_PrepareInitializer(t *testing.T) { - req := require.New(t) - mgr := newTestPostManager(t) + nodeID := types.RandomNodeID() // check no error with good options. - req.NoError(mgr.PrepareInitializer(context.Background(), mgr.opts)) + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) defaultConfig := config.DefaultConfig() // Check that invalid options return errors opts := mgr.opts opts.ComputeBatchSize = 3 - req.Error(mgr.PrepareInitializer(context.Background(), opts)) + require.Error(t, mgr.PrepareInitializer(context.Background(), opts, nodeID)) opts = mgr.opts opts.NumUnits = defaultConfig.MaxNumUnits + 1 - req.Error(mgr.PrepareInitializer(context.Background(), opts)) + require.Error(t, mgr.PrepareInitializer(context.Background(), opts, nodeID)) opts = mgr.opts opts.NumUnits = defaultConfig.MinNumUnits - 1 - req.Error(mgr.PrepareInitializer(context.Background(), opts)) + require.Error(t, mgr.PrepareInitializer(context.Background(), opts, nodeID)) opts = mgr.opts opts.Scrypt.N = 0 - req.Error(opts.Scrypt.Validate()) - req.Error(mgr.PrepareInitializer(context.Background(), opts)) + require.Error(t, opts.Scrypt.Validate()) + require.Error(t, mgr.PrepareInitializer(context.Background(), opts, nodeID)) } func TestPostSetupManager_StartSession_WithoutProvider_Error(t *testing.T) { - req := require.New(t) - mgr := newTestPostManager(t) mgr.opts.ProviderID.value = nil + nodeID := types.RandomNodeID() + // Create data. - req.NoError(mgr.PrepareInitializer(context.Background(), mgr.opts)) // prepare is fine without provider - req.ErrorContains(mgr.StartSession(context.Background()), "no provider specified") + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) // prepare is fine without provider + require.ErrorContains(t, mgr.StartSession(context.Background(), nodeID), "no provider specified") - req.Equal(PostSetupStateError, mgr.Status().State) + require.Equal(t, PostSetupStateError, mgr.Status().State) } func TestPostSetupManager_StartSession_WithoutProviderAfterInit_OK(t *testing.T) { - req := require.New(t) - mgr := newTestPostManager(t) + nodeID := types.RandomNodeID() ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) defer cancel() // Create data. - req.NoError(mgr.PrepareInitializer(ctx, mgr.opts)) - req.NoError(mgr.StartSession(ctx)) + require.NoError(t, mgr.PrepareInitializer(ctx, mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(ctx, nodeID)) - req.Equal(PostSetupStateComplete, mgr.Status().State) + require.Equal(t, PostSetupStateComplete, mgr.Status().State) cancel() // start Initializer again, but with no provider set @@ -136,150 +135,149 @@ func TestPostSetupManager_StartSession_WithoutProviderAfterInit_OK(t *testing.T) ctx, cancel = context.WithTimeout(context.Background(), time.Second*10) defer cancel() - req.NoError(mgr.PrepareInitializer(ctx, mgr.opts)) - req.NoError(mgr.StartSession(ctx)) + require.NoError(t, mgr.PrepareInitializer(ctx, mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(ctx, nodeID)) - req.Equal(PostSetupStateComplete, mgr.Status().State) + require.Equal(t, PostSetupStateComplete, mgr.Status().State) } // Checks that the sequence of calls for initialization (first // PrepareInitializer and then StartSession) is enforced. func TestPostSetupManager_InitializationCallSequence(t *testing.T) { - req := require.New(t) - mgr := newTestPostManager(t) + nodeID := types.RandomNodeID() ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) defer cancel() // Should fail since we have not prepared. - req.Error(mgr.StartSession(ctx)) + require.Error(t, mgr.StartSession(ctx, nodeID)) - req.NoError(mgr.PrepareInitializer(ctx, mgr.opts)) + require.NoError(t, mgr.PrepareInitializer(ctx, mgr.opts, nodeID)) // Should fail since we need to call StartSession after PrepareInitializer. - req.Error(mgr.PrepareInitializer(ctx, mgr.opts)) + require.Error(t, mgr.PrepareInitializer(ctx, mgr.opts, nodeID)) - req.NoError(mgr.StartSession(ctx)) + require.NoError(t, mgr.StartSession(ctx, nodeID)) // Should fail since it is required to call PrepareInitializer before each // call to StartSession. - req.Error(mgr.StartSession(ctx)) + require.Error(t, mgr.StartSession(ctx, nodeID)) } func TestPostSetupManager_StateError(t *testing.T) { - req := require.New(t) - mgr := newTestPostManager(t) mgr.opts.NumUnits = 0 - req.Error(mgr.PrepareInitializer(context.Background(), mgr.opts)) + nodeID := types.RandomNodeID() + + require.Error(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) // Verify Status returns StateError - req.Equal(PostSetupStateError, mgr.Status().State) + require.Equal(t, PostSetupStateError, mgr.Status().State) } func TestPostSetupManager_InitialStatus(t *testing.T) { - req := require.New(t) - mgr := newTestPostManager(t) + nodeID := types.RandomNodeID() // Verify the initial status. status := mgr.Status() - req.Equal(PostSetupStateNotStarted, status.State) - req.Zero(status.NumLabelsWritten) + require.Equal(t, PostSetupStateNotStarted, status.State) + require.Zero(t, status.NumLabelsWritten) // Create data. - req.NoError(mgr.PrepareInitializer(context.Background(), mgr.opts)) - req.NoError(mgr.StartSession(context.Background())) - req.Equal(PostSetupStateComplete, mgr.Status().State) + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(context.Background(), nodeID)) + require.Equal(t, PostSetupStateComplete, mgr.Status().State) // Re-instantiate `PostSetupManager`. mgr = newTestPostManager(t) // Verify the initial status. status = mgr.Status() - req.Equal(PostSetupStateNotStarted, status.State) - req.Zero(status.NumLabelsWritten) + require.Equal(t, PostSetupStateNotStarted, status.State) + require.Zero(t, status.NumLabelsWritten) } func TestPostSetupManager_Stop(t *testing.T) { - req := require.New(t) - mgr := newTestPostManager(t) + nodeID := types.RandomNodeID() // Verify state. status := mgr.Status() - req.Equal(PostSetupStateNotStarted, status.State) - req.Zero(status.NumLabelsWritten) + require.Equal(t, PostSetupStateNotStarted, status.State) + require.Zero(t, status.NumLabelsWritten) // Create data. - req.NoError(mgr.PrepareInitializer(context.Background(), mgr.opts)) - req.NoError(mgr.StartSession(context.Background())) + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(context.Background(), nodeID)) // Verify state. - req.Equal(PostSetupStateComplete, mgr.Status().State) + require.Equal(t, PostSetupStateComplete, mgr.Status().State) // Reset. - req.NoError(mgr.Reset()) + require.NoError(t, mgr.Reset()) // Verify state. - req.Equal(PostSetupStateNotStarted, mgr.Status().State) + require.Equal(t, PostSetupStateNotStarted, mgr.Status().State) // Create data again. - req.NoError(mgr.PrepareInitializer(context.Background(), mgr.opts)) - req.NoError(mgr.StartSession(context.Background())) + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(context.Background(), nodeID)) // Verify state. - req.Equal(PostSetupStateComplete, mgr.Status().State) + require.Equal(t, PostSetupStateComplete, mgr.Status().State) } func TestPostSetupManager_Stop_WhileInProgress(t *testing.T) { - req := require.New(t) - mgr := newTestPostManager(t) mgr.opts.MaxFileSize = 4096 mgr.opts.NumUnits = mgr.cfg.MaxNumUnits + nodeID := types.RandomNodeID() + // Create data. - req.NoError(mgr.PrepareInitializer(context.Background(), mgr.opts)) + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) ctx, cancel := context.WithCancel(context.Background()) var eg errgroup.Group eg.Go(func() error { - return mgr.StartSession(ctx) + return mgr.StartSession(ctx, nodeID) }) // Verify the intermediate status. - req.Eventually(func() bool { + require.Eventually(t, func() bool { return mgr.Status().State == PostSetupStateInProgress }, 5*time.Second, 10*time.Millisecond) // Stop initialization. cancel() - req.ErrorIs(eg.Wait(), context.Canceled) + require.ErrorIs(t, eg.Wait(), context.Canceled) // Verify status. status := mgr.Status() - req.Equal(PostSetupStateStopped, status.State) - req.LessOrEqual(status.NumLabelsWritten, uint64(mgr.opts.NumUnits)*mgr.cfg.LabelsPerUnit) + require.Equal(t, PostSetupStateStopped, status.State) + require.LessOrEqual(t, status.NumLabelsWritten, uint64(mgr.opts.NumUnits)*mgr.cfg.LabelsPerUnit) // Continue to create data. - req.NoError(mgr.PrepareInitializer(context.Background(), mgr.opts)) - req.NoError(mgr.StartSession(context.Background())) + require.NoError(t, mgr.PrepareInitializer(context.Background(), mgr.opts, nodeID)) + require.NoError(t, mgr.StartSession(context.Background(), nodeID)) // Verify status. status = mgr.Status() - req.Equal(PostSetupStateComplete, status.State) - req.Equal(uint64(mgr.opts.NumUnits)*mgr.cfg.LabelsPerUnit, status.NumLabelsWritten) + require.Equal(t, PostSetupStateComplete, status.State) + require.Equal(t, uint64(mgr.opts.NumUnits)*mgr.cfg.LabelsPerUnit, status.NumLabelsWritten) } func TestPostSetupManager_findCommitmentAtx_UsesLatestAtx(t *testing.T) { mgr := newTestPostManager(t) + signer, err := signing.NewEdSigner() + require.NoError(t, err) challenge := types.NIPostChallenge{ PublishEpoch: 1, } atx := types.NewActivationTx(challenge, types.Address{}, nil, 2, nil) - require.NoError(t, SignAndFinalizeAtx(mgr.signer, atx)) + require.NoError(t, SignAndFinalizeAtx(signer, atx)) atx.SetEffectiveNumUnits(atx.NumUnits) atx.SetReceived(time.Now()) vAtx, err := atx.Verify(0, 1) @@ -301,16 +299,17 @@ func TestPostSetupManager_findCommitmentAtx_DefaultsToGoldenAtx(t *testing.T) { func TestPostSetupManager_getCommitmentAtx_getsCommitmentAtxFromPostMetadata(t *testing.T) { mgr := newTestPostManager(t) + nodeID := types.RandomNodeID() // write commitment atx to metadata commitmentAtx := types.RandomATXID() err := initialization.SaveMetadata(mgr.opts.DataDir, &shared.PostMetadata{ CommitmentAtxId: commitmentAtx.Bytes(), - NodeId: mgr.signer.NodeID().Bytes(), + NodeId: nodeID.Bytes(), }) require.NoError(t, err) - atxid, err := mgr.commitmentAtx(context.Background(), mgr.opts.DataDir) + atxid, err := mgr.commitmentAtx(context.Background(), mgr.opts.DataDir, nodeID) require.NoError(t, err) require.NotNil(t, atxid) require.Equal(t, commitmentAtx, atxid) @@ -318,19 +317,21 @@ func TestPostSetupManager_getCommitmentAtx_getsCommitmentAtxFromPostMetadata(t * func TestPostSetupManager_getCommitmentAtx_getsCommitmentAtxFromInitialAtx(t *testing.T) { mgr := newTestPostManager(t) + signer, err := signing.NewEdSigner() + require.NoError(t, err) // add an atx by the same node commitmentAtx := types.RandomATXID() atx := types.NewActivationTx(types.NIPostChallenge{}, types.Address{}, nil, 1, nil) atx.CommitmentATX = &commitmentAtx - require.NoError(t, SignAndFinalizeAtx(mgr.signer, atx)) + require.NoError(t, SignAndFinalizeAtx(signer, atx)) atx.SetEffectiveNumUnits(atx.NumUnits) atx.SetReceived(time.Now()) vAtx, err := atx.Verify(0, 1) require.NoError(t, err) require.NoError(t, atxs.Add(mgr.cdb, vAtx)) - atxid, err := mgr.commitmentAtx(context.Background(), mgr.opts.DataDir) + atxid, err := mgr.commitmentAtx(context.Background(), mgr.opts.DataDir, signer.NodeID()) require.NoError(t, err) require.Equal(t, commitmentAtx, atxid) } @@ -340,17 +341,12 @@ type testPostManager struct { opts PostSetupOpts - signer *signing.EdSigner - cdb *datastore.CachedDB + cdb *datastore.CachedDB } func newTestPostManager(tb testing.TB) *testPostManager { tb.Helper() - sig, err := signing.NewEdSigner() - require.NoError(tb, err) - id := sig.NodeID() - opts := DefaultPostSetupOpts() opts.DataDir = tb.TempDir() opts.ProviderID.SetUint32(initialization.CPUProviderID()) @@ -369,13 +365,12 @@ func newTestPostManager(tb testing.TB) *testPostManager { syncer.EXPECT().RegisterForATXSynced().AnyTimes().Return(synced) cdb := datastore.NewCachedDB(sql.InMemory(), logtest.New(tb)) - mgr, err := NewPostSetupManager(id, DefaultPostConfig(), zaptest.NewLogger(tb), cdb, goldenATXID, syncer, validator) + mgr, err := NewPostSetupManager(DefaultPostConfig(), zaptest.NewLogger(tb), cdb, goldenATXID, syncer, validator) require.NoError(tb, err) return &testPostManager{ PostSetupManager: mgr, opts: opts, - signer: sig, cdb: cdb, } } diff --git a/activation/post_verifier.go b/activation/post_verifier.go index fe3ab1a2d05..5443095eb52 100644 --- a/activation/post_verifier.go +++ b/activation/post_verifier.go @@ -112,9 +112,9 @@ func WithVerifyingOpts(opts PostProofVerifyingOpts) PostVerifierOpt { } } -func PrioritizedIDs(ids ...types.NodeID) PostVerifierOpt { +func WithPrioritizedID(id types.NodeID) PostVerifierOpt { return func(v *postVerifierOpts) { - v.prioritizedIds = ids + v.prioritizedIds = append(v.prioritizedIds, id) } } diff --git a/api/grpcserver/grpcserver_test.go b/api/grpcserver/grpcserver_test.go index cc181bcb6f9..1a33b5b6604 100644 --- a/api/grpcserver/grpcserver_test.go +++ b/api/grpcserver/grpcserver_test.go @@ -554,11 +554,17 @@ type smesherServiceConn struct { postSupervisor *MockpostSupervisor } -func setupSmesherService(t *testing.T) (*smesherServiceConn, context.Context) { +func setupSmesherService(t *testing.T, id *types.NodeID) (*smesherServiceConn, context.Context) { ctrl, mockCtx := gomock.WithContext(context.Background(), t) smeshingProvider := activation.NewMockSmeshingProvider(ctrl) postSupervisor := NewMockpostSupervisor(ctrl) - svc := NewSmesherService(smeshingProvider, postSupervisor, 10*time.Millisecond, activation.DefaultPostSetupOpts()) + svc := NewSmesherService( + smeshingProvider, + postSupervisor, + 10*time.Millisecond, + id, + activation.DefaultPostSetupOpts(), + ) cfg, cleanup := launchServer(t, svc) t.Cleanup(cleanup) @@ -578,7 +584,7 @@ func setupSmesherService(t *testing.T) (*smesherServiceConn, context.Context) { func TestSmesherService(t *testing.T) { t.Run("IsSmeshing", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) c.smeshingProvider.EXPECT().Smeshing().Return(false) res, err := c.IsSmeshing(ctx, &emptypb.Empty{}) require.NoError(t, err) @@ -587,7 +593,7 @@ func TestSmesherService(t *testing.T) { t.Run("StartSmeshingMissingArgs", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) _, err := c.StartSmeshing(ctx, &pb.StartSmeshingRequest{}) require.Equal(t, codes.InvalidArgument, status.Code(err)) }) @@ -600,8 +606,9 @@ func TestSmesherService(t *testing.T) { opts.MaxFileSize = 1024 coinbase := &pb.AccountId{Address: addr1.String()} + nodeID := types.RandomNodeID() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, &nodeID) c.smeshingProvider.EXPECT().StartSmeshing(gomock.Any()).Return(nil) c.postSupervisor.EXPECT().Start(gomock.All( gomock.Cond(func(postOpts any) bool { return postOpts.(activation.PostSetupOpts).DataDir == opts.DataDir }), @@ -611,7 +618,7 @@ func TestSmesherService(t *testing.T) { gomock.Cond( func(postOpts any) bool { return postOpts.(activation.PostSetupOpts).MaxFileSize == opts.MaxFileSize }, ), - )).Return(nil) + ), nodeID).Return(nil) res, err := c.StartSmeshing(ctx, &pb.StartSmeshingRequest{ Opts: opts, Coinbase: coinbase, @@ -622,7 +629,7 @@ func TestSmesherService(t *testing.T) { t.Run("StopSmeshing", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) c.smeshingProvider.EXPECT().StopSmeshing(gomock.Any()).Return(nil) c.postSupervisor.EXPECT().Stop(false).Return(nil) res, err := c.StopSmeshing(ctx, &pb.StopSmeshingRequest{}) @@ -632,7 +639,7 @@ func TestSmesherService(t *testing.T) { t.Run("SmesherIDs", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) nodeId := types.RandomNodeID() c.smeshingProvider.EXPECT().SmesherIDs().Return([]types.NodeID{nodeId}) res, err := c.SmesherIDs(ctx, &emptypb.Empty{}) @@ -643,7 +650,7 @@ func TestSmesherService(t *testing.T) { t.Run("SetCoinbaseMissingArgs", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) _, err := c.SetCoinbase(ctx, &pb.SetCoinbaseRequest{}) require.Error(t, err) statusCode := status.Code(err) @@ -652,7 +659,7 @@ func TestSmesherService(t *testing.T) { t.Run("SetCoinbase", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) c.smeshingProvider.EXPECT().SetCoinbase(addr1) res, err := c.SetCoinbase(ctx, &pb.SetCoinbaseRequest{ Id: &pb.AccountId{Address: addr1.String()}, @@ -663,7 +670,7 @@ func TestSmesherService(t *testing.T) { t.Run("Coinbase", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) c.smeshingProvider.EXPECT().Coinbase().Return(addr1) res, err := c.Coinbase(ctx, &emptypb.Empty{}) require.NoError(t, err) @@ -674,7 +681,7 @@ func TestSmesherService(t *testing.T) { t.Run("MinGas", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) _, err := c.MinGas(ctx, &emptypb.Empty{}) require.Error(t, err) statusCode := status.Code(err) @@ -683,7 +690,7 @@ func TestSmesherService(t *testing.T) { t.Run("SetMinGas", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) _, err := c.SetMinGas(ctx, &pb.SetMinGasRequest{}) require.Error(t, err) statusCode := status.Code(err) @@ -692,7 +699,7 @@ func TestSmesherService(t *testing.T) { t.Run("PostSetupComputeProviders", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) c.postSupervisor.EXPECT().Providers().Return(nil, nil) _, err := c.PostSetupProviders(ctx, &pb.PostSetupProvidersRequest{Benchmark: false}) require.NoError(t, err) @@ -700,7 +707,7 @@ func TestSmesherService(t *testing.T) { t.Run("PostSetupStatusStream", func(t *testing.T) { t.Parallel() - c, ctx := setupSmesherService(t) + c, ctx := setupSmesherService(t, nil) c.postSupervisor.EXPECT().Status().Return(&activation.PostSetupStatus{}).AnyTimes() ctx, cancel := context.WithCancel(ctx) diff --git a/api/grpcserver/interface.go b/api/grpcserver/interface.go index ebc41f7022d..ce3c3f6fb9a 100644 --- a/api/grpcserver/interface.go +++ b/api/grpcserver/interface.go @@ -57,7 +57,7 @@ type atxProvider interface { } type postSupervisor interface { - Start(opts activation.PostSetupOpts) error + Start(opts activation.PostSetupOpts, id types.NodeID) error Stop(deleteFiles bool) error Config() activation.PostConfig diff --git a/api/grpcserver/mocks.go b/api/grpcserver/mocks.go index 59bc0f89e11..01ce9bbdcf9 100644 --- a/api/grpcserver/mocks.go +++ b/api/grpcserver/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=grpcserver -destination=./mocks.go -source=./interface.go // + // Package grpcserver is a generated GoMock package. package grpcserver @@ -54,31 +55,31 @@ func (m *MocknetworkInfo) DHTServerEnabled() bool { } // DHTServerEnabled indicates an expected call of DHTServerEnabled. -func (mr *MocknetworkInfoMockRecorder) DHTServerEnabled() *networkInfoDHTServerEnabledCall { +func (mr *MocknetworkInfoMockRecorder) DHTServerEnabled() *MocknetworkInfoDHTServerEnabledCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DHTServerEnabled", reflect.TypeOf((*MocknetworkInfo)(nil).DHTServerEnabled)) - return &networkInfoDHTServerEnabledCall{Call: call} + return &MocknetworkInfoDHTServerEnabledCall{Call: call} } -// networkInfoDHTServerEnabledCall wrap *gomock.Call -type networkInfoDHTServerEnabledCall struct { +// MocknetworkInfoDHTServerEnabledCall wrap *gomock.Call +type MocknetworkInfoDHTServerEnabledCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *networkInfoDHTServerEnabledCall) Return(arg0 bool) *networkInfoDHTServerEnabledCall { +func (c *MocknetworkInfoDHTServerEnabledCall) Return(arg0 bool) *MocknetworkInfoDHTServerEnabledCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *networkInfoDHTServerEnabledCall) Do(f func() bool) *networkInfoDHTServerEnabledCall { +func (c *MocknetworkInfoDHTServerEnabledCall) Do(f func() bool) *MocknetworkInfoDHTServerEnabledCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *networkInfoDHTServerEnabledCall) DoAndReturn(f func() bool) *networkInfoDHTServerEnabledCall { +func (c *MocknetworkInfoDHTServerEnabledCall) DoAndReturn(f func() bool) *MocknetworkInfoDHTServerEnabledCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +93,31 @@ func (m *MocknetworkInfo) ID() p2p.Peer { } // ID indicates an expected call of ID. -func (mr *MocknetworkInfoMockRecorder) ID() *networkInfoIDCall { +func (mr *MocknetworkInfoMockRecorder) ID() *MocknetworkInfoIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MocknetworkInfo)(nil).ID)) - return &networkInfoIDCall{Call: call} + return &MocknetworkInfoIDCall{Call: call} } -// networkInfoIDCall wrap *gomock.Call -type networkInfoIDCall struct { +// MocknetworkInfoIDCall wrap *gomock.Call +type MocknetworkInfoIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *networkInfoIDCall) Return(arg0 p2p.Peer) *networkInfoIDCall { +func (c *MocknetworkInfoIDCall) Return(arg0 p2p.Peer) *MocknetworkInfoIDCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *networkInfoIDCall) Do(f func() p2p.Peer) *networkInfoIDCall { +func (c *MocknetworkInfoIDCall) Do(f func() p2p.Peer) *MocknetworkInfoIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *networkInfoIDCall) DoAndReturn(f func() p2p.Peer) *networkInfoIDCall { +func (c *MocknetworkInfoIDCall) DoAndReturn(f func() p2p.Peer) *MocknetworkInfoIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -130,31 +131,31 @@ func (m *MocknetworkInfo) KnownAddresses() []multiaddr.Multiaddr { } // KnownAddresses indicates an expected call of KnownAddresses. -func (mr *MocknetworkInfoMockRecorder) KnownAddresses() *networkInfoKnownAddressesCall { +func (mr *MocknetworkInfoMockRecorder) KnownAddresses() *MocknetworkInfoKnownAddressesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KnownAddresses", reflect.TypeOf((*MocknetworkInfo)(nil).KnownAddresses)) - return &networkInfoKnownAddressesCall{Call: call} + return &MocknetworkInfoKnownAddressesCall{Call: call} } -// networkInfoKnownAddressesCall wrap *gomock.Call -type networkInfoKnownAddressesCall struct { +// MocknetworkInfoKnownAddressesCall wrap *gomock.Call +type MocknetworkInfoKnownAddressesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *networkInfoKnownAddressesCall) Return(arg0 []multiaddr.Multiaddr) *networkInfoKnownAddressesCall { +func (c *MocknetworkInfoKnownAddressesCall) Return(arg0 []multiaddr.Multiaddr) *MocknetworkInfoKnownAddressesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *networkInfoKnownAddressesCall) Do(f func() []multiaddr.Multiaddr) *networkInfoKnownAddressesCall { +func (c *MocknetworkInfoKnownAddressesCall) Do(f func() []multiaddr.Multiaddr) *MocknetworkInfoKnownAddressesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *networkInfoKnownAddressesCall) DoAndReturn(f func() []multiaddr.Multiaddr) *networkInfoKnownAddressesCall { +func (c *MocknetworkInfoKnownAddressesCall) DoAndReturn(f func() []multiaddr.Multiaddr) *MocknetworkInfoKnownAddressesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -168,31 +169,31 @@ func (m *MocknetworkInfo) ListenAddresses() []multiaddr.Multiaddr { } // ListenAddresses indicates an expected call of ListenAddresses. -func (mr *MocknetworkInfoMockRecorder) ListenAddresses() *networkInfoListenAddressesCall { +func (mr *MocknetworkInfoMockRecorder) ListenAddresses() *MocknetworkInfoListenAddressesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListenAddresses", reflect.TypeOf((*MocknetworkInfo)(nil).ListenAddresses)) - return &networkInfoListenAddressesCall{Call: call} + return &MocknetworkInfoListenAddressesCall{Call: call} } -// networkInfoListenAddressesCall wrap *gomock.Call -type networkInfoListenAddressesCall struct { +// MocknetworkInfoListenAddressesCall wrap *gomock.Call +type MocknetworkInfoListenAddressesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *networkInfoListenAddressesCall) Return(arg0 []multiaddr.Multiaddr) *networkInfoListenAddressesCall { +func (c *MocknetworkInfoListenAddressesCall) Return(arg0 []multiaddr.Multiaddr) *MocknetworkInfoListenAddressesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *networkInfoListenAddressesCall) Do(f func() []multiaddr.Multiaddr) *networkInfoListenAddressesCall { +func (c *MocknetworkInfoListenAddressesCall) Do(f func() []multiaddr.Multiaddr) *MocknetworkInfoListenAddressesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *networkInfoListenAddressesCall) DoAndReturn(f func() []multiaddr.Multiaddr) *networkInfoListenAddressesCall { +func (c *MocknetworkInfoListenAddressesCall) DoAndReturn(f func() []multiaddr.Multiaddr) *MocknetworkInfoListenAddressesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -207,31 +208,31 @@ func (m *MocknetworkInfo) NATDeviceType() (network.NATDeviceType, network.NATDev } // NATDeviceType indicates an expected call of NATDeviceType. -func (mr *MocknetworkInfoMockRecorder) NATDeviceType() *networkInfoNATDeviceTypeCall { +func (mr *MocknetworkInfoMockRecorder) NATDeviceType() *MocknetworkInfoNATDeviceTypeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NATDeviceType", reflect.TypeOf((*MocknetworkInfo)(nil).NATDeviceType)) - return &networkInfoNATDeviceTypeCall{Call: call} + return &MocknetworkInfoNATDeviceTypeCall{Call: call} } -// networkInfoNATDeviceTypeCall wrap *gomock.Call -type networkInfoNATDeviceTypeCall struct { +// MocknetworkInfoNATDeviceTypeCall wrap *gomock.Call +type MocknetworkInfoNATDeviceTypeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *networkInfoNATDeviceTypeCall) Return(udpNATType, tcpNATType network.NATDeviceType) *networkInfoNATDeviceTypeCall { +func (c *MocknetworkInfoNATDeviceTypeCall) Return(udpNATType, tcpNATType network.NATDeviceType) *MocknetworkInfoNATDeviceTypeCall { c.Call = c.Call.Return(udpNATType, tcpNATType) return c } // Do rewrite *gomock.Call.Do -func (c *networkInfoNATDeviceTypeCall) Do(f func() (network.NATDeviceType, network.NATDeviceType)) *networkInfoNATDeviceTypeCall { +func (c *MocknetworkInfoNATDeviceTypeCall) Do(f func() (network.NATDeviceType, network.NATDeviceType)) *MocknetworkInfoNATDeviceTypeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *networkInfoNATDeviceTypeCall) DoAndReturn(f func() (network.NATDeviceType, network.NATDeviceType)) *networkInfoNATDeviceTypeCall { +func (c *MocknetworkInfoNATDeviceTypeCall) DoAndReturn(f func() (network.NATDeviceType, network.NATDeviceType)) *MocknetworkInfoNATDeviceTypeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -245,31 +246,31 @@ func (m *MocknetworkInfo) Reachability() network.Reachability { } // Reachability indicates an expected call of Reachability. -func (mr *MocknetworkInfoMockRecorder) Reachability() *networkInfoReachabilityCall { +func (mr *MocknetworkInfoMockRecorder) Reachability() *MocknetworkInfoReachabilityCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reachability", reflect.TypeOf((*MocknetworkInfo)(nil).Reachability)) - return &networkInfoReachabilityCall{Call: call} + return &MocknetworkInfoReachabilityCall{Call: call} } -// networkInfoReachabilityCall wrap *gomock.Call -type networkInfoReachabilityCall struct { +// MocknetworkInfoReachabilityCall wrap *gomock.Call +type MocknetworkInfoReachabilityCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *networkInfoReachabilityCall) Return(arg0 network.Reachability) *networkInfoReachabilityCall { +func (c *MocknetworkInfoReachabilityCall) Return(arg0 network.Reachability) *MocknetworkInfoReachabilityCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *networkInfoReachabilityCall) Do(f func() network.Reachability) *networkInfoReachabilityCall { +func (c *MocknetworkInfoReachabilityCall) Do(f func() network.Reachability) *MocknetworkInfoReachabilityCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *networkInfoReachabilityCall) DoAndReturn(f func() network.Reachability) *networkInfoReachabilityCall { +func (c *MocknetworkInfoReachabilityCall) DoAndReturn(f func() network.Reachability) *MocknetworkInfoReachabilityCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -307,31 +308,31 @@ func (m *MockconservativeState) GetAllAccounts() ([]*types.Account, error) { } // GetAllAccounts indicates an expected call of GetAllAccounts. -func (mr *MockconservativeStateMockRecorder) GetAllAccounts() *conservativeStateGetAllAccountsCall { +func (mr *MockconservativeStateMockRecorder) GetAllAccounts() *MockconservativeStateGetAllAccountsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllAccounts", reflect.TypeOf((*MockconservativeState)(nil).GetAllAccounts)) - return &conservativeStateGetAllAccountsCall{Call: call} + return &MockconservativeStateGetAllAccountsCall{Call: call} } -// conservativeStateGetAllAccountsCall wrap *gomock.Call -type conservativeStateGetAllAccountsCall struct { +// MockconservativeStateGetAllAccountsCall wrap *gomock.Call +type MockconservativeStateGetAllAccountsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetAllAccountsCall) Return(arg0 []*types.Account, arg1 error) *conservativeStateGetAllAccountsCall { +func (c *MockconservativeStateGetAllAccountsCall) Return(arg0 []*types.Account, arg1 error) *MockconservativeStateGetAllAccountsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetAllAccountsCall) Do(f func() ([]*types.Account, error)) *conservativeStateGetAllAccountsCall { +func (c *MockconservativeStateGetAllAccountsCall) Do(f func() ([]*types.Account, error)) *MockconservativeStateGetAllAccountsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetAllAccountsCall) DoAndReturn(f func() ([]*types.Account, error)) *conservativeStateGetAllAccountsCall { +func (c *MockconservativeStateGetAllAccountsCall) DoAndReturn(f func() ([]*types.Account, error)) *MockconservativeStateGetAllAccountsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -346,31 +347,31 @@ func (m *MockconservativeState) GetBalance(arg0 types.Address) (uint64, error) { } // GetBalance indicates an expected call of GetBalance. -func (mr *MockconservativeStateMockRecorder) GetBalance(arg0 any) *conservativeStateGetBalanceCall { +func (mr *MockconservativeStateMockRecorder) GetBalance(arg0 any) *MockconservativeStateGetBalanceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockconservativeState)(nil).GetBalance), arg0) - return &conservativeStateGetBalanceCall{Call: call} + return &MockconservativeStateGetBalanceCall{Call: call} } -// conservativeStateGetBalanceCall wrap *gomock.Call -type conservativeStateGetBalanceCall struct { +// MockconservativeStateGetBalanceCall wrap *gomock.Call +type MockconservativeStateGetBalanceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetBalanceCall) Return(arg0 uint64, arg1 error) *conservativeStateGetBalanceCall { +func (c *MockconservativeStateGetBalanceCall) Return(arg0 uint64, arg1 error) *MockconservativeStateGetBalanceCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetBalanceCall) Do(f func(types.Address) (uint64, error)) *conservativeStateGetBalanceCall { +func (c *MockconservativeStateGetBalanceCall) Do(f func(types.Address) (uint64, error)) *MockconservativeStateGetBalanceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetBalanceCall) DoAndReturn(f func(types.Address) (uint64, error)) *conservativeStateGetBalanceCall { +func (c *MockconservativeStateGetBalanceCall) DoAndReturn(f func(types.Address) (uint64, error)) *MockconservativeStateGetBalanceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -385,31 +386,31 @@ func (m *MockconservativeState) GetLayerStateRoot(arg0 types.LayerID) (types.Has } // GetLayerStateRoot indicates an expected call of GetLayerStateRoot. -func (mr *MockconservativeStateMockRecorder) GetLayerStateRoot(arg0 any) *conservativeStateGetLayerStateRootCall { +func (mr *MockconservativeStateMockRecorder) GetLayerStateRoot(arg0 any) *MockconservativeStateGetLayerStateRootCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerStateRoot", reflect.TypeOf((*MockconservativeState)(nil).GetLayerStateRoot), arg0) - return &conservativeStateGetLayerStateRootCall{Call: call} + return &MockconservativeStateGetLayerStateRootCall{Call: call} } -// conservativeStateGetLayerStateRootCall wrap *gomock.Call -type conservativeStateGetLayerStateRootCall struct { +// MockconservativeStateGetLayerStateRootCall wrap *gomock.Call +type MockconservativeStateGetLayerStateRootCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetLayerStateRootCall) Return(arg0 types.Hash32, arg1 error) *conservativeStateGetLayerStateRootCall { +func (c *MockconservativeStateGetLayerStateRootCall) Return(arg0 types.Hash32, arg1 error) *MockconservativeStateGetLayerStateRootCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetLayerStateRootCall) Do(f func(types.LayerID) (types.Hash32, error)) *conservativeStateGetLayerStateRootCall { +func (c *MockconservativeStateGetLayerStateRootCall) Do(f func(types.LayerID) (types.Hash32, error)) *MockconservativeStateGetLayerStateRootCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetLayerStateRootCall) DoAndReturn(f func(types.LayerID) (types.Hash32, error)) *conservativeStateGetLayerStateRootCall { +func (c *MockconservativeStateGetLayerStateRootCall) DoAndReturn(f func(types.LayerID) (types.Hash32, error)) *MockconservativeStateGetLayerStateRootCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -424,31 +425,31 @@ func (m *MockconservativeState) GetMeshTransaction(arg0 types.TransactionID) (*t } // GetMeshTransaction indicates an expected call of GetMeshTransaction. -func (mr *MockconservativeStateMockRecorder) GetMeshTransaction(arg0 any) *conservativeStateGetMeshTransactionCall { +func (mr *MockconservativeStateMockRecorder) GetMeshTransaction(arg0 any) *MockconservativeStateGetMeshTransactionCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMeshTransaction", reflect.TypeOf((*MockconservativeState)(nil).GetMeshTransaction), arg0) - return &conservativeStateGetMeshTransactionCall{Call: call} + return &MockconservativeStateGetMeshTransactionCall{Call: call} } -// conservativeStateGetMeshTransactionCall wrap *gomock.Call -type conservativeStateGetMeshTransactionCall struct { +// MockconservativeStateGetMeshTransactionCall wrap *gomock.Call +type MockconservativeStateGetMeshTransactionCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetMeshTransactionCall) Return(arg0 *types.MeshTransaction, arg1 error) *conservativeStateGetMeshTransactionCall { +func (c *MockconservativeStateGetMeshTransactionCall) Return(arg0 *types.MeshTransaction, arg1 error) *MockconservativeStateGetMeshTransactionCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetMeshTransactionCall) Do(f func(types.TransactionID) (*types.MeshTransaction, error)) *conservativeStateGetMeshTransactionCall { +func (c *MockconservativeStateGetMeshTransactionCall) Do(f func(types.TransactionID) (*types.MeshTransaction, error)) *MockconservativeStateGetMeshTransactionCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetMeshTransactionCall) DoAndReturn(f func(types.TransactionID) (*types.MeshTransaction, error)) *conservativeStateGetMeshTransactionCall { +func (c *MockconservativeStateGetMeshTransactionCall) DoAndReturn(f func(types.TransactionID) (*types.MeshTransaction, error)) *MockconservativeStateGetMeshTransactionCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -463,31 +464,31 @@ func (m *MockconservativeState) GetMeshTransactions(arg0 []types.TransactionID) } // GetMeshTransactions indicates an expected call of GetMeshTransactions. -func (mr *MockconservativeStateMockRecorder) GetMeshTransactions(arg0 any) *conservativeStateGetMeshTransactionsCall { +func (mr *MockconservativeStateMockRecorder) GetMeshTransactions(arg0 any) *MockconservativeStateGetMeshTransactionsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMeshTransactions", reflect.TypeOf((*MockconservativeState)(nil).GetMeshTransactions), arg0) - return &conservativeStateGetMeshTransactionsCall{Call: call} + return &MockconservativeStateGetMeshTransactionsCall{Call: call} } -// conservativeStateGetMeshTransactionsCall wrap *gomock.Call -type conservativeStateGetMeshTransactionsCall struct { +// MockconservativeStateGetMeshTransactionsCall wrap *gomock.Call +type MockconservativeStateGetMeshTransactionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetMeshTransactionsCall) Return(arg0 []*types.MeshTransaction, arg1 map[types.TransactionID]struct{}) *conservativeStateGetMeshTransactionsCall { +func (c *MockconservativeStateGetMeshTransactionsCall) Return(arg0 []*types.MeshTransaction, arg1 map[types.TransactionID]struct{}) *MockconservativeStateGetMeshTransactionsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetMeshTransactionsCall) Do(f func([]types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})) *conservativeStateGetMeshTransactionsCall { +func (c *MockconservativeStateGetMeshTransactionsCall) Do(f func([]types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})) *MockconservativeStateGetMeshTransactionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetMeshTransactionsCall) DoAndReturn(f func([]types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})) *conservativeStateGetMeshTransactionsCall { +func (c *MockconservativeStateGetMeshTransactionsCall) DoAndReturn(f func([]types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})) *MockconservativeStateGetMeshTransactionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -502,31 +503,31 @@ func (m *MockconservativeState) GetNonce(arg0 types.Address) (types.Nonce, error } // GetNonce indicates an expected call of GetNonce. -func (mr *MockconservativeStateMockRecorder) GetNonce(arg0 any) *conservativeStateGetNonceCall { +func (mr *MockconservativeStateMockRecorder) GetNonce(arg0 any) *MockconservativeStateGetNonceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNonce", reflect.TypeOf((*MockconservativeState)(nil).GetNonce), arg0) - return &conservativeStateGetNonceCall{Call: call} + return &MockconservativeStateGetNonceCall{Call: call} } -// conservativeStateGetNonceCall wrap *gomock.Call -type conservativeStateGetNonceCall struct { +// MockconservativeStateGetNonceCall wrap *gomock.Call +type MockconservativeStateGetNonceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetNonceCall) Return(arg0 types.Nonce, arg1 error) *conservativeStateGetNonceCall { +func (c *MockconservativeStateGetNonceCall) Return(arg0 types.Nonce, arg1 error) *MockconservativeStateGetNonceCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetNonceCall) Do(f func(types.Address) (types.Nonce, error)) *conservativeStateGetNonceCall { +func (c *MockconservativeStateGetNonceCall) Do(f func(types.Address) (types.Nonce, error)) *MockconservativeStateGetNonceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetNonceCall) DoAndReturn(f func(types.Address) (types.Nonce, error)) *conservativeStateGetNonceCall { +func (c *MockconservativeStateGetNonceCall) DoAndReturn(f func(types.Address) (types.Nonce, error)) *MockconservativeStateGetNonceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -541,31 +542,31 @@ func (m *MockconservativeState) GetProjection(arg0 types.Address) (uint64, uint6 } // GetProjection indicates an expected call of GetProjection. -func (mr *MockconservativeStateMockRecorder) GetProjection(arg0 any) *conservativeStateGetProjectionCall { +func (mr *MockconservativeStateMockRecorder) GetProjection(arg0 any) *MockconservativeStateGetProjectionCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProjection", reflect.TypeOf((*MockconservativeState)(nil).GetProjection), arg0) - return &conservativeStateGetProjectionCall{Call: call} + return &MockconservativeStateGetProjectionCall{Call: call} } -// conservativeStateGetProjectionCall wrap *gomock.Call -type conservativeStateGetProjectionCall struct { +// MockconservativeStateGetProjectionCall wrap *gomock.Call +type MockconservativeStateGetProjectionCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetProjectionCall) Return(arg0, arg1 uint64) *conservativeStateGetProjectionCall { +func (c *MockconservativeStateGetProjectionCall) Return(arg0, arg1 uint64) *MockconservativeStateGetProjectionCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetProjectionCall) Do(f func(types.Address) (uint64, uint64)) *conservativeStateGetProjectionCall { +func (c *MockconservativeStateGetProjectionCall) Do(f func(types.Address) (uint64, uint64)) *MockconservativeStateGetProjectionCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetProjectionCall) DoAndReturn(f func(types.Address) (uint64, uint64)) *conservativeStateGetProjectionCall { +func (c *MockconservativeStateGetProjectionCall) DoAndReturn(f func(types.Address) (uint64, uint64)) *MockconservativeStateGetProjectionCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -580,31 +581,31 @@ func (m *MockconservativeState) GetStateRoot() (types.Hash32, error) { } // GetStateRoot indicates an expected call of GetStateRoot. -func (mr *MockconservativeStateMockRecorder) GetStateRoot() *conservativeStateGetStateRootCall { +func (mr *MockconservativeStateMockRecorder) GetStateRoot() *MockconservativeStateGetStateRootCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStateRoot", reflect.TypeOf((*MockconservativeState)(nil).GetStateRoot)) - return &conservativeStateGetStateRootCall{Call: call} + return &MockconservativeStateGetStateRootCall{Call: call} } -// conservativeStateGetStateRootCall wrap *gomock.Call -type conservativeStateGetStateRootCall struct { +// MockconservativeStateGetStateRootCall wrap *gomock.Call +type MockconservativeStateGetStateRootCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetStateRootCall) Return(arg0 types.Hash32, arg1 error) *conservativeStateGetStateRootCall { +func (c *MockconservativeStateGetStateRootCall) Return(arg0 types.Hash32, arg1 error) *MockconservativeStateGetStateRootCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetStateRootCall) Do(f func() (types.Hash32, error)) *conservativeStateGetStateRootCall { +func (c *MockconservativeStateGetStateRootCall) Do(f func() (types.Hash32, error)) *MockconservativeStateGetStateRootCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetStateRootCall) DoAndReturn(f func() (types.Hash32, error)) *conservativeStateGetStateRootCall { +func (c *MockconservativeStateGetStateRootCall) DoAndReturn(f func() (types.Hash32, error)) *MockconservativeStateGetStateRootCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -619,31 +620,31 @@ func (m *MockconservativeState) GetTransactionsByAddress(arg0, arg1 types.LayerI } // GetTransactionsByAddress indicates an expected call of GetTransactionsByAddress. -func (mr *MockconservativeStateMockRecorder) GetTransactionsByAddress(arg0, arg1, arg2 any) *conservativeStateGetTransactionsByAddressCall { +func (mr *MockconservativeStateMockRecorder) GetTransactionsByAddress(arg0, arg1, arg2 any) *MockconservativeStateGetTransactionsByAddressCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionsByAddress", reflect.TypeOf((*MockconservativeState)(nil).GetTransactionsByAddress), arg0, arg1, arg2) - return &conservativeStateGetTransactionsByAddressCall{Call: call} + return &MockconservativeStateGetTransactionsByAddressCall{Call: call} } -// conservativeStateGetTransactionsByAddressCall wrap *gomock.Call -type conservativeStateGetTransactionsByAddressCall struct { +// MockconservativeStateGetTransactionsByAddressCall wrap *gomock.Call +type MockconservativeStateGetTransactionsByAddressCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetTransactionsByAddressCall) Return(arg0 []*types.MeshTransaction, arg1 error) *conservativeStateGetTransactionsByAddressCall { +func (c *MockconservativeStateGetTransactionsByAddressCall) Return(arg0 []*types.MeshTransaction, arg1 error) *MockconservativeStateGetTransactionsByAddressCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetTransactionsByAddressCall) Do(f func(types.LayerID, types.LayerID, types.Address) ([]*types.MeshTransaction, error)) *conservativeStateGetTransactionsByAddressCall { +func (c *MockconservativeStateGetTransactionsByAddressCall) Do(f func(types.LayerID, types.LayerID, types.Address) ([]*types.MeshTransaction, error)) *MockconservativeStateGetTransactionsByAddressCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetTransactionsByAddressCall) DoAndReturn(f func(types.LayerID, types.LayerID, types.Address) ([]*types.MeshTransaction, error)) *conservativeStateGetTransactionsByAddressCall { +func (c *MockconservativeStateGetTransactionsByAddressCall) DoAndReturn(f func(types.LayerID, types.LayerID, types.Address) ([]*types.MeshTransaction, error)) *MockconservativeStateGetTransactionsByAddressCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -657,31 +658,31 @@ func (m *MockconservativeState) Validation(raw types.RawTx) system.ValidationReq } // Validation indicates an expected call of Validation. -func (mr *MockconservativeStateMockRecorder) Validation(raw any) *conservativeStateValidationCall { +func (mr *MockconservativeStateMockRecorder) Validation(raw any) *MockconservativeStateValidationCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validation", reflect.TypeOf((*MockconservativeState)(nil).Validation), raw) - return &conservativeStateValidationCall{Call: call} + return &MockconservativeStateValidationCall{Call: call} } -// conservativeStateValidationCall wrap *gomock.Call -type conservativeStateValidationCall struct { +// MockconservativeStateValidationCall wrap *gomock.Call +type MockconservativeStateValidationCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateValidationCall) Return(arg0 system.ValidationRequest) *conservativeStateValidationCall { +func (c *MockconservativeStateValidationCall) Return(arg0 system.ValidationRequest) *MockconservativeStateValidationCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateValidationCall) Do(f func(types.RawTx) system.ValidationRequest) *conservativeStateValidationCall { +func (c *MockconservativeStateValidationCall) Do(f func(types.RawTx) system.ValidationRequest) *MockconservativeStateValidationCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateValidationCall) DoAndReturn(f func(types.RawTx) system.ValidationRequest) *conservativeStateValidationCall { +func (c *MockconservativeStateValidationCall) DoAndReturn(f func(types.RawTx) system.ValidationRequest) *MockconservativeStateValidationCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -718,31 +719,31 @@ func (m *Mocksyncer) IsSynced(arg0 context.Context) bool { } // IsSynced indicates an expected call of IsSynced. -func (mr *MocksyncerMockRecorder) IsSynced(arg0 any) *syncerIsSyncedCall { +func (mr *MocksyncerMockRecorder) IsSynced(arg0 any) *MocksyncerIsSyncedCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSynced", reflect.TypeOf((*Mocksyncer)(nil).IsSynced), arg0) - return &syncerIsSyncedCall{Call: call} + return &MocksyncerIsSyncedCall{Call: call} } -// syncerIsSyncedCall wrap *gomock.Call -type syncerIsSyncedCall struct { +// MocksyncerIsSyncedCall wrap *gomock.Call +type MocksyncerIsSyncedCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *syncerIsSyncedCall) Return(arg0 bool) *syncerIsSyncedCall { +func (c *MocksyncerIsSyncedCall) Return(arg0 bool) *MocksyncerIsSyncedCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *syncerIsSyncedCall) Do(f func(context.Context) bool) *syncerIsSyncedCall { +func (c *MocksyncerIsSyncedCall) Do(f func(context.Context) bool) *MocksyncerIsSyncedCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *syncerIsSyncedCall) DoAndReturn(f func(context.Context) bool) *syncerIsSyncedCall { +func (c *MocksyncerIsSyncedCall) DoAndReturn(f func(context.Context) bool) *MocksyncerIsSyncedCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -779,31 +780,31 @@ func (m *MocktxValidator) VerifyAndCacheTx(arg0 context.Context, arg1 []byte) er } // VerifyAndCacheTx indicates an expected call of VerifyAndCacheTx. -func (mr *MocktxValidatorMockRecorder) VerifyAndCacheTx(arg0, arg1 any) *txValidatorVerifyAndCacheTxCall { +func (mr *MocktxValidatorMockRecorder) VerifyAndCacheTx(arg0, arg1 any) *MocktxValidatorVerifyAndCacheTxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyAndCacheTx", reflect.TypeOf((*MocktxValidator)(nil).VerifyAndCacheTx), arg0, arg1) - return &txValidatorVerifyAndCacheTxCall{Call: call} + return &MocktxValidatorVerifyAndCacheTxCall{Call: call} } -// txValidatorVerifyAndCacheTxCall wrap *gomock.Call -type txValidatorVerifyAndCacheTxCall struct { +// MocktxValidatorVerifyAndCacheTxCall wrap *gomock.Call +type MocktxValidatorVerifyAndCacheTxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *txValidatorVerifyAndCacheTxCall) Return(arg0 error) *txValidatorVerifyAndCacheTxCall { +func (c *MocktxValidatorVerifyAndCacheTxCall) Return(arg0 error) *MocktxValidatorVerifyAndCacheTxCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *txValidatorVerifyAndCacheTxCall) Do(f func(context.Context, []byte) error) *txValidatorVerifyAndCacheTxCall { +func (c *MocktxValidatorVerifyAndCacheTxCall) Do(f func(context.Context, []byte) error) *MocktxValidatorVerifyAndCacheTxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *txValidatorVerifyAndCacheTxCall) DoAndReturn(f func(context.Context, []byte) error) *txValidatorVerifyAndCacheTxCall { +func (c *MocktxValidatorVerifyAndCacheTxCall) DoAndReturn(f func(context.Context, []byte) error) *MocktxValidatorVerifyAndCacheTxCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -841,31 +842,31 @@ func (m *MockatxProvider) GetFullAtx(id types.ATXID) (*types.VerifiedActivationT } // GetFullAtx indicates an expected call of GetFullAtx. -func (mr *MockatxProviderMockRecorder) GetFullAtx(id any) *atxProviderGetFullAtxCall { +func (mr *MockatxProviderMockRecorder) GetFullAtx(id any) *MockatxProviderGetFullAtxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFullAtx", reflect.TypeOf((*MockatxProvider)(nil).GetFullAtx), id) - return &atxProviderGetFullAtxCall{Call: call} + return &MockatxProviderGetFullAtxCall{Call: call} } -// atxProviderGetFullAtxCall wrap *gomock.Call -type atxProviderGetFullAtxCall struct { +// MockatxProviderGetFullAtxCall wrap *gomock.Call +type MockatxProviderGetFullAtxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *atxProviderGetFullAtxCall) Return(arg0 *types.VerifiedActivationTx, arg1 error) *atxProviderGetFullAtxCall { +func (c *MockatxProviderGetFullAtxCall) Return(arg0 *types.VerifiedActivationTx, arg1 error) *MockatxProviderGetFullAtxCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *atxProviderGetFullAtxCall) Do(f func(types.ATXID) (*types.VerifiedActivationTx, error)) *atxProviderGetFullAtxCall { +func (c *MockatxProviderGetFullAtxCall) Do(f func(types.ATXID) (*types.VerifiedActivationTx, error)) *MockatxProviderGetFullAtxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *atxProviderGetFullAtxCall) DoAndReturn(f func(types.ATXID) (*types.VerifiedActivationTx, error)) *atxProviderGetFullAtxCall { +func (c *MockatxProviderGetFullAtxCall) DoAndReturn(f func(types.ATXID) (*types.VerifiedActivationTx, error)) *MockatxProviderGetFullAtxCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -880,31 +881,31 @@ func (m *MockatxProvider) GetMalfeasanceProof(id types.NodeID) (*types.Malfeasan } // GetMalfeasanceProof indicates an expected call of GetMalfeasanceProof. -func (mr *MockatxProviderMockRecorder) GetMalfeasanceProof(id any) *atxProviderGetMalfeasanceProofCall { +func (mr *MockatxProviderMockRecorder) GetMalfeasanceProof(id any) *MockatxProviderGetMalfeasanceProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMalfeasanceProof", reflect.TypeOf((*MockatxProvider)(nil).GetMalfeasanceProof), id) - return &atxProviderGetMalfeasanceProofCall{Call: call} + return &MockatxProviderGetMalfeasanceProofCall{Call: call} } -// atxProviderGetMalfeasanceProofCall wrap *gomock.Call -type atxProviderGetMalfeasanceProofCall struct { +// MockatxProviderGetMalfeasanceProofCall wrap *gomock.Call +type MockatxProviderGetMalfeasanceProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *atxProviderGetMalfeasanceProofCall) Return(arg0 *types.MalfeasanceProof, arg1 error) *atxProviderGetMalfeasanceProofCall { +func (c *MockatxProviderGetMalfeasanceProofCall) Return(arg0 *types.MalfeasanceProof, arg1 error) *MockatxProviderGetMalfeasanceProofCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *atxProviderGetMalfeasanceProofCall) Do(f func(types.NodeID) (*types.MalfeasanceProof, error)) *atxProviderGetMalfeasanceProofCall { +func (c *MockatxProviderGetMalfeasanceProofCall) Do(f func(types.NodeID) (*types.MalfeasanceProof, error)) *MockatxProviderGetMalfeasanceProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *atxProviderGetMalfeasanceProofCall) DoAndReturn(f func(types.NodeID) (*types.MalfeasanceProof, error)) *atxProviderGetMalfeasanceProofCall { +func (c *MockatxProviderGetMalfeasanceProofCall) DoAndReturn(f func(types.NodeID) (*types.MalfeasanceProof, error)) *MockatxProviderGetMalfeasanceProofCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -919,31 +920,31 @@ func (m *MockatxProvider) MaxHeightAtx() (types.ATXID, error) { } // MaxHeightAtx indicates an expected call of MaxHeightAtx. -func (mr *MockatxProviderMockRecorder) MaxHeightAtx() *atxProviderMaxHeightAtxCall { +func (mr *MockatxProviderMockRecorder) MaxHeightAtx() *MockatxProviderMaxHeightAtxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxHeightAtx", reflect.TypeOf((*MockatxProvider)(nil).MaxHeightAtx)) - return &atxProviderMaxHeightAtxCall{Call: call} + return &MockatxProviderMaxHeightAtxCall{Call: call} } -// atxProviderMaxHeightAtxCall wrap *gomock.Call -type atxProviderMaxHeightAtxCall struct { +// MockatxProviderMaxHeightAtxCall wrap *gomock.Call +type MockatxProviderMaxHeightAtxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *atxProviderMaxHeightAtxCall) Return(arg0 types.ATXID, arg1 error) *atxProviderMaxHeightAtxCall { +func (c *MockatxProviderMaxHeightAtxCall) Return(arg0 types.ATXID, arg1 error) *MockatxProviderMaxHeightAtxCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *atxProviderMaxHeightAtxCall) Do(f func() (types.ATXID, error)) *atxProviderMaxHeightAtxCall { +func (c *MockatxProviderMaxHeightAtxCall) Do(f func() (types.ATXID, error)) *MockatxProviderMaxHeightAtxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *atxProviderMaxHeightAtxCall) DoAndReturn(f func() (types.ATXID, error)) *atxProviderMaxHeightAtxCall { +func (c *MockatxProviderMaxHeightAtxCall) DoAndReturn(f func() (types.ATXID, error)) *MockatxProviderMaxHeightAtxCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -981,31 +982,31 @@ func (m *MockpostSupervisor) Benchmark(p activation.PostSetupProvider) (int, err } // Benchmark indicates an expected call of Benchmark. -func (mr *MockpostSupervisorMockRecorder) Benchmark(p any) *postSupervisorBenchmarkCall { +func (mr *MockpostSupervisorMockRecorder) Benchmark(p any) *MockpostSupervisorBenchmarkCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Benchmark", reflect.TypeOf((*MockpostSupervisor)(nil).Benchmark), p) - return &postSupervisorBenchmarkCall{Call: call} + return &MockpostSupervisorBenchmarkCall{Call: call} } -// postSupervisorBenchmarkCall wrap *gomock.Call -type postSupervisorBenchmarkCall struct { +// MockpostSupervisorBenchmarkCall wrap *gomock.Call +type MockpostSupervisorBenchmarkCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSupervisorBenchmarkCall) Return(arg0 int, arg1 error) *postSupervisorBenchmarkCall { +func (c *MockpostSupervisorBenchmarkCall) Return(arg0 int, arg1 error) *MockpostSupervisorBenchmarkCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *postSupervisorBenchmarkCall) Do(f func(activation.PostSetupProvider) (int, error)) *postSupervisorBenchmarkCall { +func (c *MockpostSupervisorBenchmarkCall) Do(f func(activation.PostSetupProvider) (int, error)) *MockpostSupervisorBenchmarkCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSupervisorBenchmarkCall) DoAndReturn(f func(activation.PostSetupProvider) (int, error)) *postSupervisorBenchmarkCall { +func (c *MockpostSupervisorBenchmarkCall) DoAndReturn(f func(activation.PostSetupProvider) (int, error)) *MockpostSupervisorBenchmarkCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1019,31 +1020,31 @@ func (m *MockpostSupervisor) Config() activation.PostConfig { } // Config indicates an expected call of Config. -func (mr *MockpostSupervisorMockRecorder) Config() *postSupervisorConfigCall { +func (mr *MockpostSupervisorMockRecorder) Config() *MockpostSupervisorConfigCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockpostSupervisor)(nil).Config)) - return &postSupervisorConfigCall{Call: call} + return &MockpostSupervisorConfigCall{Call: call} } -// postSupervisorConfigCall wrap *gomock.Call -type postSupervisorConfigCall struct { +// MockpostSupervisorConfigCall wrap *gomock.Call +type MockpostSupervisorConfigCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSupervisorConfigCall) Return(arg0 activation.PostConfig) *postSupervisorConfigCall { +func (c *MockpostSupervisorConfigCall) Return(arg0 activation.PostConfig) *MockpostSupervisorConfigCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postSupervisorConfigCall) Do(f func() activation.PostConfig) *postSupervisorConfigCall { +func (c *MockpostSupervisorConfigCall) Do(f func() activation.PostConfig) *MockpostSupervisorConfigCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSupervisorConfigCall) DoAndReturn(f func() activation.PostConfig) *postSupervisorConfigCall { +func (c *MockpostSupervisorConfigCall) DoAndReturn(f func() activation.PostConfig) *MockpostSupervisorConfigCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1058,69 +1059,69 @@ func (m *MockpostSupervisor) Providers() ([]activation.PostSetupProvider, error) } // Providers indicates an expected call of Providers. -func (mr *MockpostSupervisorMockRecorder) Providers() *postSupervisorProvidersCall { +func (mr *MockpostSupervisorMockRecorder) Providers() *MockpostSupervisorProvidersCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Providers", reflect.TypeOf((*MockpostSupervisor)(nil).Providers)) - return &postSupervisorProvidersCall{Call: call} + return &MockpostSupervisorProvidersCall{Call: call} } -// postSupervisorProvidersCall wrap *gomock.Call -type postSupervisorProvidersCall struct { +// MockpostSupervisorProvidersCall wrap *gomock.Call +type MockpostSupervisorProvidersCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSupervisorProvidersCall) Return(arg0 []activation.PostSetupProvider, arg1 error) *postSupervisorProvidersCall { +func (c *MockpostSupervisorProvidersCall) Return(arg0 []activation.PostSetupProvider, arg1 error) *MockpostSupervisorProvidersCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *postSupervisorProvidersCall) Do(f func() ([]activation.PostSetupProvider, error)) *postSupervisorProvidersCall { +func (c *MockpostSupervisorProvidersCall) Do(f func() ([]activation.PostSetupProvider, error)) *MockpostSupervisorProvidersCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSupervisorProvidersCall) DoAndReturn(f func() ([]activation.PostSetupProvider, error)) *postSupervisorProvidersCall { +func (c *MockpostSupervisorProvidersCall) DoAndReturn(f func() ([]activation.PostSetupProvider, error)) *MockpostSupervisorProvidersCall { c.Call = c.Call.DoAndReturn(f) return c } // Start mocks base method. -func (m *MockpostSupervisor) Start(opts activation.PostSetupOpts) error { +func (m *MockpostSupervisor) Start(opts activation.PostSetupOpts, id types.NodeID) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Start", opts) + ret := m.ctrl.Call(m, "Start", opts, id) ret0, _ := ret[0].(error) return ret0 } // Start indicates an expected call of Start. -func (mr *MockpostSupervisorMockRecorder) Start(opts any) *postSupervisorStartCall { +func (mr *MockpostSupervisorMockRecorder) Start(opts, id any) *MockpostSupervisorStartCall { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockpostSupervisor)(nil).Start), opts) - return &postSupervisorStartCall{Call: call} + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockpostSupervisor)(nil).Start), opts, id) + return &MockpostSupervisorStartCall{Call: call} } -// postSupervisorStartCall wrap *gomock.Call -type postSupervisorStartCall struct { +// MockpostSupervisorStartCall wrap *gomock.Call +type MockpostSupervisorStartCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSupervisorStartCall) Return(arg0 error) *postSupervisorStartCall { +func (c *MockpostSupervisorStartCall) Return(arg0 error) *MockpostSupervisorStartCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postSupervisorStartCall) Do(f func(activation.PostSetupOpts) error) *postSupervisorStartCall { +func (c *MockpostSupervisorStartCall) Do(f func(activation.PostSetupOpts, types.NodeID) error) *MockpostSupervisorStartCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSupervisorStartCall) DoAndReturn(f func(activation.PostSetupOpts) error) *postSupervisorStartCall { +func (c *MockpostSupervisorStartCall) DoAndReturn(f func(activation.PostSetupOpts, types.NodeID) error) *MockpostSupervisorStartCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1134,31 +1135,31 @@ func (m *MockpostSupervisor) Status() *activation.PostSetupStatus { } // Status indicates an expected call of Status. -func (mr *MockpostSupervisorMockRecorder) Status() *postSupervisorStatusCall { +func (mr *MockpostSupervisorMockRecorder) Status() *MockpostSupervisorStatusCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockpostSupervisor)(nil).Status)) - return &postSupervisorStatusCall{Call: call} + return &MockpostSupervisorStatusCall{Call: call} } -// postSupervisorStatusCall wrap *gomock.Call -type postSupervisorStatusCall struct { +// MockpostSupervisorStatusCall wrap *gomock.Call +type MockpostSupervisorStatusCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSupervisorStatusCall) Return(arg0 *activation.PostSetupStatus) *postSupervisorStatusCall { +func (c *MockpostSupervisorStatusCall) Return(arg0 *activation.PostSetupStatus) *MockpostSupervisorStatusCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postSupervisorStatusCall) Do(f func() *activation.PostSetupStatus) *postSupervisorStatusCall { +func (c *MockpostSupervisorStatusCall) Do(f func() *activation.PostSetupStatus) *MockpostSupervisorStatusCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSupervisorStatusCall) DoAndReturn(f func() *activation.PostSetupStatus) *postSupervisorStatusCall { +func (c *MockpostSupervisorStatusCall) DoAndReturn(f func() *activation.PostSetupStatus) *MockpostSupervisorStatusCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1172,31 +1173,31 @@ func (m *MockpostSupervisor) Stop(deleteFiles bool) error { } // Stop indicates an expected call of Stop. -func (mr *MockpostSupervisorMockRecorder) Stop(deleteFiles any) *postSupervisorStopCall { +func (mr *MockpostSupervisorMockRecorder) Stop(deleteFiles any) *MockpostSupervisorStopCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockpostSupervisor)(nil).Stop), deleteFiles) - return &postSupervisorStopCall{Call: call} + return &MockpostSupervisorStopCall{Call: call} } -// postSupervisorStopCall wrap *gomock.Call -type postSupervisorStopCall struct { +// MockpostSupervisorStopCall wrap *gomock.Call +type MockpostSupervisorStopCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postSupervisorStopCall) Return(arg0 error) *postSupervisorStopCall { +func (c *MockpostSupervisorStopCall) Return(arg0 error) *MockpostSupervisorStopCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postSupervisorStopCall) Do(f func(bool) error) *postSupervisorStopCall { +func (c *MockpostSupervisorStopCall) Do(f func(bool) error) *MockpostSupervisorStopCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postSupervisorStopCall) DoAndReturn(f func(bool) error) *postSupervisorStopCall { +func (c *MockpostSupervisorStopCall) DoAndReturn(f func(bool) error) *MockpostSupervisorStopCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1233,31 +1234,31 @@ func (m *MockpeerCounter) PeerCount() uint64 { } // PeerCount indicates an expected call of PeerCount. -func (mr *MockpeerCounterMockRecorder) PeerCount() *peerCounterPeerCountCall { +func (mr *MockpeerCounterMockRecorder) PeerCount() *MockpeerCounterPeerCountCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerCount", reflect.TypeOf((*MockpeerCounter)(nil).PeerCount)) - return &peerCounterPeerCountCall{Call: call} + return &MockpeerCounterPeerCountCall{Call: call} } -// peerCounterPeerCountCall wrap *gomock.Call -type peerCounterPeerCountCall struct { +// MockpeerCounterPeerCountCall wrap *gomock.Call +type MockpeerCounterPeerCountCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *peerCounterPeerCountCall) Return(arg0 uint64) *peerCounterPeerCountCall { +func (c *MockpeerCounterPeerCountCall) Return(arg0 uint64) *MockpeerCounterPeerCountCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *peerCounterPeerCountCall) Do(f func() uint64) *peerCounterPeerCountCall { +func (c *MockpeerCounterPeerCountCall) Do(f func() uint64) *MockpeerCounterPeerCountCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *peerCounterPeerCountCall) DoAndReturn(f func() uint64) *peerCounterPeerCountCall { +func (c *MockpeerCounterPeerCountCall) DoAndReturn(f func() uint64) *MockpeerCounterPeerCountCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1294,31 +1295,31 @@ func (m *Mockpeers) ConnectedPeerInfo(arg0 p2p.Peer) *p2p.PeerInfo { } // ConnectedPeerInfo indicates an expected call of ConnectedPeerInfo. -func (mr *MockpeersMockRecorder) ConnectedPeerInfo(arg0 any) *peersConnectedPeerInfoCall { +func (mr *MockpeersMockRecorder) ConnectedPeerInfo(arg0 any) *MockpeersConnectedPeerInfoCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectedPeerInfo", reflect.TypeOf((*Mockpeers)(nil).ConnectedPeerInfo), arg0) - return &peersConnectedPeerInfoCall{Call: call} + return &MockpeersConnectedPeerInfoCall{Call: call} } -// peersConnectedPeerInfoCall wrap *gomock.Call -type peersConnectedPeerInfoCall struct { +// MockpeersConnectedPeerInfoCall wrap *gomock.Call +type MockpeersConnectedPeerInfoCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *peersConnectedPeerInfoCall) Return(arg0 *p2p.PeerInfo) *peersConnectedPeerInfoCall { +func (c *MockpeersConnectedPeerInfoCall) Return(arg0 *p2p.PeerInfo) *MockpeersConnectedPeerInfoCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *peersConnectedPeerInfoCall) Do(f func(p2p.Peer) *p2p.PeerInfo) *peersConnectedPeerInfoCall { +func (c *MockpeersConnectedPeerInfoCall) Do(f func(p2p.Peer) *p2p.PeerInfo) *MockpeersConnectedPeerInfoCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *peersConnectedPeerInfoCall) DoAndReturn(f func(p2p.Peer) *p2p.PeerInfo) *peersConnectedPeerInfoCall { +func (c *MockpeersConnectedPeerInfoCall) DoAndReturn(f func(p2p.Peer) *p2p.PeerInfo) *MockpeersConnectedPeerInfoCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1332,31 +1333,31 @@ func (m *Mockpeers) GetPeers() []p2p.Peer { } // GetPeers indicates an expected call of GetPeers. -func (mr *MockpeersMockRecorder) GetPeers() *peersGetPeersCall { +func (mr *MockpeersMockRecorder) GetPeers() *MockpeersGetPeersCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPeers", reflect.TypeOf((*Mockpeers)(nil).GetPeers)) - return &peersGetPeersCall{Call: call} + return &MockpeersGetPeersCall{Call: call} } -// peersGetPeersCall wrap *gomock.Call -type peersGetPeersCall struct { +// MockpeersGetPeersCall wrap *gomock.Call +type MockpeersGetPeersCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *peersGetPeersCall) Return(arg0 []p2p.Peer) *peersGetPeersCall { +func (c *MockpeersGetPeersCall) Return(arg0 []p2p.Peer) *MockpeersGetPeersCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *peersGetPeersCall) Do(f func() []p2p.Peer) *peersGetPeersCall { +func (c *MockpeersGetPeersCall) Do(f func() []p2p.Peer) *MockpeersGetPeersCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *peersGetPeersCall) DoAndReturn(f func() []p2p.Peer) *peersGetPeersCall { +func (c *MockpeersGetPeersCall) DoAndReturn(f func() []p2p.Peer) *MockpeersGetPeersCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1393,31 +1394,31 @@ func (m *MockgenesisTimeAPI) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MockgenesisTimeAPIMockRecorder) CurrentLayer() *genesisTimeAPICurrentLayerCall { +func (mr *MockgenesisTimeAPIMockRecorder) CurrentLayer() *MockgenesisTimeAPICurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MockgenesisTimeAPI)(nil).CurrentLayer)) - return &genesisTimeAPICurrentLayerCall{Call: call} + return &MockgenesisTimeAPICurrentLayerCall{Call: call} } -// genesisTimeAPICurrentLayerCall wrap *gomock.Call -type genesisTimeAPICurrentLayerCall struct { +// MockgenesisTimeAPICurrentLayerCall wrap *gomock.Call +type MockgenesisTimeAPICurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *genesisTimeAPICurrentLayerCall) Return(arg0 types.LayerID) *genesisTimeAPICurrentLayerCall { +func (c *MockgenesisTimeAPICurrentLayerCall) Return(arg0 types.LayerID) *MockgenesisTimeAPICurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *genesisTimeAPICurrentLayerCall) Do(f func() types.LayerID) *genesisTimeAPICurrentLayerCall { +func (c *MockgenesisTimeAPICurrentLayerCall) Do(f func() types.LayerID) *MockgenesisTimeAPICurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *genesisTimeAPICurrentLayerCall) DoAndReturn(f func() types.LayerID) *genesisTimeAPICurrentLayerCall { +func (c *MockgenesisTimeAPICurrentLayerCall) DoAndReturn(f func() types.LayerID) *MockgenesisTimeAPICurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1431,31 +1432,31 @@ func (m *MockgenesisTimeAPI) GenesisTime() time.Time { } // GenesisTime indicates an expected call of GenesisTime. -func (mr *MockgenesisTimeAPIMockRecorder) GenesisTime() *genesisTimeAPIGenesisTimeCall { +func (mr *MockgenesisTimeAPIMockRecorder) GenesisTime() *MockgenesisTimeAPIGenesisTimeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenesisTime", reflect.TypeOf((*MockgenesisTimeAPI)(nil).GenesisTime)) - return &genesisTimeAPIGenesisTimeCall{Call: call} + return &MockgenesisTimeAPIGenesisTimeCall{Call: call} } -// genesisTimeAPIGenesisTimeCall wrap *gomock.Call -type genesisTimeAPIGenesisTimeCall struct { +// MockgenesisTimeAPIGenesisTimeCall wrap *gomock.Call +type MockgenesisTimeAPIGenesisTimeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *genesisTimeAPIGenesisTimeCall) Return(arg0 time.Time) *genesisTimeAPIGenesisTimeCall { +func (c *MockgenesisTimeAPIGenesisTimeCall) Return(arg0 time.Time) *MockgenesisTimeAPIGenesisTimeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *genesisTimeAPIGenesisTimeCall) Do(f func() time.Time) *genesisTimeAPIGenesisTimeCall { +func (c *MockgenesisTimeAPIGenesisTimeCall) Do(f func() time.Time) *MockgenesisTimeAPIGenesisTimeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *genesisTimeAPIGenesisTimeCall) DoAndReturn(f func() time.Time) *genesisTimeAPIGenesisTimeCall { +func (c *MockgenesisTimeAPIGenesisTimeCall) DoAndReturn(f func() time.Time) *MockgenesisTimeAPIGenesisTimeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1493,31 +1494,31 @@ func (m *MockmeshAPI) GetLayer(arg0 types.LayerID) (*types.Layer, error) { } // GetLayer indicates an expected call of GetLayer. -func (mr *MockmeshAPIMockRecorder) GetLayer(arg0 any) *meshAPIGetLayerCall { +func (mr *MockmeshAPIMockRecorder) GetLayer(arg0 any) *MockmeshAPIGetLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayer", reflect.TypeOf((*MockmeshAPI)(nil).GetLayer), arg0) - return &meshAPIGetLayerCall{Call: call} + return &MockmeshAPIGetLayerCall{Call: call} } -// meshAPIGetLayerCall wrap *gomock.Call -type meshAPIGetLayerCall struct { +// MockmeshAPIGetLayerCall wrap *gomock.Call +type MockmeshAPIGetLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshAPIGetLayerCall) Return(arg0 *types.Layer, arg1 error) *meshAPIGetLayerCall { +func (c *MockmeshAPIGetLayerCall) Return(arg0 *types.Layer, arg1 error) *MockmeshAPIGetLayerCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *meshAPIGetLayerCall) Do(f func(types.LayerID) (*types.Layer, error)) *meshAPIGetLayerCall { +func (c *MockmeshAPIGetLayerCall) Do(f func(types.LayerID) (*types.Layer, error)) *MockmeshAPIGetLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshAPIGetLayerCall) DoAndReturn(f func(types.LayerID) (*types.Layer, error)) *meshAPIGetLayerCall { +func (c *MockmeshAPIGetLayerCall) DoAndReturn(f func(types.LayerID) (*types.Layer, error)) *MockmeshAPIGetLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1532,31 +1533,31 @@ func (m *MockmeshAPI) GetLayerVerified(arg0 types.LayerID) (*types.Block, error) } // GetLayerVerified indicates an expected call of GetLayerVerified. -func (mr *MockmeshAPIMockRecorder) GetLayerVerified(arg0 any) *meshAPIGetLayerVerifiedCall { +func (mr *MockmeshAPIMockRecorder) GetLayerVerified(arg0 any) *MockmeshAPIGetLayerVerifiedCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerVerified", reflect.TypeOf((*MockmeshAPI)(nil).GetLayerVerified), arg0) - return &meshAPIGetLayerVerifiedCall{Call: call} + return &MockmeshAPIGetLayerVerifiedCall{Call: call} } -// meshAPIGetLayerVerifiedCall wrap *gomock.Call -type meshAPIGetLayerVerifiedCall struct { +// MockmeshAPIGetLayerVerifiedCall wrap *gomock.Call +type MockmeshAPIGetLayerVerifiedCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshAPIGetLayerVerifiedCall) Return(arg0 *types.Block, arg1 error) *meshAPIGetLayerVerifiedCall { +func (c *MockmeshAPIGetLayerVerifiedCall) Return(arg0 *types.Block, arg1 error) *MockmeshAPIGetLayerVerifiedCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *meshAPIGetLayerVerifiedCall) Do(f func(types.LayerID) (*types.Block, error)) *meshAPIGetLayerVerifiedCall { +func (c *MockmeshAPIGetLayerVerifiedCall) Do(f func(types.LayerID) (*types.Block, error)) *MockmeshAPIGetLayerVerifiedCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshAPIGetLayerVerifiedCall) DoAndReturn(f func(types.LayerID) (*types.Block, error)) *meshAPIGetLayerVerifiedCall { +func (c *MockmeshAPIGetLayerVerifiedCall) DoAndReturn(f func(types.LayerID) (*types.Block, error)) *MockmeshAPIGetLayerVerifiedCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1571,31 +1572,31 @@ func (m *MockmeshAPI) GetRewardsByCoinbase(arg0 types.Address) ([]*types.Reward, } // GetRewardsByCoinbase indicates an expected call of GetRewardsByCoinbase. -func (mr *MockmeshAPIMockRecorder) GetRewardsByCoinbase(arg0 any) *meshAPIGetRewardsByCoinbaseCall { +func (mr *MockmeshAPIMockRecorder) GetRewardsByCoinbase(arg0 any) *MockmeshAPIGetRewardsByCoinbaseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRewardsByCoinbase", reflect.TypeOf((*MockmeshAPI)(nil).GetRewardsByCoinbase), arg0) - return &meshAPIGetRewardsByCoinbaseCall{Call: call} + return &MockmeshAPIGetRewardsByCoinbaseCall{Call: call} } -// meshAPIGetRewardsByCoinbaseCall wrap *gomock.Call -type meshAPIGetRewardsByCoinbaseCall struct { +// MockmeshAPIGetRewardsByCoinbaseCall wrap *gomock.Call +type MockmeshAPIGetRewardsByCoinbaseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshAPIGetRewardsByCoinbaseCall) Return(arg0 []*types.Reward, arg1 error) *meshAPIGetRewardsByCoinbaseCall { +func (c *MockmeshAPIGetRewardsByCoinbaseCall) Return(arg0 []*types.Reward, arg1 error) *MockmeshAPIGetRewardsByCoinbaseCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *meshAPIGetRewardsByCoinbaseCall) Do(f func(types.Address) ([]*types.Reward, error)) *meshAPIGetRewardsByCoinbaseCall { +func (c *MockmeshAPIGetRewardsByCoinbaseCall) Do(f func(types.Address) ([]*types.Reward, error)) *MockmeshAPIGetRewardsByCoinbaseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshAPIGetRewardsByCoinbaseCall) DoAndReturn(f func(types.Address) ([]*types.Reward, error)) *meshAPIGetRewardsByCoinbaseCall { +func (c *MockmeshAPIGetRewardsByCoinbaseCall) DoAndReturn(f func(types.Address) ([]*types.Reward, error)) *MockmeshAPIGetRewardsByCoinbaseCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1610,31 +1611,31 @@ func (m *MockmeshAPI) GetRewardsBySmesherId(id types.NodeID) ([]*types.Reward, e } // GetRewardsBySmesherId indicates an expected call of GetRewardsBySmesherId. -func (mr *MockmeshAPIMockRecorder) GetRewardsBySmesherId(id any) *meshAPIGetRewardsBySmesherIdCall { +func (mr *MockmeshAPIMockRecorder) GetRewardsBySmesherId(id any) *MockmeshAPIGetRewardsBySmesherIdCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRewardsBySmesherId", reflect.TypeOf((*MockmeshAPI)(nil).GetRewardsBySmesherId), id) - return &meshAPIGetRewardsBySmesherIdCall{Call: call} + return &MockmeshAPIGetRewardsBySmesherIdCall{Call: call} } -// meshAPIGetRewardsBySmesherIdCall wrap *gomock.Call -type meshAPIGetRewardsBySmesherIdCall struct { +// MockmeshAPIGetRewardsBySmesherIdCall wrap *gomock.Call +type MockmeshAPIGetRewardsBySmesherIdCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshAPIGetRewardsBySmesherIdCall) Return(arg0 []*types.Reward, arg1 error) *meshAPIGetRewardsBySmesherIdCall { +func (c *MockmeshAPIGetRewardsBySmesherIdCall) Return(arg0 []*types.Reward, arg1 error) *MockmeshAPIGetRewardsBySmesherIdCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *meshAPIGetRewardsBySmesherIdCall) Do(f func(types.NodeID) ([]*types.Reward, error)) *meshAPIGetRewardsBySmesherIdCall { +func (c *MockmeshAPIGetRewardsBySmesherIdCall) Do(f func(types.NodeID) ([]*types.Reward, error)) *MockmeshAPIGetRewardsBySmesherIdCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshAPIGetRewardsBySmesherIdCall) DoAndReturn(f func(types.NodeID) ([]*types.Reward, error)) *meshAPIGetRewardsBySmesherIdCall { +func (c *MockmeshAPIGetRewardsBySmesherIdCall) DoAndReturn(f func(types.NodeID) ([]*types.Reward, error)) *MockmeshAPIGetRewardsBySmesherIdCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1648,31 +1649,31 @@ func (m *MockmeshAPI) LatestLayer() types.LayerID { } // LatestLayer indicates an expected call of LatestLayer. -func (mr *MockmeshAPIMockRecorder) LatestLayer() *meshAPILatestLayerCall { +func (mr *MockmeshAPIMockRecorder) LatestLayer() *MockmeshAPILatestLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestLayer", reflect.TypeOf((*MockmeshAPI)(nil).LatestLayer)) - return &meshAPILatestLayerCall{Call: call} + return &MockmeshAPILatestLayerCall{Call: call} } -// meshAPILatestLayerCall wrap *gomock.Call -type meshAPILatestLayerCall struct { +// MockmeshAPILatestLayerCall wrap *gomock.Call +type MockmeshAPILatestLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshAPILatestLayerCall) Return(arg0 types.LayerID) *meshAPILatestLayerCall { +func (c *MockmeshAPILatestLayerCall) Return(arg0 types.LayerID) *MockmeshAPILatestLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *meshAPILatestLayerCall) Do(f func() types.LayerID) *meshAPILatestLayerCall { +func (c *MockmeshAPILatestLayerCall) Do(f func() types.LayerID) *MockmeshAPILatestLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshAPILatestLayerCall) DoAndReturn(f func() types.LayerID) *meshAPILatestLayerCall { +func (c *MockmeshAPILatestLayerCall) DoAndReturn(f func() types.LayerID) *MockmeshAPILatestLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1686,31 +1687,31 @@ func (m *MockmeshAPI) LatestLayerInState() types.LayerID { } // LatestLayerInState indicates an expected call of LatestLayerInState. -func (mr *MockmeshAPIMockRecorder) LatestLayerInState() *meshAPILatestLayerInStateCall { +func (mr *MockmeshAPIMockRecorder) LatestLayerInState() *MockmeshAPILatestLayerInStateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestLayerInState", reflect.TypeOf((*MockmeshAPI)(nil).LatestLayerInState)) - return &meshAPILatestLayerInStateCall{Call: call} + return &MockmeshAPILatestLayerInStateCall{Call: call} } -// meshAPILatestLayerInStateCall wrap *gomock.Call -type meshAPILatestLayerInStateCall struct { +// MockmeshAPILatestLayerInStateCall wrap *gomock.Call +type MockmeshAPILatestLayerInStateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshAPILatestLayerInStateCall) Return(arg0 types.LayerID) *meshAPILatestLayerInStateCall { +func (c *MockmeshAPILatestLayerInStateCall) Return(arg0 types.LayerID) *MockmeshAPILatestLayerInStateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *meshAPILatestLayerInStateCall) Do(f func() types.LayerID) *meshAPILatestLayerInStateCall { +func (c *MockmeshAPILatestLayerInStateCall) Do(f func() types.LayerID) *MockmeshAPILatestLayerInStateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshAPILatestLayerInStateCall) DoAndReturn(f func() types.LayerID) *meshAPILatestLayerInStateCall { +func (c *MockmeshAPILatestLayerInStateCall) DoAndReturn(f func() types.LayerID) *MockmeshAPILatestLayerInStateCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1725,31 +1726,31 @@ func (m *MockmeshAPI) MeshHash(arg0 types.LayerID) (types.Hash32, error) { } // MeshHash indicates an expected call of MeshHash. -func (mr *MockmeshAPIMockRecorder) MeshHash(arg0 any) *meshAPIMeshHashCall { +func (mr *MockmeshAPIMockRecorder) MeshHash(arg0 any) *MockmeshAPIMeshHashCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MeshHash", reflect.TypeOf((*MockmeshAPI)(nil).MeshHash), arg0) - return &meshAPIMeshHashCall{Call: call} + return &MockmeshAPIMeshHashCall{Call: call} } -// meshAPIMeshHashCall wrap *gomock.Call -type meshAPIMeshHashCall struct { +// MockmeshAPIMeshHashCall wrap *gomock.Call +type MockmeshAPIMeshHashCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshAPIMeshHashCall) Return(arg0 types.Hash32, arg1 error) *meshAPIMeshHashCall { +func (c *MockmeshAPIMeshHashCall) Return(arg0 types.Hash32, arg1 error) *MockmeshAPIMeshHashCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *meshAPIMeshHashCall) Do(f func(types.LayerID) (types.Hash32, error)) *meshAPIMeshHashCall { +func (c *MockmeshAPIMeshHashCall) Do(f func(types.LayerID) (types.Hash32, error)) *MockmeshAPIMeshHashCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshAPIMeshHashCall) DoAndReturn(f func(types.LayerID) (types.Hash32, error)) *meshAPIMeshHashCall { +func (c *MockmeshAPIMeshHashCall) DoAndReturn(f func(types.LayerID) (types.Hash32, error)) *MockmeshAPIMeshHashCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1763,31 +1764,31 @@ func (m *MockmeshAPI) ProcessedLayer() types.LayerID { } // ProcessedLayer indicates an expected call of ProcessedLayer. -func (mr *MockmeshAPIMockRecorder) ProcessedLayer() *meshAPIProcessedLayerCall { +func (mr *MockmeshAPIMockRecorder) ProcessedLayer() *MockmeshAPIProcessedLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessedLayer", reflect.TypeOf((*MockmeshAPI)(nil).ProcessedLayer)) - return &meshAPIProcessedLayerCall{Call: call} + return &MockmeshAPIProcessedLayerCall{Call: call} } -// meshAPIProcessedLayerCall wrap *gomock.Call -type meshAPIProcessedLayerCall struct { +// MockmeshAPIProcessedLayerCall wrap *gomock.Call +type MockmeshAPIProcessedLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshAPIProcessedLayerCall) Return(arg0 types.LayerID) *meshAPIProcessedLayerCall { +func (c *MockmeshAPIProcessedLayerCall) Return(arg0 types.LayerID) *MockmeshAPIProcessedLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *meshAPIProcessedLayerCall) Do(f func() types.LayerID) *meshAPIProcessedLayerCall { +func (c *MockmeshAPIProcessedLayerCall) Do(f func() types.LayerID) *MockmeshAPIProcessedLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshAPIProcessedLayerCall) DoAndReturn(f func() types.LayerID) *meshAPIProcessedLayerCall { +func (c *MockmeshAPIProcessedLayerCall) DoAndReturn(f func() types.LayerID) *MockmeshAPIProcessedLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1825,31 +1826,31 @@ func (m *Mockoracle) ActiveSet(arg0 context.Context, arg1 types.EpochID) ([]type } // ActiveSet indicates an expected call of ActiveSet. -func (mr *MockoracleMockRecorder) ActiveSet(arg0, arg1 any) *oracleActiveSetCall { +func (mr *MockoracleMockRecorder) ActiveSet(arg0, arg1 any) *MockoracleActiveSetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActiveSet", reflect.TypeOf((*Mockoracle)(nil).ActiveSet), arg0, arg1) - return &oracleActiveSetCall{Call: call} + return &MockoracleActiveSetCall{Call: call} } -// oracleActiveSetCall wrap *gomock.Call -type oracleActiveSetCall struct { +// MockoracleActiveSetCall wrap *gomock.Call +type MockoracleActiveSetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *oracleActiveSetCall) Return(arg0 []types.ATXID, arg1 error) *oracleActiveSetCall { +func (c *MockoracleActiveSetCall) Return(arg0 []types.ATXID, arg1 error) *MockoracleActiveSetCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *oracleActiveSetCall) Do(f func(context.Context, types.EpochID) ([]types.ATXID, error)) *oracleActiveSetCall { +func (c *MockoracleActiveSetCall) Do(f func(context.Context, types.EpochID) ([]types.ATXID, error)) *MockoracleActiveSetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *oracleActiveSetCall) DoAndReturn(f func(context.Context, types.EpochID) ([]types.ATXID, error)) *oracleActiveSetCall { +func (c *MockoracleActiveSetCall) DoAndReturn(f func(context.Context, types.EpochID) ([]types.ATXID, error)) *MockoracleActiveSetCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/api/grpcserver/post_service_test.go b/api/grpcserver/post_service_test.go index dae89fda01e..8697f351506 100644 --- a/api/grpcserver/post_service_test.go +++ b/api/grpcserver/post_service_test.go @@ -40,7 +40,6 @@ func launchPostSupervisor( sig, err := signing.NewEdSigner() require.NoError(tb, err) - id := sig.NodeID() goldenATXID := types.RandomATXID() validator := activation.NewMocknipostValidator(gomock.NewController(tb)) @@ -55,15 +54,15 @@ func launchPostSupervisor( return ch }) cdb := datastore.NewCachedDB(sql.InMemory(), logtest.New(tb)) - mgr, err := activation.NewPostSetupManager(id, postCfg, log.Named("post manager"), cdb, goldenATXID, syncer, validator) + mgr, err := activation.NewPostSetupManager(postCfg, log.Named("post manager"), cdb, goldenATXID, syncer, validator) require.NoError(tb, err) // start post supervisor ps, err := activation.NewPostSupervisor(log, serviceCfg, postCfg, provingOpts, mgr) require.NoError(tb, err) require.NotNil(tb, ps) - require.NoError(tb, ps.Start(postOpts)) - return id, func() { assert.NoError(tb, ps.Stop(false)) } + require.NoError(tb, ps.Start(postOpts, sig.NodeID())) + return sig.NodeID(), func() { assert.NoError(tb, ps.Stop(false)) } } func launchPostSupervisorTLS( @@ -84,7 +83,6 @@ func launchPostSupervisorTLS( sig, err := signing.NewEdSigner() require.NoError(tb, err) - id := sig.NodeID() goldenATXID := types.RandomATXID() validator := activation.NewMocknipostValidator(gomock.NewController(tb)) @@ -98,14 +96,14 @@ func launchPostSupervisorTLS( return ch }) cdb := datastore.NewCachedDB(sql.InMemory(), logtest.New(tb)) - mgr, err := activation.NewPostSetupManager(id, postCfg, log.Named("post manager"), cdb, goldenATXID, syncer, validator) + mgr, err := activation.NewPostSetupManager(postCfg, log.Named("post manager"), cdb, goldenATXID, syncer, validator) require.NoError(tb, err) ps, err := activation.NewPostSupervisor(log, serviceCfg, postCfg, provingOpts, mgr) require.NoError(tb, err) require.NotNil(tb, ps) - require.NoError(tb, ps.Start(postOpts)) - return id, func() { assert.NoError(tb, ps.Stop(false)) } + require.NoError(tb, ps.Start(postOpts, sig.NodeID())) + return sig.NodeID(), func() { assert.NoError(tb, ps.Stop(false)) } } func Test_GenerateProof(t *testing.T) { diff --git a/api/grpcserver/smesher_service.go b/api/grpcserver/smesher_service.go index e6df58f9536..86d91d2086e 100644 --- a/api/grpcserver/smesher_service.go +++ b/api/grpcserver/smesher_service.go @@ -27,6 +27,7 @@ type SmesherService struct { postSupervisor postSupervisor streamInterval time.Duration + nodeID *types.NodeID postOpts activation.PostSetupOpts } @@ -49,12 +50,14 @@ func NewSmesherService( smeshing activation.SmeshingProvider, postSupervisor postSupervisor, streamInterval time.Duration, + nodeID *types.NodeID, postOpts activation.PostSetupOpts, ) *SmesherService { return &SmesherService{ smeshingProvider: smeshing, postSupervisor: postSupervisor, streamInterval: streamInterval, + nodeID: nodeID, postOpts: postOpts, } } @@ -81,7 +84,10 @@ func (s SmesherService) StartSmeshing( if err != nil { status.Error(codes.InvalidArgument, err.Error()) } - if err := s.postSupervisor.Start(opts); err != nil { + if s.nodeID == nil { + return nil, status.Errorf(codes.FailedPrecondition, "node is not configured for supervised smeshing") + } + if err := s.postSupervisor.Start(opts, *s.nodeID); err != nil { ctxzap.Error(ctx, "failed to start post supervisor", zap.Error(err)) return nil, status.Error(codes.Internal, fmt.Sprintf("failed to start post supervisor: %v", err)) } diff --git a/api/grpcserver/smesher_service_test.go b/api/grpcserver/smesher_service_test.go index 9c8b4a8ff9a..958ea36422d 100644 --- a/api/grpcserver/smesher_service_test.go +++ b/api/grpcserver/smesher_service_test.go @@ -27,6 +27,7 @@ func TestPostConfig(t *testing.T) { smeshingProvider, postSupervisor, time.Second, + nil, activation.DefaultPostSetupOpts(), ) @@ -53,10 +54,12 @@ func TestStartSmeshingPassesCorrectSmeshingOpts(t *testing.T) { ctrl := gomock.NewController(t) smeshingProvider := activation.NewMockSmeshingProvider(ctrl) postSupervisor := grpcserver.NewMockpostSupervisor(ctrl) + nodeID := types.RandomNodeID() // TODO (mafa): add test where nodeID is not available svc := grpcserver.NewSmesherService( smeshingProvider, postSupervisor, time.Second, + &nodeID, activation.DefaultPostSetupOpts(), ) @@ -73,7 +76,7 @@ func TestStartSmeshingPassesCorrectSmeshingOpts(t *testing.T) { ComputeBatchSize: config.DefaultComputeBatchSize, } opts.ProviderID.SetUint32(providerID) - postSupervisor.EXPECT().Start(opts).Return(nil) + postSupervisor.EXPECT().Start(opts, nodeID).Return(nil) smeshingProvider.EXPECT().StartSmeshing(addr).Return(nil) _, err = svc.StartSmeshing(context.Background(), &pb.StartSmeshingRequest{ @@ -97,6 +100,7 @@ func TestSmesherService_PostSetupProviders(t *testing.T) { smeshingProvider, postSupervisor, time.Second, + nil, activation.DefaultPostSetupOpts(), ) @@ -143,6 +147,7 @@ func TestSmesherService_PostSetupStatus(t *testing.T) { smeshingProvider, postSupervisor, time.Second, + nil, activation.DefaultPostSetupOpts(), ) @@ -166,6 +171,7 @@ func TestSmesherService_PostSetupStatus(t *testing.T) { smeshingProvider, postSupervisor, time.Second, + nil, activation.DefaultPostSetupOpts(), ) @@ -202,6 +208,7 @@ func TestSmesherService_PostSetupStatus(t *testing.T) { smeshingProvider, postSupervisor, time.Second, + nil, activation.DefaultPostSetupOpts(), ) @@ -239,6 +246,7 @@ func TestSmesherService_SmesherID(t *testing.T) { smeshingProvider, postSupervisor, time.Second, + nil, activation.DefaultPostSetupOpts(), ) diff --git a/beacon/mocks.go b/beacon/mocks.go index 39fb83e353f..8b091a329e5 100644 --- a/beacon/mocks.go +++ b/beacon/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=beacon -destination=./mocks.go -source=./interface.go // + // Package beacon is a generated GoMock package. package beacon @@ -49,31 +50,31 @@ func (m *Mockcoin) FinishEpoch(arg0 context.Context, arg1 types.EpochID) { } // FinishEpoch indicates an expected call of FinishEpoch. -func (mr *MockcoinMockRecorder) FinishEpoch(arg0, arg1 any) *coinFinishEpochCall { +func (mr *MockcoinMockRecorder) FinishEpoch(arg0, arg1 any) *MockcoinFinishEpochCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishEpoch", reflect.TypeOf((*Mockcoin)(nil).FinishEpoch), arg0, arg1) - return &coinFinishEpochCall{Call: call} + return &MockcoinFinishEpochCall{Call: call} } -// coinFinishEpochCall wrap *gomock.Call -type coinFinishEpochCall struct { +// MockcoinFinishEpochCall wrap *gomock.Call +type MockcoinFinishEpochCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *coinFinishEpochCall) Return() *coinFinishEpochCall { +func (c *MockcoinFinishEpochCall) Return() *MockcoinFinishEpochCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *coinFinishEpochCall) Do(f func(context.Context, types.EpochID)) *coinFinishEpochCall { +func (c *MockcoinFinishEpochCall) Do(f func(context.Context, types.EpochID)) *MockcoinFinishEpochCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *coinFinishEpochCall) DoAndReturn(f func(context.Context, types.EpochID)) *coinFinishEpochCall { +func (c *MockcoinFinishEpochCall) DoAndReturn(f func(context.Context, types.EpochID)) *MockcoinFinishEpochCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -85,31 +86,31 @@ func (m *Mockcoin) FinishRound(arg0 context.Context) { } // FinishRound indicates an expected call of FinishRound. -func (mr *MockcoinMockRecorder) FinishRound(arg0 any) *coinFinishRoundCall { +func (mr *MockcoinMockRecorder) FinishRound(arg0 any) *MockcoinFinishRoundCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishRound", reflect.TypeOf((*Mockcoin)(nil).FinishRound), arg0) - return &coinFinishRoundCall{Call: call} + return &MockcoinFinishRoundCall{Call: call} } -// coinFinishRoundCall wrap *gomock.Call -type coinFinishRoundCall struct { +// MockcoinFinishRoundCall wrap *gomock.Call +type MockcoinFinishRoundCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *coinFinishRoundCall) Return() *coinFinishRoundCall { +func (c *MockcoinFinishRoundCall) Return() *MockcoinFinishRoundCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *coinFinishRoundCall) Do(f func(context.Context)) *coinFinishRoundCall { +func (c *MockcoinFinishRoundCall) Do(f func(context.Context)) *MockcoinFinishRoundCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *coinFinishRoundCall) DoAndReturn(f func(context.Context)) *coinFinishRoundCall { +func (c *MockcoinFinishRoundCall) DoAndReturn(f func(context.Context)) *MockcoinFinishRoundCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -124,31 +125,31 @@ func (m *Mockcoin) Get(arg0 context.Context, arg1 types.EpochID, arg2 types.Roun } // Get indicates an expected call of Get. -func (mr *MockcoinMockRecorder) Get(arg0, arg1, arg2 any) *coinGetCall { +func (mr *MockcoinMockRecorder) Get(arg0, arg1, arg2 any) *MockcoinGetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*Mockcoin)(nil).Get), arg0, arg1, arg2) - return &coinGetCall{Call: call} + return &MockcoinGetCall{Call: call} } -// coinGetCall wrap *gomock.Call -type coinGetCall struct { +// MockcoinGetCall wrap *gomock.Call +type MockcoinGetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *coinGetCall) Return(arg0 bool, arg1 error) *coinGetCall { +func (c *MockcoinGetCall) Return(arg0 bool, arg1 error) *MockcoinGetCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *coinGetCall) Do(f func(context.Context, types.EpochID, types.RoundID) (bool, error)) *coinGetCall { +func (c *MockcoinGetCall) Do(f func(context.Context, types.EpochID, types.RoundID) (bool, error)) *MockcoinGetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *coinGetCall) DoAndReturn(f func(context.Context, types.EpochID, types.RoundID) (bool, error)) *coinGetCall { +func (c *MockcoinGetCall) DoAndReturn(f func(context.Context, types.EpochID, types.RoundID) (bool, error)) *MockcoinGetCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -162,31 +163,31 @@ func (m *Mockcoin) HandleProposal(arg0 context.Context, arg1 p2p.Peer, arg2 []by } // HandleProposal indicates an expected call of HandleProposal. -func (mr *MockcoinMockRecorder) HandleProposal(arg0, arg1, arg2 any) *coinHandleProposalCall { +func (mr *MockcoinMockRecorder) HandleProposal(arg0, arg1, arg2 any) *MockcoinHandleProposalCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleProposal", reflect.TypeOf((*Mockcoin)(nil).HandleProposal), arg0, arg1, arg2) - return &coinHandleProposalCall{Call: call} + return &MockcoinHandleProposalCall{Call: call} } -// coinHandleProposalCall wrap *gomock.Call -type coinHandleProposalCall struct { +// MockcoinHandleProposalCall wrap *gomock.Call +type MockcoinHandleProposalCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *coinHandleProposalCall) Return(arg0 error) *coinHandleProposalCall { +func (c *MockcoinHandleProposalCall) Return(arg0 error) *MockcoinHandleProposalCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *coinHandleProposalCall) Do(f func(context.Context, p2p.Peer, []byte) error) *coinHandleProposalCall { +func (c *MockcoinHandleProposalCall) Do(f func(context.Context, p2p.Peer, []byte) error) *MockcoinHandleProposalCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *coinHandleProposalCall) DoAndReturn(f func(context.Context, p2p.Peer, []byte) error) *coinHandleProposalCall { +func (c *MockcoinHandleProposalCall) DoAndReturn(f func(context.Context, p2p.Peer, []byte) error) *MockcoinHandleProposalCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -198,31 +199,31 @@ func (m *Mockcoin) StartEpoch(arg0 context.Context, arg1 types.EpochID) { } // StartEpoch indicates an expected call of StartEpoch. -func (mr *MockcoinMockRecorder) StartEpoch(arg0, arg1 any) *coinStartEpochCall { +func (mr *MockcoinMockRecorder) StartEpoch(arg0, arg1 any) *MockcoinStartEpochCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartEpoch", reflect.TypeOf((*Mockcoin)(nil).StartEpoch), arg0, arg1) - return &coinStartEpochCall{Call: call} + return &MockcoinStartEpochCall{Call: call} } -// coinStartEpochCall wrap *gomock.Call -type coinStartEpochCall struct { +// MockcoinStartEpochCall wrap *gomock.Call +type MockcoinStartEpochCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *coinStartEpochCall) Return() *coinStartEpochCall { +func (c *MockcoinStartEpochCall) Return() *MockcoinStartEpochCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *coinStartEpochCall) Do(f func(context.Context, types.EpochID)) *coinStartEpochCall { +func (c *MockcoinStartEpochCall) Do(f func(context.Context, types.EpochID)) *MockcoinStartEpochCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *coinStartEpochCall) DoAndReturn(f func(context.Context, types.EpochID)) *coinStartEpochCall { +func (c *MockcoinStartEpochCall) DoAndReturn(f func(context.Context, types.EpochID)) *MockcoinStartEpochCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -234,31 +235,31 @@ func (m *Mockcoin) StartRound(arg0 context.Context, arg1 types.RoundID, arg2 []w } // StartRound indicates an expected call of StartRound. -func (mr *MockcoinMockRecorder) StartRound(arg0, arg1, arg2 any) *coinStartRoundCall { +func (mr *MockcoinMockRecorder) StartRound(arg0, arg1, arg2 any) *MockcoinStartRoundCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartRound", reflect.TypeOf((*Mockcoin)(nil).StartRound), arg0, arg1, arg2) - return &coinStartRoundCall{Call: call} + return &MockcoinStartRoundCall{Call: call} } -// coinStartRoundCall wrap *gomock.Call -type coinStartRoundCall struct { +// MockcoinStartRoundCall wrap *gomock.Call +type MockcoinStartRoundCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *coinStartRoundCall) Return() *coinStartRoundCall { +func (c *MockcoinStartRoundCall) Return() *MockcoinStartRoundCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *coinStartRoundCall) Do(f func(context.Context, types.RoundID, []weakcoin.Participant)) *coinStartRoundCall { +func (c *MockcoinStartRoundCall) Do(f func(context.Context, types.RoundID, []weakcoin.Participant)) *MockcoinStartRoundCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *coinStartRoundCall) DoAndReturn(f func(context.Context, types.RoundID, []weakcoin.Participant)) *coinStartRoundCall { +func (c *MockcoinStartRoundCall) DoAndReturn(f func(context.Context, types.RoundID, []weakcoin.Participant)) *MockcoinStartRoundCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -295,31 +296,31 @@ func (m *MockeligibilityChecker) PassStrictThreshold(arg0 types.VrfSignature) bo } // PassStrictThreshold indicates an expected call of PassStrictThreshold. -func (mr *MockeligibilityCheckerMockRecorder) PassStrictThreshold(arg0 any) *eligibilityCheckerPassStrictThresholdCall { +func (mr *MockeligibilityCheckerMockRecorder) PassStrictThreshold(arg0 any) *MockeligibilityCheckerPassStrictThresholdCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PassStrictThreshold", reflect.TypeOf((*MockeligibilityChecker)(nil).PassStrictThreshold), arg0) - return &eligibilityCheckerPassStrictThresholdCall{Call: call} + return &MockeligibilityCheckerPassStrictThresholdCall{Call: call} } -// eligibilityCheckerPassStrictThresholdCall wrap *gomock.Call -type eligibilityCheckerPassStrictThresholdCall struct { +// MockeligibilityCheckerPassStrictThresholdCall wrap *gomock.Call +type MockeligibilityCheckerPassStrictThresholdCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *eligibilityCheckerPassStrictThresholdCall) Return(arg0 bool) *eligibilityCheckerPassStrictThresholdCall { +func (c *MockeligibilityCheckerPassStrictThresholdCall) Return(arg0 bool) *MockeligibilityCheckerPassStrictThresholdCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *eligibilityCheckerPassStrictThresholdCall) Do(f func(types.VrfSignature) bool) *eligibilityCheckerPassStrictThresholdCall { +func (c *MockeligibilityCheckerPassStrictThresholdCall) Do(f func(types.VrfSignature) bool) *MockeligibilityCheckerPassStrictThresholdCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *eligibilityCheckerPassStrictThresholdCall) DoAndReturn(f func(types.VrfSignature) bool) *eligibilityCheckerPassStrictThresholdCall { +func (c *MockeligibilityCheckerPassStrictThresholdCall) DoAndReturn(f func(types.VrfSignature) bool) *MockeligibilityCheckerPassStrictThresholdCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -333,31 +334,31 @@ func (m *MockeligibilityChecker) PassThreshold(arg0 types.VrfSignature) bool { } // PassThreshold indicates an expected call of PassThreshold. -func (mr *MockeligibilityCheckerMockRecorder) PassThreshold(arg0 any) *eligibilityCheckerPassThresholdCall { +func (mr *MockeligibilityCheckerMockRecorder) PassThreshold(arg0 any) *MockeligibilityCheckerPassThresholdCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PassThreshold", reflect.TypeOf((*MockeligibilityChecker)(nil).PassThreshold), arg0) - return &eligibilityCheckerPassThresholdCall{Call: call} + return &MockeligibilityCheckerPassThresholdCall{Call: call} } -// eligibilityCheckerPassThresholdCall wrap *gomock.Call -type eligibilityCheckerPassThresholdCall struct { +// MockeligibilityCheckerPassThresholdCall wrap *gomock.Call +type MockeligibilityCheckerPassThresholdCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *eligibilityCheckerPassThresholdCall) Return(arg0 bool) *eligibilityCheckerPassThresholdCall { +func (c *MockeligibilityCheckerPassThresholdCall) Return(arg0 bool) *MockeligibilityCheckerPassThresholdCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *eligibilityCheckerPassThresholdCall) Do(f func(types.VrfSignature) bool) *eligibilityCheckerPassThresholdCall { +func (c *MockeligibilityCheckerPassThresholdCall) Do(f func(types.VrfSignature) bool) *MockeligibilityCheckerPassThresholdCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *eligibilityCheckerPassThresholdCall) DoAndReturn(f func(types.VrfSignature) bool) *eligibilityCheckerPassThresholdCall { +func (c *MockeligibilityCheckerPassThresholdCall) DoAndReturn(f func(types.VrfSignature) bool) *MockeligibilityCheckerPassThresholdCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -394,31 +395,31 @@ func (m *MocklayerClock) AwaitLayer(arg0 types.LayerID) <-chan struct{} { } // AwaitLayer indicates an expected call of AwaitLayer. -func (mr *MocklayerClockMockRecorder) AwaitLayer(arg0 any) *layerClockAwaitLayerCall { +func (mr *MocklayerClockMockRecorder) AwaitLayer(arg0 any) *MocklayerClockAwaitLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AwaitLayer", reflect.TypeOf((*MocklayerClock)(nil).AwaitLayer), arg0) - return &layerClockAwaitLayerCall{Call: call} + return &MocklayerClockAwaitLayerCall{Call: call} } -// layerClockAwaitLayerCall wrap *gomock.Call -type layerClockAwaitLayerCall struct { +// MocklayerClockAwaitLayerCall wrap *gomock.Call +type MocklayerClockAwaitLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -432,31 +433,31 @@ func (m *MocklayerClock) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MocklayerClockMockRecorder) CurrentLayer() *layerClockCurrentLayerCall { +func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer)) - return &layerClockCurrentLayerCall{Call: call} + return &MocklayerClockCurrentLayerCall{Call: call} } -// layerClockCurrentLayerCall wrap *gomock.Call -type layerClockCurrentLayerCall struct { +// MocklayerClockCurrentLayerCall wrap *gomock.Call +type MocklayerClockCurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockCurrentLayerCall) Return(arg0 types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockCurrentLayerCall) Do(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -470,31 +471,31 @@ func (m *MocklayerClock) LayerToTime(arg0 types.LayerID) time.Time { } // LayerToTime indicates an expected call of LayerToTime. -func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *layerClockLayerToTimeCall { +func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *MocklayerClockLayerToTimeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LayerToTime", reflect.TypeOf((*MocklayerClock)(nil).LayerToTime), arg0) - return &layerClockLayerToTimeCall{Call: call} + return &MocklayerClockLayerToTimeCall{Call: call} } -// layerClockLayerToTimeCall wrap *gomock.Call -type layerClockLayerToTimeCall struct { +// MocklayerClockLayerToTimeCall wrap *gomock.Call +type MocklayerClockLayerToTimeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockLayerToTimeCall) Return(arg0 time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) Return(arg0 time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -531,31 +532,31 @@ func (m *MockvrfSigner) NodeID() types.NodeID { } // NodeID indicates an expected call of NodeID. -func (mr *MockvrfSignerMockRecorder) NodeID() *vrfSignerNodeIDCall { +func (mr *MockvrfSignerMockRecorder) NodeID() *MockvrfSignerNodeIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeID", reflect.TypeOf((*MockvrfSigner)(nil).NodeID)) - return &vrfSignerNodeIDCall{Call: call} + return &MockvrfSignerNodeIDCall{Call: call} } -// vrfSignerNodeIDCall wrap *gomock.Call -type vrfSignerNodeIDCall struct { +// MockvrfSignerNodeIDCall wrap *gomock.Call +type MockvrfSignerNodeIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vrfSignerNodeIDCall) Return(arg0 types.NodeID) *vrfSignerNodeIDCall { +func (c *MockvrfSignerNodeIDCall) Return(arg0 types.NodeID) *MockvrfSignerNodeIDCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vrfSignerNodeIDCall) Do(f func() types.NodeID) *vrfSignerNodeIDCall { +func (c *MockvrfSignerNodeIDCall) Do(f func() types.NodeID) *MockvrfSignerNodeIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vrfSignerNodeIDCall) DoAndReturn(f func() types.NodeID) *vrfSignerNodeIDCall { +func (c *MockvrfSignerNodeIDCall) DoAndReturn(f func() types.NodeID) *MockvrfSignerNodeIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -569,31 +570,31 @@ func (m *MockvrfSigner) Sign(msg []byte) types.VrfSignature { } // Sign indicates an expected call of Sign. -func (mr *MockvrfSignerMockRecorder) Sign(msg any) *vrfSignerSignCall { +func (mr *MockvrfSignerMockRecorder) Sign(msg any) *MockvrfSignerSignCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sign", reflect.TypeOf((*MockvrfSigner)(nil).Sign), msg) - return &vrfSignerSignCall{Call: call} + return &MockvrfSignerSignCall{Call: call} } -// vrfSignerSignCall wrap *gomock.Call -type vrfSignerSignCall struct { +// MockvrfSignerSignCall wrap *gomock.Call +type MockvrfSignerSignCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vrfSignerSignCall) Return(arg0 types.VrfSignature) *vrfSignerSignCall { +func (c *MockvrfSignerSignCall) Return(arg0 types.VrfSignature) *MockvrfSignerSignCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vrfSignerSignCall) Do(f func([]byte) types.VrfSignature) *vrfSignerSignCall { +func (c *MockvrfSignerSignCall) Do(f func([]byte) types.VrfSignature) *MockvrfSignerSignCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vrfSignerSignCall) DoAndReturn(f func([]byte) types.VrfSignature) *vrfSignerSignCall { +func (c *MockvrfSignerSignCall) DoAndReturn(f func([]byte) types.VrfSignature) *MockvrfSignerSignCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -630,31 +631,31 @@ func (m *MockvrfVerifier) Verify(nodeID types.NodeID, msg []byte, sig types.VrfS } // Verify indicates an expected call of Verify. -func (mr *MockvrfVerifierMockRecorder) Verify(nodeID, msg, sig any) *vrfVerifierVerifyCall { +func (mr *MockvrfVerifierMockRecorder) Verify(nodeID, msg, sig any) *MockvrfVerifierVerifyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockvrfVerifier)(nil).Verify), nodeID, msg, sig) - return &vrfVerifierVerifyCall{Call: call} + return &MockvrfVerifierVerifyCall{Call: call} } -// vrfVerifierVerifyCall wrap *gomock.Call -type vrfVerifierVerifyCall struct { +// MockvrfVerifierVerifyCall wrap *gomock.Call +type MockvrfVerifierVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vrfVerifierVerifyCall) Return(arg0 bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) Return(arg0 bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -692,31 +693,31 @@ func (m *MocknonceFetcher) VRFNonce(arg0 types.NodeID, arg1 types.EpochID) (type } // VRFNonce indicates an expected call of VRFNonce. -func (mr *MocknonceFetcherMockRecorder) VRFNonce(arg0, arg1 any) *nonceFetcherVRFNonceCall { +func (mr *MocknonceFetcherMockRecorder) VRFNonce(arg0, arg1 any) *MocknonceFetcherVRFNonceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VRFNonce", reflect.TypeOf((*MocknonceFetcher)(nil).VRFNonce), arg0, arg1) - return &nonceFetcherVRFNonceCall{Call: call} + return &MocknonceFetcherVRFNonceCall{Call: call} } -// nonceFetcherVRFNonceCall wrap *gomock.Call -type nonceFetcherVRFNonceCall struct { +// MocknonceFetcherVRFNonceCall wrap *gomock.Call +type MocknonceFetcherVRFNonceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nonceFetcherVRFNonceCall) Return(arg0 types.VRFPostIndex, arg1 error) *nonceFetcherVRFNonceCall { +func (c *MocknonceFetcherVRFNonceCall) Return(arg0 types.VRFPostIndex, arg1 error) *MocknonceFetcherVRFNonceCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *nonceFetcherVRFNonceCall) Do(f func(types.NodeID, types.EpochID) (types.VRFPostIndex, error)) *nonceFetcherVRFNonceCall { +func (c *MocknonceFetcherVRFNonceCall) Do(f func(types.NodeID, types.EpochID) (types.VRFPostIndex, error)) *MocknonceFetcherVRFNonceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nonceFetcherVRFNonceCall) DoAndReturn(f func(types.NodeID, types.EpochID) (types.VRFPostIndex, error)) *nonceFetcherVRFNonceCall { +func (c *MocknonceFetcherVRFNonceCall) DoAndReturn(f func(types.NodeID, types.EpochID) (types.VRFPostIndex, error)) *MocknonceFetcherVRFNonceCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/beacon/weakcoin/mocks.go b/beacon/weakcoin/mocks.go index 59b6fed82bf..9cf92f1e0cd 100644 --- a/beacon/weakcoin/mocks.go +++ b/beacon/weakcoin/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=weakcoin -destination=./mocks.go -source=./interface.go // + // Package weakcoin is a generated GoMock package. package weakcoin @@ -47,31 +48,31 @@ func (m *MockvrfSigner) NodeID() types.NodeID { } // NodeID indicates an expected call of NodeID. -func (mr *MockvrfSignerMockRecorder) NodeID() *vrfSignerNodeIDCall { +func (mr *MockvrfSignerMockRecorder) NodeID() *MockvrfSignerNodeIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NodeID", reflect.TypeOf((*MockvrfSigner)(nil).NodeID)) - return &vrfSignerNodeIDCall{Call: call} + return &MockvrfSignerNodeIDCall{Call: call} } -// vrfSignerNodeIDCall wrap *gomock.Call -type vrfSignerNodeIDCall struct { +// MockvrfSignerNodeIDCall wrap *gomock.Call +type MockvrfSignerNodeIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vrfSignerNodeIDCall) Return(arg0 types.NodeID) *vrfSignerNodeIDCall { +func (c *MockvrfSignerNodeIDCall) Return(arg0 types.NodeID) *MockvrfSignerNodeIDCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vrfSignerNodeIDCall) Do(f func() types.NodeID) *vrfSignerNodeIDCall { +func (c *MockvrfSignerNodeIDCall) Do(f func() types.NodeID) *MockvrfSignerNodeIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vrfSignerNodeIDCall) DoAndReturn(f func() types.NodeID) *vrfSignerNodeIDCall { +func (c *MockvrfSignerNodeIDCall) DoAndReturn(f func() types.NodeID) *MockvrfSignerNodeIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -85,31 +86,31 @@ func (m *MockvrfSigner) Sign(msg []byte) types.VrfSignature { } // Sign indicates an expected call of Sign. -func (mr *MockvrfSignerMockRecorder) Sign(msg any) *vrfSignerSignCall { +func (mr *MockvrfSignerMockRecorder) Sign(msg any) *MockvrfSignerSignCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sign", reflect.TypeOf((*MockvrfSigner)(nil).Sign), msg) - return &vrfSignerSignCall{Call: call} + return &MockvrfSignerSignCall{Call: call} } -// vrfSignerSignCall wrap *gomock.Call -type vrfSignerSignCall struct { +// MockvrfSignerSignCall wrap *gomock.Call +type MockvrfSignerSignCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vrfSignerSignCall) Return(arg0 types.VrfSignature) *vrfSignerSignCall { +func (c *MockvrfSignerSignCall) Return(arg0 types.VrfSignature) *MockvrfSignerSignCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vrfSignerSignCall) Do(f func([]byte) types.VrfSignature) *vrfSignerSignCall { +func (c *MockvrfSignerSignCall) Do(f func([]byte) types.VrfSignature) *MockvrfSignerSignCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vrfSignerSignCall) DoAndReturn(f func([]byte) types.VrfSignature) *vrfSignerSignCall { +func (c *MockvrfSignerSignCall) DoAndReturn(f func([]byte) types.VrfSignature) *MockvrfSignerSignCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -146,31 +147,31 @@ func (m *MockvrfVerifier) Verify(nodeID types.NodeID, msg []byte, sig types.VrfS } // Verify indicates an expected call of Verify. -func (mr *MockvrfVerifierMockRecorder) Verify(nodeID, msg, sig any) *vrfVerifierVerifyCall { +func (mr *MockvrfVerifierMockRecorder) Verify(nodeID, msg, sig any) *MockvrfVerifierVerifyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockvrfVerifier)(nil).Verify), nodeID, msg, sig) - return &vrfVerifierVerifyCall{Call: call} + return &MockvrfVerifierVerifyCall{Call: call} } -// vrfVerifierVerifyCall wrap *gomock.Call -type vrfVerifierVerifyCall struct { +// MockvrfVerifierVerifyCall wrap *gomock.Call +type MockvrfVerifierVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vrfVerifierVerifyCall) Return(arg0 bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) Return(arg0 bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -208,31 +209,31 @@ func (m *MocknonceFetcher) VRFNonce(arg0 types.NodeID, arg1 types.EpochID) (type } // VRFNonce indicates an expected call of VRFNonce. -func (mr *MocknonceFetcherMockRecorder) VRFNonce(arg0, arg1 any) *nonceFetcherVRFNonceCall { +func (mr *MocknonceFetcherMockRecorder) VRFNonce(arg0, arg1 any) *MocknonceFetcherVRFNonceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VRFNonce", reflect.TypeOf((*MocknonceFetcher)(nil).VRFNonce), arg0, arg1) - return &nonceFetcherVRFNonceCall{Call: call} + return &MocknonceFetcherVRFNonceCall{Call: call} } -// nonceFetcherVRFNonceCall wrap *gomock.Call -type nonceFetcherVRFNonceCall struct { +// MocknonceFetcherVRFNonceCall wrap *gomock.Call +type MocknonceFetcherVRFNonceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *nonceFetcherVRFNonceCall) Return(arg0 types.VRFPostIndex, arg1 error) *nonceFetcherVRFNonceCall { +func (c *MocknonceFetcherVRFNonceCall) Return(arg0 types.VRFPostIndex, arg1 error) *MocknonceFetcherVRFNonceCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *nonceFetcherVRFNonceCall) Do(f func(types.NodeID, types.EpochID) (types.VRFPostIndex, error)) *nonceFetcherVRFNonceCall { +func (c *MocknonceFetcherVRFNonceCall) Do(f func(types.NodeID, types.EpochID) (types.VRFPostIndex, error)) *MocknonceFetcherVRFNonceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *nonceFetcherVRFNonceCall) DoAndReturn(f func(types.NodeID, types.EpochID) (types.VRFPostIndex, error)) *nonceFetcherVRFNonceCall { +func (c *MocknonceFetcherVRFNonceCall) DoAndReturn(f func(types.NodeID, types.EpochID) (types.VRFPostIndex, error)) *MocknonceFetcherVRFNonceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -269,31 +270,31 @@ func (m *Mockallowance) MinerAllowance(arg0 types.EpochID, arg1 types.NodeID) ui } // MinerAllowance indicates an expected call of MinerAllowance. -func (mr *MockallowanceMockRecorder) MinerAllowance(arg0, arg1 any) *allowanceMinerAllowanceCall { +func (mr *MockallowanceMockRecorder) MinerAllowance(arg0, arg1 any) *MockallowanceMinerAllowanceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MinerAllowance", reflect.TypeOf((*Mockallowance)(nil).MinerAllowance), arg0, arg1) - return &allowanceMinerAllowanceCall{Call: call} + return &MockallowanceMinerAllowanceCall{Call: call} } -// allowanceMinerAllowanceCall wrap *gomock.Call -type allowanceMinerAllowanceCall struct { +// MockallowanceMinerAllowanceCall wrap *gomock.Call +type MockallowanceMinerAllowanceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *allowanceMinerAllowanceCall) Return(arg0 uint32) *allowanceMinerAllowanceCall { +func (c *MockallowanceMinerAllowanceCall) Return(arg0 uint32) *MockallowanceMinerAllowanceCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *allowanceMinerAllowanceCall) Do(f func(types.EpochID, types.NodeID) uint32) *allowanceMinerAllowanceCall { +func (c *MockallowanceMinerAllowanceCall) Do(f func(types.EpochID, types.NodeID) uint32) *MockallowanceMinerAllowanceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *allowanceMinerAllowanceCall) DoAndReturn(f func(types.EpochID, types.NodeID) uint32) *allowanceMinerAllowanceCall { +func (c *MockallowanceMinerAllowanceCall) DoAndReturn(f func(types.EpochID, types.NodeID) uint32) *MockallowanceMinerAllowanceCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/blocks/mocks/mocks.go b/blocks/mocks/mocks.go index 5f6ccde2e35..a7473863299 100644 --- a/blocks/mocks/mocks.go +++ b/blocks/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./interface.go // + // Package mocks is a generated GoMock package. package mocks @@ -46,31 +47,31 @@ func (m *MocklayerPatrol) CompleteHare(arg0 types.LayerID) { } // CompleteHare indicates an expected call of CompleteHare. -func (mr *MocklayerPatrolMockRecorder) CompleteHare(arg0 any) *layerPatrolCompleteHareCall { +func (mr *MocklayerPatrolMockRecorder) CompleteHare(arg0 any) *MocklayerPatrolCompleteHareCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteHare", reflect.TypeOf((*MocklayerPatrol)(nil).CompleteHare), arg0) - return &layerPatrolCompleteHareCall{Call: call} + return &MocklayerPatrolCompleteHareCall{Call: call} } -// layerPatrolCompleteHareCall wrap *gomock.Call -type layerPatrolCompleteHareCall struct { +// MocklayerPatrolCompleteHareCall wrap *gomock.Call +type MocklayerPatrolCompleteHareCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerPatrolCompleteHareCall) Return() *layerPatrolCompleteHareCall { +func (c *MocklayerPatrolCompleteHareCall) Return() *MocklayerPatrolCompleteHareCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *layerPatrolCompleteHareCall) Do(f func(types.LayerID)) *layerPatrolCompleteHareCall { +func (c *MocklayerPatrolCompleteHareCall) Do(f func(types.LayerID)) *MocklayerPatrolCompleteHareCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerPatrolCompleteHareCall) DoAndReturn(f func(types.LayerID)) *layerPatrolCompleteHareCall { +func (c *MocklayerPatrolCompleteHareCall) DoAndReturn(f func(types.LayerID)) *MocklayerPatrolCompleteHareCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -107,31 +108,31 @@ func (m *MockmeshProvider) AddBlockWithTXs(arg0 context.Context, arg1 *types.Blo } // AddBlockWithTXs indicates an expected call of AddBlockWithTXs. -func (mr *MockmeshProviderMockRecorder) AddBlockWithTXs(arg0, arg1 any) *meshProviderAddBlockWithTXsCall { +func (mr *MockmeshProviderMockRecorder) AddBlockWithTXs(arg0, arg1 any) *MockmeshProviderAddBlockWithTXsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlockWithTXs", reflect.TypeOf((*MockmeshProvider)(nil).AddBlockWithTXs), arg0, arg1) - return &meshProviderAddBlockWithTXsCall{Call: call} + return &MockmeshProviderAddBlockWithTXsCall{Call: call} } -// meshProviderAddBlockWithTXsCall wrap *gomock.Call -type meshProviderAddBlockWithTXsCall struct { +// MockmeshProviderAddBlockWithTXsCall wrap *gomock.Call +type MockmeshProviderAddBlockWithTXsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshProviderAddBlockWithTXsCall) Return(arg0 error) *meshProviderAddBlockWithTXsCall { +func (c *MockmeshProviderAddBlockWithTXsCall) Return(arg0 error) *MockmeshProviderAddBlockWithTXsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *meshProviderAddBlockWithTXsCall) Do(f func(context.Context, *types.Block) error) *meshProviderAddBlockWithTXsCall { +func (c *MockmeshProviderAddBlockWithTXsCall) Do(f func(context.Context, *types.Block) error) *MockmeshProviderAddBlockWithTXsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshProviderAddBlockWithTXsCall) DoAndReturn(f func(context.Context, *types.Block) error) *meshProviderAddBlockWithTXsCall { +func (c *MockmeshProviderAddBlockWithTXsCall) DoAndReturn(f func(context.Context, *types.Block) error) *MockmeshProviderAddBlockWithTXsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -145,31 +146,31 @@ func (m *MockmeshProvider) ProcessLayerPerHareOutput(arg0 context.Context, arg1 } // ProcessLayerPerHareOutput indicates an expected call of ProcessLayerPerHareOutput. -func (mr *MockmeshProviderMockRecorder) ProcessLayerPerHareOutput(arg0, arg1, arg2, arg3 any) *meshProviderProcessLayerPerHareOutputCall { +func (mr *MockmeshProviderMockRecorder) ProcessLayerPerHareOutput(arg0, arg1, arg2, arg3 any) *MockmeshProviderProcessLayerPerHareOutputCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessLayerPerHareOutput", reflect.TypeOf((*MockmeshProvider)(nil).ProcessLayerPerHareOutput), arg0, arg1, arg2, arg3) - return &meshProviderProcessLayerPerHareOutputCall{Call: call} + return &MockmeshProviderProcessLayerPerHareOutputCall{Call: call} } -// meshProviderProcessLayerPerHareOutputCall wrap *gomock.Call -type meshProviderProcessLayerPerHareOutputCall struct { +// MockmeshProviderProcessLayerPerHareOutputCall wrap *gomock.Call +type MockmeshProviderProcessLayerPerHareOutputCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshProviderProcessLayerPerHareOutputCall) Return(arg0 error) *meshProviderProcessLayerPerHareOutputCall { +func (c *MockmeshProviderProcessLayerPerHareOutputCall) Return(arg0 error) *MockmeshProviderProcessLayerPerHareOutputCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *meshProviderProcessLayerPerHareOutputCall) Do(f func(context.Context, types.LayerID, types.BlockID, bool) error) *meshProviderProcessLayerPerHareOutputCall { +func (c *MockmeshProviderProcessLayerPerHareOutputCall) Do(f func(context.Context, types.LayerID, types.BlockID, bool) error) *MockmeshProviderProcessLayerPerHareOutputCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshProviderProcessLayerPerHareOutputCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID, bool) error) *meshProviderProcessLayerPerHareOutputCall { +func (c *MockmeshProviderProcessLayerPerHareOutputCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID, bool) error) *MockmeshProviderProcessLayerPerHareOutputCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -183,31 +184,31 @@ func (m *MockmeshProvider) ProcessedLayer() types.LayerID { } // ProcessedLayer indicates an expected call of ProcessedLayer. -func (mr *MockmeshProviderMockRecorder) ProcessedLayer() *meshProviderProcessedLayerCall { +func (mr *MockmeshProviderMockRecorder) ProcessedLayer() *MockmeshProviderProcessedLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessedLayer", reflect.TypeOf((*MockmeshProvider)(nil).ProcessedLayer)) - return &meshProviderProcessedLayerCall{Call: call} + return &MockmeshProviderProcessedLayerCall{Call: call} } -// meshProviderProcessedLayerCall wrap *gomock.Call -type meshProviderProcessedLayerCall struct { +// MockmeshProviderProcessedLayerCall wrap *gomock.Call +type MockmeshProviderProcessedLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshProviderProcessedLayerCall) Return(arg0 types.LayerID) *meshProviderProcessedLayerCall { +func (c *MockmeshProviderProcessedLayerCall) Return(arg0 types.LayerID) *MockmeshProviderProcessedLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *meshProviderProcessedLayerCall) Do(f func() types.LayerID) *meshProviderProcessedLayerCall { +func (c *MockmeshProviderProcessedLayerCall) Do(f func() types.LayerID) *MockmeshProviderProcessedLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshProviderProcessedLayerCall) DoAndReturn(f func() types.LayerID) *meshProviderProcessedLayerCall { +func (c *MockmeshProviderProcessedLayerCall) DoAndReturn(f func() types.LayerID) *MockmeshProviderProcessedLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -245,31 +246,31 @@ func (m *Mockexecutor) ExecuteOptimistic(arg0 context.Context, arg1 types.LayerI } // ExecuteOptimistic indicates an expected call of ExecuteOptimistic. -func (mr *MockexecutorMockRecorder) ExecuteOptimistic(arg0, arg1, arg2, arg3, arg4 any) *executorExecuteOptimisticCall { +func (mr *MockexecutorMockRecorder) ExecuteOptimistic(arg0, arg1, arg2, arg3, arg4 any) *MockexecutorExecuteOptimisticCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteOptimistic", reflect.TypeOf((*Mockexecutor)(nil).ExecuteOptimistic), arg0, arg1, arg2, arg3, arg4) - return &executorExecuteOptimisticCall{Call: call} + return &MockexecutorExecuteOptimisticCall{Call: call} } -// executorExecuteOptimisticCall wrap *gomock.Call -type executorExecuteOptimisticCall struct { +// MockexecutorExecuteOptimisticCall wrap *gomock.Call +type MockexecutorExecuteOptimisticCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *executorExecuteOptimisticCall) Return(arg0 *types.Block, arg1 error) *executorExecuteOptimisticCall { +func (c *MockexecutorExecuteOptimisticCall) Return(arg0 *types.Block, arg1 error) *MockexecutorExecuteOptimisticCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *executorExecuteOptimisticCall) Do(f func(context.Context, types.LayerID, uint64, []types.AnyReward, []types.TransactionID) (*types.Block, error)) *executorExecuteOptimisticCall { +func (c *MockexecutorExecuteOptimisticCall) Do(f func(context.Context, types.LayerID, uint64, []types.AnyReward, []types.TransactionID) (*types.Block, error)) *MockexecutorExecuteOptimisticCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *executorExecuteOptimisticCall) DoAndReturn(f func(context.Context, types.LayerID, uint64, []types.AnyReward, []types.TransactionID) (*types.Block, error)) *executorExecuteOptimisticCall { +func (c *MockexecutorExecuteOptimisticCall) DoAndReturn(f func(context.Context, types.LayerID, uint64, []types.AnyReward, []types.TransactionID) (*types.Block, error)) *MockexecutorExecuteOptimisticCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -306,31 +307,31 @@ func (m *MocklayerClock) AwaitLayer(layerID types.LayerID) <-chan struct{} { } // AwaitLayer indicates an expected call of AwaitLayer. -func (mr *MocklayerClockMockRecorder) AwaitLayer(layerID any) *layerClockAwaitLayerCall { +func (mr *MocklayerClockMockRecorder) AwaitLayer(layerID any) *MocklayerClockAwaitLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AwaitLayer", reflect.TypeOf((*MocklayerClock)(nil).AwaitLayer), layerID) - return &layerClockAwaitLayerCall{Call: call} + return &MocklayerClockAwaitLayerCall{Call: call} } -// layerClockAwaitLayerCall wrap *gomock.Call -type layerClockAwaitLayerCall struct { +// MocklayerClockAwaitLayerCall wrap *gomock.Call +type MocklayerClockAwaitLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -344,31 +345,31 @@ func (m *MocklayerClock) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MocklayerClockMockRecorder) CurrentLayer() *layerClockCurrentLayerCall { +func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer)) - return &layerClockCurrentLayerCall{Call: call} + return &MocklayerClockCurrentLayerCall{Call: call} } -// layerClockCurrentLayerCall wrap *gomock.Call -type layerClockCurrentLayerCall struct { +// MocklayerClockCurrentLayerCall wrap *gomock.Call +type MocklayerClockCurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockCurrentLayerCall) Return(arg0 types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockCurrentLayerCall) Do(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -405,31 +406,31 @@ func (m *Mockcertifier) CertifyIfEligible(arg0 context.Context, arg1 types.Layer } // CertifyIfEligible indicates an expected call of CertifyIfEligible. -func (mr *MockcertifierMockRecorder) CertifyIfEligible(arg0, arg1, arg2 any) *certifierCertifyIfEligibleCall { +func (mr *MockcertifierMockRecorder) CertifyIfEligible(arg0, arg1, arg2 any) *MockcertifierCertifyIfEligibleCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CertifyIfEligible", reflect.TypeOf((*Mockcertifier)(nil).CertifyIfEligible), arg0, arg1, arg2) - return &certifierCertifyIfEligibleCall{Call: call} + return &MockcertifierCertifyIfEligibleCall{Call: call} } -// certifierCertifyIfEligibleCall wrap *gomock.Call -type certifierCertifyIfEligibleCall struct { +// MockcertifierCertifyIfEligibleCall wrap *gomock.Call +type MockcertifierCertifyIfEligibleCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *certifierCertifyIfEligibleCall) Return(arg0 error) *certifierCertifyIfEligibleCall { +func (c *MockcertifierCertifyIfEligibleCall) Return(arg0 error) *MockcertifierCertifyIfEligibleCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *certifierCertifyIfEligibleCall) Do(f func(context.Context, types.LayerID, types.BlockID) error) *certifierCertifyIfEligibleCall { +func (c *MockcertifierCertifyIfEligibleCall) Do(f func(context.Context, types.LayerID, types.BlockID) error) *MockcertifierCertifyIfEligibleCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *certifierCertifyIfEligibleCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID) error) *certifierCertifyIfEligibleCall { +func (c *MockcertifierCertifyIfEligibleCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID) error) *MockcertifierCertifyIfEligibleCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -443,31 +444,31 @@ func (m *Mockcertifier) RegisterForCert(arg0 context.Context, arg1 types.LayerID } // RegisterForCert indicates an expected call of RegisterForCert. -func (mr *MockcertifierMockRecorder) RegisterForCert(arg0, arg1, arg2 any) *certifierRegisterForCertCall { +func (mr *MockcertifierMockRecorder) RegisterForCert(arg0, arg1, arg2 any) *MockcertifierRegisterForCertCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterForCert", reflect.TypeOf((*Mockcertifier)(nil).RegisterForCert), arg0, arg1, arg2) - return &certifierRegisterForCertCall{Call: call} + return &MockcertifierRegisterForCertCall{Call: call} } -// certifierRegisterForCertCall wrap *gomock.Call -type certifierRegisterForCertCall struct { +// MockcertifierRegisterForCertCall wrap *gomock.Call +type MockcertifierRegisterForCertCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *certifierRegisterForCertCall) Return(arg0 error) *certifierRegisterForCertCall { +func (c *MockcertifierRegisterForCertCall) Return(arg0 error) *MockcertifierRegisterForCertCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *certifierRegisterForCertCall) Do(f func(context.Context, types.LayerID, types.BlockID) error) *certifierRegisterForCertCall { +func (c *MockcertifierRegisterForCertCall) Do(f func(context.Context, types.LayerID, types.BlockID) error) *MockcertifierRegisterForCertCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *certifierRegisterForCertCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID) error) *certifierRegisterForCertCall { +func (c *MockcertifierRegisterForCertCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID) error) *MockcertifierRegisterForCertCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -504,31 +505,31 @@ func (m *MocktortoiseProvider) GetMissingActiveSet(arg0 types.EpochID, arg1 []ty } // GetMissingActiveSet indicates an expected call of GetMissingActiveSet. -func (mr *MocktortoiseProviderMockRecorder) GetMissingActiveSet(arg0, arg1 any) *tortoiseProviderGetMissingActiveSetCall { +func (mr *MocktortoiseProviderMockRecorder) GetMissingActiveSet(arg0, arg1 any) *MocktortoiseProviderGetMissingActiveSetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMissingActiveSet", reflect.TypeOf((*MocktortoiseProvider)(nil).GetMissingActiveSet), arg0, arg1) - return &tortoiseProviderGetMissingActiveSetCall{Call: call} + return &MocktortoiseProviderGetMissingActiveSetCall{Call: call} } -// tortoiseProviderGetMissingActiveSetCall wrap *gomock.Call -type tortoiseProviderGetMissingActiveSetCall struct { +// MocktortoiseProviderGetMissingActiveSetCall wrap *gomock.Call +type MocktortoiseProviderGetMissingActiveSetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *tortoiseProviderGetMissingActiveSetCall) Return(arg0 []types.ATXID) *tortoiseProviderGetMissingActiveSetCall { +func (c *MocktortoiseProviderGetMissingActiveSetCall) Return(arg0 []types.ATXID) *MocktortoiseProviderGetMissingActiveSetCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *tortoiseProviderGetMissingActiveSetCall) Do(f func(types.EpochID, []types.ATXID) []types.ATXID) *tortoiseProviderGetMissingActiveSetCall { +func (c *MocktortoiseProviderGetMissingActiveSetCall) Do(f func(types.EpochID, []types.ATXID) []types.ATXID) *MocktortoiseProviderGetMissingActiveSetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *tortoiseProviderGetMissingActiveSetCall) DoAndReturn(f func(types.EpochID, []types.ATXID) []types.ATXID) *tortoiseProviderGetMissingActiveSetCall { +func (c *MocktortoiseProviderGetMissingActiveSetCall) DoAndReturn(f func(types.EpochID, []types.ATXID) []types.ATXID) *MocktortoiseProviderGetMissingActiveSetCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/bootstrap/mocks.go b/bootstrap/mocks.go index be792598657..293acc9660e 100644 --- a/bootstrap/mocks.go +++ b/bootstrap/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=bootstrap -destination=./mocks.go -source=./interface.go // + // Package bootstrap is a generated GoMock package. package bootstrap @@ -47,31 +48,31 @@ func (m *MocklayerClock) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MocklayerClockMockRecorder) CurrentLayer() *layerClockCurrentLayerCall { +func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer)) - return &layerClockCurrentLayerCall{Call: call} + return &MocklayerClockCurrentLayerCall{Call: call} } -// layerClockCurrentLayerCall wrap *gomock.Call -type layerClockCurrentLayerCall struct { +// MocklayerClockCurrentLayerCall wrap *gomock.Call +type MocklayerClockCurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockCurrentLayerCall) Return(arg0 types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockCurrentLayerCall) Do(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/datastore/mocks/mocks.go b/datastore/mocks/mocks.go index 4046a794882..f1ec175d327 100644 --- a/datastore/mocks/mocks.go +++ b/datastore/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./store.go // + // Package mocks is a generated GoMock package. package mocks @@ -49,31 +50,31 @@ func (m *MockExecutor) Exec(arg0 string, arg1 sql.Encoder, arg2 sql.Decoder) (in } // Exec indicates an expected call of Exec. -func (mr *MockExecutorMockRecorder) Exec(arg0, arg1, arg2 any) *ExecutorExecCall { +func (mr *MockExecutorMockRecorder) Exec(arg0, arg1, arg2 any) *MockExecutorExecCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockExecutor)(nil).Exec), arg0, arg1, arg2) - return &ExecutorExecCall{Call: call} + return &MockExecutorExecCall{Call: call} } -// ExecutorExecCall wrap *gomock.Call -type ExecutorExecCall struct { +// MockExecutorExecCall wrap *gomock.Call +type MockExecutorExecCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ExecutorExecCall) Return(arg0 int, arg1 error) *ExecutorExecCall { +func (c *MockExecutorExecCall) Return(arg0 int, arg1 error) *MockExecutorExecCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ExecutorExecCall) Do(f func(string, sql.Encoder, sql.Decoder) (int, error)) *ExecutorExecCall { +func (c *MockExecutorExecCall) Do(f func(string, sql.Encoder, sql.Decoder) (int, error)) *MockExecutorExecCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ExecutorExecCall) DoAndReturn(f func(string, sql.Encoder, sql.Decoder) (int, error)) *ExecutorExecCall { +func (c *MockExecutorExecCall) DoAndReturn(f func(string, sql.Encoder, sql.Decoder) (int, error)) *MockExecutorExecCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -87,31 +88,31 @@ func (m *MockExecutor) WithTx(arg0 context.Context, arg1 func(*sql.Tx) error) er } // WithTx indicates an expected call of WithTx. -func (mr *MockExecutorMockRecorder) WithTx(arg0, arg1 any) *ExecutorWithTxCall { +func (mr *MockExecutorMockRecorder) WithTx(arg0, arg1 any) *MockExecutorWithTxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTx", reflect.TypeOf((*MockExecutor)(nil).WithTx), arg0, arg1) - return &ExecutorWithTxCall{Call: call} + return &MockExecutorWithTxCall{Call: call} } -// ExecutorWithTxCall wrap *gomock.Call -type ExecutorWithTxCall struct { +// MockExecutorWithTxCall wrap *gomock.Call +type MockExecutorWithTxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ExecutorWithTxCall) Return(arg0 error) *ExecutorWithTxCall { +func (c *MockExecutorWithTxCall) Return(arg0 error) *MockExecutorWithTxCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ExecutorWithTxCall) Do(f func(context.Context, func(*sql.Tx) error) error) *ExecutorWithTxCall { +func (c *MockExecutorWithTxCall) Do(f func(context.Context, func(*sql.Tx) error) error) *MockExecutorWithTxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ExecutorWithTxCall) DoAndReturn(f func(context.Context, func(*sql.Tx) error) error) *ExecutorWithTxCall { +func (c *MockExecutorWithTxCall) DoAndReturn(f func(context.Context, func(*sql.Tx) error) error) *MockExecutorWithTxCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/fetch/mocks/mocks.go b/fetch/mocks/mocks.go index c7f74bde6ee..63242e4f88b 100644 --- a/fetch/mocks/mocks.go +++ b/fetch/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./interface.go // + // Package mocks is a generated GoMock package. package mocks @@ -50,31 +51,31 @@ func (m *Mockrequester) Request(arg0 context.Context, arg1 p2p.Peer, arg2 []byte } // Request indicates an expected call of Request. -func (mr *MockrequesterMockRecorder) Request(arg0, arg1, arg2 any) *requesterRequestCall { +func (mr *MockrequesterMockRecorder) Request(arg0, arg1, arg2 any) *MockrequesterRequestCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Request", reflect.TypeOf((*Mockrequester)(nil).Request), arg0, arg1, arg2) - return &requesterRequestCall{Call: call} + return &MockrequesterRequestCall{Call: call} } -// requesterRequestCall wrap *gomock.Call -type requesterRequestCall struct { +// MockrequesterRequestCall wrap *gomock.Call +type MockrequesterRequestCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *requesterRequestCall) Return(arg0 []byte, arg1 error) *requesterRequestCall { +func (c *MockrequesterRequestCall) Return(arg0 []byte, arg1 error) *MockrequesterRequestCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *requesterRequestCall) Do(f func(context.Context, p2p.Peer, []byte) ([]byte, error)) *requesterRequestCall { +func (c *MockrequesterRequestCall) Do(f func(context.Context, p2p.Peer, []byte) ([]byte, error)) *MockrequesterRequestCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *requesterRequestCall) DoAndReturn(f func(context.Context, p2p.Peer, []byte) ([]byte, error)) *requesterRequestCall { +func (c *MockrequesterRequestCall) DoAndReturn(f func(context.Context, p2p.Peer, []byte) ([]byte, error)) *MockrequesterRequestCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -88,31 +89,31 @@ func (m *Mockrequester) Run(arg0 context.Context) error { } // Run indicates an expected call of Run. -func (mr *MockrequesterMockRecorder) Run(arg0 any) *requesterRunCall { +func (mr *MockrequesterMockRecorder) Run(arg0 any) *MockrequesterRunCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*Mockrequester)(nil).Run), arg0) - return &requesterRunCall{Call: call} + return &MockrequesterRunCall{Call: call} } -// requesterRunCall wrap *gomock.Call -type requesterRunCall struct { +// MockrequesterRunCall wrap *gomock.Call +type MockrequesterRunCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *requesterRunCall) Return(arg0 error) *requesterRunCall { +func (c *MockrequesterRunCall) Return(arg0 error) *MockrequesterRunCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *requesterRunCall) Do(f func(context.Context) error) *requesterRunCall { +func (c *MockrequesterRunCall) Do(f func(context.Context) error) *MockrequesterRunCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *requesterRunCall) DoAndReturn(f func(context.Context) error) *requesterRunCall { +func (c *MockrequesterRunCall) DoAndReturn(f func(context.Context) error) *MockrequesterRunCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -149,31 +150,31 @@ func (m *MockSyncValidator) HandleMessage(arg0 context.Context, arg1 types.Hash3 } // HandleMessage indicates an expected call of HandleMessage. -func (mr *MockSyncValidatorMockRecorder) HandleMessage(arg0, arg1, arg2, arg3 any) *SyncValidatorHandleMessageCall { +func (mr *MockSyncValidatorMockRecorder) HandleMessage(arg0, arg1, arg2, arg3 any) *MockSyncValidatorHandleMessageCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockSyncValidator)(nil).HandleMessage), arg0, arg1, arg2, arg3) - return &SyncValidatorHandleMessageCall{Call: call} + return &MockSyncValidatorHandleMessageCall{Call: call} } -// SyncValidatorHandleMessageCall wrap *gomock.Call -type SyncValidatorHandleMessageCall struct { +// MockSyncValidatorHandleMessageCall wrap *gomock.Call +type MockSyncValidatorHandleMessageCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SyncValidatorHandleMessageCall) Return(arg0 error) *SyncValidatorHandleMessageCall { +func (c *MockSyncValidatorHandleMessageCall) Return(arg0 error) *MockSyncValidatorHandleMessageCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SyncValidatorHandleMessageCall) Do(f func(context.Context, types.Hash32, p2p.Peer, []byte) error) *SyncValidatorHandleMessageCall { +func (c *MockSyncValidatorHandleMessageCall) Do(f func(context.Context, types.Hash32, p2p.Peer, []byte) error) *MockSyncValidatorHandleMessageCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SyncValidatorHandleMessageCall) DoAndReturn(f func(context.Context, types.Hash32, p2p.Peer, []byte) error) *SyncValidatorHandleMessageCall { +func (c *MockSyncValidatorHandleMessageCall) DoAndReturn(f func(context.Context, types.Hash32, p2p.Peer, []byte) error) *MockSyncValidatorHandleMessageCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -210,31 +211,31 @@ func (m *MockPoetValidator) ValidateAndStoreMsg(arg0 context.Context, arg1 types } // ValidateAndStoreMsg indicates an expected call of ValidateAndStoreMsg. -func (mr *MockPoetValidatorMockRecorder) ValidateAndStoreMsg(arg0, arg1, arg2, arg3 any) *PoetValidatorValidateAndStoreMsgCall { +func (mr *MockPoetValidatorMockRecorder) ValidateAndStoreMsg(arg0, arg1, arg2, arg3 any) *MockPoetValidatorValidateAndStoreMsgCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAndStoreMsg", reflect.TypeOf((*MockPoetValidator)(nil).ValidateAndStoreMsg), arg0, arg1, arg2, arg3) - return &PoetValidatorValidateAndStoreMsgCall{Call: call} + return &MockPoetValidatorValidateAndStoreMsgCall{Call: call} } -// PoetValidatorValidateAndStoreMsgCall wrap *gomock.Call -type PoetValidatorValidateAndStoreMsgCall struct { +// MockPoetValidatorValidateAndStoreMsgCall wrap *gomock.Call +type MockPoetValidatorValidateAndStoreMsgCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PoetValidatorValidateAndStoreMsgCall) Return(arg0 error) *PoetValidatorValidateAndStoreMsgCall { +func (c *MockPoetValidatorValidateAndStoreMsgCall) Return(arg0 error) *MockPoetValidatorValidateAndStoreMsgCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *PoetValidatorValidateAndStoreMsgCall) Do(f func(context.Context, types.Hash32, p2p.Peer, []byte) error) *PoetValidatorValidateAndStoreMsgCall { +func (c *MockPoetValidatorValidateAndStoreMsgCall) Do(f func(context.Context, types.Hash32, p2p.Peer, []byte) error) *MockPoetValidatorValidateAndStoreMsgCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PoetValidatorValidateAndStoreMsgCall) DoAndReturn(f func(context.Context, types.Hash32, p2p.Peer, []byte) error) *PoetValidatorValidateAndStoreMsgCall { +func (c *MockPoetValidatorValidateAndStoreMsgCall) DoAndReturn(f func(context.Context, types.Hash32, p2p.Peer, []byte) error) *MockPoetValidatorValidateAndStoreMsgCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -271,31 +272,31 @@ func (m *Mockhost) ID() p2p.Peer { } // ID indicates an expected call of ID. -func (mr *MockhostMockRecorder) ID() *hostIDCall { +func (mr *MockhostMockRecorder) ID() *MockhostIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*Mockhost)(nil).ID)) - return &hostIDCall{Call: call} + return &MockhostIDCall{Call: call} } -// hostIDCall wrap *gomock.Call -type hostIDCall struct { +// MockhostIDCall wrap *gomock.Call +type MockhostIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *hostIDCall) Return(arg0 p2p.Peer) *hostIDCall { +func (c *MockhostIDCall) Return(arg0 p2p.Peer) *MockhostIDCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *hostIDCall) Do(f func() p2p.Peer) *hostIDCall { +func (c *MockhostIDCall) Do(f func() p2p.Peer) *MockhostIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *hostIDCall) DoAndReturn(f func() p2p.Peer) *hostIDCall { +func (c *MockhostIDCall) DoAndReturn(f func() p2p.Peer) *MockhostIDCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/genvm/core/mocks/handler.go b/genvm/core/mocks/handler.go index 0ead71d8e0f..1314db2bc88 100644 --- a/genvm/core/mocks/handler.go +++ b/genvm/core/mocks/handler.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/handler.go github.com/spacemeshos/go-spacemesh/genvm/core Handler // + // Package mocks is a generated GoMock package. package mocks @@ -48,31 +49,31 @@ func (m *MockHandler) Args(arg0 byte) scale.Type { } // Args indicates an expected call of Args. -func (mr *MockHandlerMockRecorder) Args(arg0 any) *HandlerArgsCall { +func (mr *MockHandlerMockRecorder) Args(arg0 any) *MockHandlerArgsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Args", reflect.TypeOf((*MockHandler)(nil).Args), arg0) - return &HandlerArgsCall{Call: call} + return &MockHandlerArgsCall{Call: call} } -// HandlerArgsCall wrap *gomock.Call -type HandlerArgsCall struct { +// MockHandlerArgsCall wrap *gomock.Call +type MockHandlerArgsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HandlerArgsCall) Return(arg0 scale.Type) *HandlerArgsCall { +func (c *MockHandlerArgsCall) Return(arg0 scale.Type) *MockHandlerArgsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *HandlerArgsCall) Do(f func(byte) scale.Type) *HandlerArgsCall { +func (c *MockHandlerArgsCall) Do(f func(byte) scale.Type) *MockHandlerArgsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HandlerArgsCall) DoAndReturn(f func(byte) scale.Type) *HandlerArgsCall { +func (c *MockHandlerArgsCall) DoAndReturn(f func(byte) scale.Type) *MockHandlerArgsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -86,31 +87,31 @@ func (m *MockHandler) Exec(arg0 core.Host, arg1 byte, arg2 scale.Encodable) erro } // Exec indicates an expected call of Exec. -func (mr *MockHandlerMockRecorder) Exec(arg0, arg1, arg2 any) *HandlerExecCall { +func (mr *MockHandlerMockRecorder) Exec(arg0, arg1, arg2 any) *MockHandlerExecCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockHandler)(nil).Exec), arg0, arg1, arg2) - return &HandlerExecCall{Call: call} + return &MockHandlerExecCall{Call: call} } -// HandlerExecCall wrap *gomock.Call -type HandlerExecCall struct { +// MockHandlerExecCall wrap *gomock.Call +type MockHandlerExecCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HandlerExecCall) Return(arg0 error) *HandlerExecCall { +func (c *MockHandlerExecCall) Return(arg0 error) *MockHandlerExecCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *HandlerExecCall) Do(f func(core.Host, byte, scale.Encodable) error) *HandlerExecCall { +func (c *MockHandlerExecCall) Do(f func(core.Host, byte, scale.Encodable) error) *MockHandlerExecCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HandlerExecCall) DoAndReturn(f func(core.Host, byte, scale.Encodable) error) *HandlerExecCall { +func (c *MockHandlerExecCall) DoAndReturn(f func(core.Host, byte, scale.Encodable) error) *MockHandlerExecCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -125,31 +126,31 @@ func (m *MockHandler) Load(arg0 []byte) (core.Template, error) { } // Load indicates an expected call of Load. -func (mr *MockHandlerMockRecorder) Load(arg0 any) *HandlerLoadCall { +func (mr *MockHandlerMockRecorder) Load(arg0 any) *MockHandlerLoadCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Load", reflect.TypeOf((*MockHandler)(nil).Load), arg0) - return &HandlerLoadCall{Call: call} + return &MockHandlerLoadCall{Call: call} } -// HandlerLoadCall wrap *gomock.Call -type HandlerLoadCall struct { +// MockHandlerLoadCall wrap *gomock.Call +type MockHandlerLoadCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HandlerLoadCall) Return(arg0 core.Template, arg1 error) *HandlerLoadCall { +func (c *MockHandlerLoadCall) Return(arg0 core.Template, arg1 error) *MockHandlerLoadCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *HandlerLoadCall) Do(f func([]byte) (core.Template, error)) *HandlerLoadCall { +func (c *MockHandlerLoadCall) Do(f func([]byte) (core.Template, error)) *MockHandlerLoadCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HandlerLoadCall) DoAndReturn(f func([]byte) (core.Template, error)) *HandlerLoadCall { +func (c *MockHandlerLoadCall) DoAndReturn(f func([]byte) (core.Template, error)) *MockHandlerLoadCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -164,31 +165,31 @@ func (m *MockHandler) New(arg0 any) (core.Template, error) { } // New indicates an expected call of New. -func (mr *MockHandlerMockRecorder) New(arg0 any) *HandlerNewCall { +func (mr *MockHandlerMockRecorder) New(arg0 any) *MockHandlerNewCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockHandler)(nil).New), arg0) - return &HandlerNewCall{Call: call} + return &MockHandlerNewCall{Call: call} } -// HandlerNewCall wrap *gomock.Call -type HandlerNewCall struct { +// MockHandlerNewCall wrap *gomock.Call +type MockHandlerNewCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HandlerNewCall) Return(arg0 core.Template, arg1 error) *HandlerNewCall { +func (c *MockHandlerNewCall) Return(arg0 core.Template, arg1 error) *MockHandlerNewCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *HandlerNewCall) Do(f func(any) (core.Template, error)) *HandlerNewCall { +func (c *MockHandlerNewCall) Do(f func(any) (core.Template, error)) *MockHandlerNewCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HandlerNewCall) DoAndReturn(f func(any) (core.Template, error)) *HandlerNewCall { +func (c *MockHandlerNewCall) DoAndReturn(f func(any) (core.Template, error)) *MockHandlerNewCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -203,31 +204,31 @@ func (m *MockHandler) Parse(arg0 core.Host, arg1 byte, arg2 *scale.Decoder) (cor } // Parse indicates an expected call of Parse. -func (mr *MockHandlerMockRecorder) Parse(arg0, arg1, arg2 any) *HandlerParseCall { +func (mr *MockHandlerMockRecorder) Parse(arg0, arg1, arg2 any) *MockHandlerParseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parse", reflect.TypeOf((*MockHandler)(nil).Parse), arg0, arg1, arg2) - return &HandlerParseCall{Call: call} + return &MockHandlerParseCall{Call: call} } -// HandlerParseCall wrap *gomock.Call -type HandlerParseCall struct { +// MockHandlerParseCall wrap *gomock.Call +type MockHandlerParseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HandlerParseCall) Return(arg0 core.ParseOutput, arg1 error) *HandlerParseCall { +func (c *MockHandlerParseCall) Return(arg0 core.ParseOutput, arg1 error) *MockHandlerParseCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *HandlerParseCall) Do(f func(core.Host, byte, *scale.Decoder) (core.ParseOutput, error)) *HandlerParseCall { +func (c *MockHandlerParseCall) Do(f func(core.Host, byte, *scale.Decoder) (core.ParseOutput, error)) *MockHandlerParseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HandlerParseCall) DoAndReturn(f func(core.Host, byte, *scale.Decoder) (core.ParseOutput, error)) *HandlerParseCall { +func (c *MockHandlerParseCall) DoAndReturn(f func(core.Host, byte, *scale.Decoder) (core.ParseOutput, error)) *MockHandlerParseCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/genvm/core/mocks/template.go b/genvm/core/mocks/template.go index 35f6e4f46d3..cf002a39b8e 100644 --- a/genvm/core/mocks/template.go +++ b/genvm/core/mocks/template.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/template.go github.com/spacemeshos/go-spacemesh/genvm/core Template // + // Package mocks is a generated GoMock package. package mocks @@ -48,31 +49,31 @@ func (m *MockTemplate) BaseGas(arg0 byte) uint64 { } // BaseGas indicates an expected call of BaseGas. -func (mr *MockTemplateMockRecorder) BaseGas(arg0 any) *TemplateBaseGasCall { +func (mr *MockTemplateMockRecorder) BaseGas(arg0 any) *MockTemplateBaseGasCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BaseGas", reflect.TypeOf((*MockTemplate)(nil).BaseGas), arg0) - return &TemplateBaseGasCall{Call: call} + return &MockTemplateBaseGasCall{Call: call} } -// TemplateBaseGasCall wrap *gomock.Call -type TemplateBaseGasCall struct { +// MockTemplateBaseGasCall wrap *gomock.Call +type MockTemplateBaseGasCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TemplateBaseGasCall) Return(arg0 uint64) *TemplateBaseGasCall { +func (c *MockTemplateBaseGasCall) Return(arg0 uint64) *MockTemplateBaseGasCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TemplateBaseGasCall) Do(f func(byte) uint64) *TemplateBaseGasCall { +func (c *MockTemplateBaseGasCall) Do(f func(byte) uint64) *MockTemplateBaseGasCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TemplateBaseGasCall) DoAndReturn(f func(byte) uint64) *TemplateBaseGasCall { +func (c *MockTemplateBaseGasCall) DoAndReturn(f func(byte) uint64) *MockTemplateBaseGasCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -87,31 +88,31 @@ func (m *MockTemplate) EncodeScale(arg0 *scale.Encoder) (int, error) { } // EncodeScale indicates an expected call of EncodeScale. -func (mr *MockTemplateMockRecorder) EncodeScale(arg0 any) *TemplateEncodeScaleCall { +func (mr *MockTemplateMockRecorder) EncodeScale(arg0 any) *MockTemplateEncodeScaleCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncodeScale", reflect.TypeOf((*MockTemplate)(nil).EncodeScale), arg0) - return &TemplateEncodeScaleCall{Call: call} + return &MockTemplateEncodeScaleCall{Call: call} } -// TemplateEncodeScaleCall wrap *gomock.Call -type TemplateEncodeScaleCall struct { +// MockTemplateEncodeScaleCall wrap *gomock.Call +type MockTemplateEncodeScaleCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TemplateEncodeScaleCall) Return(arg0 int, arg1 error) *TemplateEncodeScaleCall { +func (c *MockTemplateEncodeScaleCall) Return(arg0 int, arg1 error) *MockTemplateEncodeScaleCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TemplateEncodeScaleCall) Do(f func(*scale.Encoder) (int, error)) *TemplateEncodeScaleCall { +func (c *MockTemplateEncodeScaleCall) Do(f func(*scale.Encoder) (int, error)) *MockTemplateEncodeScaleCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TemplateEncodeScaleCall) DoAndReturn(f func(*scale.Encoder) (int, error)) *TemplateEncodeScaleCall { +func (c *MockTemplateEncodeScaleCall) DoAndReturn(f func(*scale.Encoder) (int, error)) *MockTemplateEncodeScaleCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -125,31 +126,31 @@ func (m *MockTemplate) ExecGas(arg0 byte) uint64 { } // ExecGas indicates an expected call of ExecGas. -func (mr *MockTemplateMockRecorder) ExecGas(arg0 any) *TemplateExecGasCall { +func (mr *MockTemplateMockRecorder) ExecGas(arg0 any) *MockTemplateExecGasCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecGas", reflect.TypeOf((*MockTemplate)(nil).ExecGas), arg0) - return &TemplateExecGasCall{Call: call} + return &MockTemplateExecGasCall{Call: call} } -// TemplateExecGasCall wrap *gomock.Call -type TemplateExecGasCall struct { +// MockTemplateExecGasCall wrap *gomock.Call +type MockTemplateExecGasCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TemplateExecGasCall) Return(arg0 uint64) *TemplateExecGasCall { +func (c *MockTemplateExecGasCall) Return(arg0 uint64) *MockTemplateExecGasCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TemplateExecGasCall) Do(f func(byte) uint64) *TemplateExecGasCall { +func (c *MockTemplateExecGasCall) Do(f func(byte) uint64) *MockTemplateExecGasCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TemplateExecGasCall) DoAndReturn(f func(byte) uint64) *TemplateExecGasCall { +func (c *MockTemplateExecGasCall) DoAndReturn(f func(byte) uint64) *MockTemplateExecGasCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -163,31 +164,31 @@ func (m *MockTemplate) LoadGas() uint64 { } // LoadGas indicates an expected call of LoadGas. -func (mr *MockTemplateMockRecorder) LoadGas() *TemplateLoadGasCall { +func (mr *MockTemplateMockRecorder) LoadGas() *MockTemplateLoadGasCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadGas", reflect.TypeOf((*MockTemplate)(nil).LoadGas)) - return &TemplateLoadGasCall{Call: call} + return &MockTemplateLoadGasCall{Call: call} } -// TemplateLoadGasCall wrap *gomock.Call -type TemplateLoadGasCall struct { +// MockTemplateLoadGasCall wrap *gomock.Call +type MockTemplateLoadGasCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TemplateLoadGasCall) Return(arg0 uint64) *TemplateLoadGasCall { +func (c *MockTemplateLoadGasCall) Return(arg0 uint64) *MockTemplateLoadGasCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TemplateLoadGasCall) Do(f func() uint64) *TemplateLoadGasCall { +func (c *MockTemplateLoadGasCall) Do(f func() uint64) *MockTemplateLoadGasCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TemplateLoadGasCall) DoAndReturn(f func() uint64) *TemplateLoadGasCall { +func (c *MockTemplateLoadGasCall) DoAndReturn(f func() uint64) *MockTemplateLoadGasCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -202,31 +203,31 @@ func (m *MockTemplate) MaxSpend(arg0 byte, arg1 any) (uint64, error) { } // MaxSpend indicates an expected call of MaxSpend. -func (mr *MockTemplateMockRecorder) MaxSpend(arg0, arg1 any) *TemplateMaxSpendCall { +func (mr *MockTemplateMockRecorder) MaxSpend(arg0, arg1 any) *MockTemplateMaxSpendCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxSpend", reflect.TypeOf((*MockTemplate)(nil).MaxSpend), arg0, arg1) - return &TemplateMaxSpendCall{Call: call} + return &MockTemplateMaxSpendCall{Call: call} } -// TemplateMaxSpendCall wrap *gomock.Call -type TemplateMaxSpendCall struct { +// MockTemplateMaxSpendCall wrap *gomock.Call +type MockTemplateMaxSpendCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TemplateMaxSpendCall) Return(arg0 uint64, arg1 error) *TemplateMaxSpendCall { +func (c *MockTemplateMaxSpendCall) Return(arg0 uint64, arg1 error) *MockTemplateMaxSpendCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TemplateMaxSpendCall) Do(f func(byte, any) (uint64, error)) *TemplateMaxSpendCall { +func (c *MockTemplateMaxSpendCall) Do(f func(byte, any) (uint64, error)) *MockTemplateMaxSpendCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TemplateMaxSpendCall) DoAndReturn(f func(byte, any) (uint64, error)) *TemplateMaxSpendCall { +func (c *MockTemplateMaxSpendCall) DoAndReturn(f func(byte, any) (uint64, error)) *MockTemplateMaxSpendCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -240,31 +241,31 @@ func (m *MockTemplate) Verify(arg0 core.Host, arg1 []byte, arg2 *scale.Decoder) } // Verify indicates an expected call of Verify. -func (mr *MockTemplateMockRecorder) Verify(arg0, arg1, arg2 any) *TemplateVerifyCall { +func (mr *MockTemplateMockRecorder) Verify(arg0, arg1, arg2 any) *MockTemplateVerifyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockTemplate)(nil).Verify), arg0, arg1, arg2) - return &TemplateVerifyCall{Call: call} + return &MockTemplateVerifyCall{Call: call} } -// TemplateVerifyCall wrap *gomock.Call -type TemplateVerifyCall struct { +// MockTemplateVerifyCall wrap *gomock.Call +type MockTemplateVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TemplateVerifyCall) Return(arg0 bool) *TemplateVerifyCall { +func (c *MockTemplateVerifyCall) Return(arg0 bool) *MockTemplateVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TemplateVerifyCall) Do(f func(core.Host, []byte, *scale.Decoder) bool) *TemplateVerifyCall { +func (c *MockTemplateVerifyCall) Do(f func(core.Host, []byte, *scale.Decoder) bool) *MockTemplateVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TemplateVerifyCall) DoAndReturn(f func(core.Host, []byte, *scale.Decoder) bool) *TemplateVerifyCall { +func (c *MockTemplateVerifyCall) DoAndReturn(f func(core.Host, []byte, *scale.Decoder) bool) *MockTemplateVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/genvm/core/mocks/updater.go b/genvm/core/mocks/updater.go index ba04f7f1891..f832af8f32a 100644 --- a/genvm/core/mocks/updater.go +++ b/genvm/core/mocks/updater.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/updater.go github.com/spacemeshos/go-spacemesh/genvm/core AccountUpdater // + // Package mocks is a generated GoMock package. package mocks @@ -47,31 +48,31 @@ func (m *MockAccountUpdater) Update(arg0 types.Account) error { } // Update indicates an expected call of Update. -func (mr *MockAccountUpdaterMockRecorder) Update(arg0 any) *AccountUpdaterUpdateCall { +func (mr *MockAccountUpdaterMockRecorder) Update(arg0 any) *MockAccountUpdaterUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockAccountUpdater)(nil).Update), arg0) - return &AccountUpdaterUpdateCall{Call: call} + return &MockAccountUpdaterUpdateCall{Call: call} } -// AccountUpdaterUpdateCall wrap *gomock.Call -type AccountUpdaterUpdateCall struct { +// MockAccountUpdaterUpdateCall wrap *gomock.Call +type MockAccountUpdaterUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *AccountUpdaterUpdateCall) Return(arg0 error) *AccountUpdaterUpdateCall { +func (c *MockAccountUpdaterUpdateCall) Return(arg0 error) *MockAccountUpdaterUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *AccountUpdaterUpdateCall) Do(f func(types.Account) error) *AccountUpdaterUpdateCall { +func (c *MockAccountUpdaterUpdateCall) Do(f func(types.Account) error) *MockAccountUpdaterUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *AccountUpdaterUpdateCall) DoAndReturn(f func(types.Account) error) *AccountUpdaterUpdateCall { +func (c *MockAccountUpdaterUpdateCall) DoAndReturn(f func(types.Account) error) *MockAccountUpdaterUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/hare3/eligibility/mocks.go b/hare3/eligibility/mocks.go index 2758e532819..e99c29ac08a 100644 --- a/hare3/eligibility/mocks.go +++ b/hare3/eligibility/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=eligibility -destination=./mocks.go -source=./interface.go // + // Package eligibility is a generated GoMock package. package eligibility @@ -49,31 +50,31 @@ func (m *MockactiveSetCache) Add(key types.EpochID, value *cachedActiveSet) bool } // Add indicates an expected call of Add. -func (mr *MockactiveSetCacheMockRecorder) Add(key, value any) *activeSetCacheAddCall { +func (mr *MockactiveSetCacheMockRecorder) Add(key, value any) *MockactiveSetCacheAddCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockactiveSetCache)(nil).Add), key, value) - return &activeSetCacheAddCall{Call: call} + return &MockactiveSetCacheAddCall{Call: call} } -// activeSetCacheAddCall wrap *gomock.Call -type activeSetCacheAddCall struct { +// MockactiveSetCacheAddCall wrap *gomock.Call +type MockactiveSetCacheAddCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *activeSetCacheAddCall) Return(evicted bool) *activeSetCacheAddCall { +func (c *MockactiveSetCacheAddCall) Return(evicted bool) *MockactiveSetCacheAddCall { c.Call = c.Call.Return(evicted) return c } // Do rewrite *gomock.Call.Do -func (c *activeSetCacheAddCall) Do(f func(types.EpochID, *cachedActiveSet) bool) *activeSetCacheAddCall { +func (c *MockactiveSetCacheAddCall) Do(f func(types.EpochID, *cachedActiveSet) bool) *MockactiveSetCacheAddCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *activeSetCacheAddCall) DoAndReturn(f func(types.EpochID, *cachedActiveSet) bool) *activeSetCacheAddCall { +func (c *MockactiveSetCacheAddCall) DoAndReturn(f func(types.EpochID, *cachedActiveSet) bool) *MockactiveSetCacheAddCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -88,31 +89,31 @@ func (m *MockactiveSetCache) Get(key types.EpochID) (*cachedActiveSet, bool) { } // Get indicates an expected call of Get. -func (mr *MockactiveSetCacheMockRecorder) Get(key any) *activeSetCacheGetCall { +func (mr *MockactiveSetCacheMockRecorder) Get(key any) *MockactiveSetCacheGetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockactiveSetCache)(nil).Get), key) - return &activeSetCacheGetCall{Call: call} + return &MockactiveSetCacheGetCall{Call: call} } -// activeSetCacheGetCall wrap *gomock.Call -type activeSetCacheGetCall struct { +// MockactiveSetCacheGetCall wrap *gomock.Call +type MockactiveSetCacheGetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *activeSetCacheGetCall) Return(value *cachedActiveSet, ok bool) *activeSetCacheGetCall { +func (c *MockactiveSetCacheGetCall) Return(value *cachedActiveSet, ok bool) *MockactiveSetCacheGetCall { c.Call = c.Call.Return(value, ok) return c } // Do rewrite *gomock.Call.Do -func (c *activeSetCacheGetCall) Do(f func(types.EpochID) (*cachedActiveSet, bool)) *activeSetCacheGetCall { +func (c *MockactiveSetCacheGetCall) Do(f func(types.EpochID) (*cachedActiveSet, bool)) *MockactiveSetCacheGetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *activeSetCacheGetCall) DoAndReturn(f func(types.EpochID) (*cachedActiveSet, bool)) *activeSetCacheGetCall { +func (c *MockactiveSetCacheGetCall) DoAndReturn(f func(types.EpochID) (*cachedActiveSet, bool)) *MockactiveSetCacheGetCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -149,31 +150,31 @@ func (m *MockvrfVerifier) Verify(nodeID types.NodeID, msg []byte, sig types.VrfS } // Verify indicates an expected call of Verify. -func (mr *MockvrfVerifierMockRecorder) Verify(nodeID, msg, sig any) *vrfVerifierVerifyCall { +func (mr *MockvrfVerifierMockRecorder) Verify(nodeID, msg, sig any) *MockvrfVerifierVerifyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockvrfVerifier)(nil).Verify), nodeID, msg, sig) - return &vrfVerifierVerifyCall{Call: call} + return &MockvrfVerifierVerifyCall{Call: call} } -// vrfVerifierVerifyCall wrap *gomock.Call -type vrfVerifierVerifyCall struct { +// MockvrfVerifierVerifyCall wrap *gomock.Call +type MockvrfVerifierVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vrfVerifierVerifyCall) Return(arg0 bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) Return(arg0 bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -211,31 +212,31 @@ func (m *MockRolacle) CalcEligibility(arg0 context.Context, arg1 types.LayerID, } // CalcEligibility indicates an expected call of CalcEligibility. -func (mr *MockRolacleMockRecorder) CalcEligibility(arg0, arg1, arg2, arg3, arg4, arg5 any) *RolacleCalcEligibilityCall { +func (mr *MockRolacleMockRecorder) CalcEligibility(arg0, arg1, arg2, arg3, arg4, arg5 any) *MockRolacleCalcEligibilityCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalcEligibility", reflect.TypeOf((*MockRolacle)(nil).CalcEligibility), arg0, arg1, arg2, arg3, arg4, arg5) - return &RolacleCalcEligibilityCall{Call: call} + return &MockRolacleCalcEligibilityCall{Call: call} } -// RolacleCalcEligibilityCall wrap *gomock.Call -type RolacleCalcEligibilityCall struct { +// MockRolacleCalcEligibilityCall wrap *gomock.Call +type MockRolacleCalcEligibilityCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *RolacleCalcEligibilityCall) Return(arg0 uint16, arg1 error) *RolacleCalcEligibilityCall { +func (c *MockRolacleCalcEligibilityCall) Return(arg0 uint16, arg1 error) *MockRolacleCalcEligibilityCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *RolacleCalcEligibilityCall) Do(f func(context.Context, types.LayerID, uint32, int, types.NodeID, types.VrfSignature) (uint16, error)) *RolacleCalcEligibilityCall { +func (c *MockRolacleCalcEligibilityCall) Do(f func(context.Context, types.LayerID, uint32, int, types.NodeID, types.VrfSignature) (uint16, error)) *MockRolacleCalcEligibilityCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *RolacleCalcEligibilityCall) DoAndReturn(f func(context.Context, types.LayerID, uint32, int, types.NodeID, types.VrfSignature) (uint16, error)) *RolacleCalcEligibilityCall { +func (c *MockRolacleCalcEligibilityCall) DoAndReturn(f func(context.Context, types.LayerID, uint32, int, types.NodeID, types.VrfSignature) (uint16, error)) *MockRolacleCalcEligibilityCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -250,31 +251,31 @@ func (m *MockRolacle) Proof(arg0 context.Context, arg1 *signing.VRFSigner, arg2 } // Proof indicates an expected call of Proof. -func (mr *MockRolacleMockRecorder) Proof(arg0, arg1, arg2, arg3 any) *RolacleProofCall { +func (mr *MockRolacleMockRecorder) Proof(arg0, arg1, arg2, arg3 any) *MockRolacleProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proof", reflect.TypeOf((*MockRolacle)(nil).Proof), arg0, arg1, arg2, arg3) - return &RolacleProofCall{Call: call} + return &MockRolacleProofCall{Call: call} } -// RolacleProofCall wrap *gomock.Call -type RolacleProofCall struct { +// MockRolacleProofCall wrap *gomock.Call +type MockRolacleProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *RolacleProofCall) Return(arg0 types.VrfSignature, arg1 error) *RolacleProofCall { +func (c *MockRolacleProofCall) Return(arg0 types.VrfSignature, arg1 error) *MockRolacleProofCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *RolacleProofCall) Do(f func(context.Context, *signing.VRFSigner, types.LayerID, uint32) (types.VrfSignature, error)) *RolacleProofCall { +func (c *MockRolacleProofCall) Do(f func(context.Context, *signing.VRFSigner, types.LayerID, uint32) (types.VrfSignature, error)) *MockRolacleProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *RolacleProofCall) DoAndReturn(f func(context.Context, *signing.VRFSigner, types.LayerID, uint32) (types.VrfSignature, error)) *RolacleProofCall { +func (c *MockRolacleProofCall) DoAndReturn(f func(context.Context, *signing.VRFSigner, types.LayerID, uint32) (types.VrfSignature, error)) *MockRolacleProofCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -289,31 +290,31 @@ func (m *MockRolacle) Validate(arg0 context.Context, arg1 types.LayerID, arg2 ui } // Validate indicates an expected call of Validate. -func (mr *MockRolacleMockRecorder) Validate(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *RolacleValidateCall { +func (mr *MockRolacleMockRecorder) Validate(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *MockRolacleValidateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockRolacle)(nil).Validate), arg0, arg1, arg2, arg3, arg4, arg5, arg6) - return &RolacleValidateCall{Call: call} + return &MockRolacleValidateCall{Call: call} } -// RolacleValidateCall wrap *gomock.Call -type RolacleValidateCall struct { +// MockRolacleValidateCall wrap *gomock.Call +type MockRolacleValidateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *RolacleValidateCall) Return(arg0 bool, arg1 error) *RolacleValidateCall { +func (c *MockRolacleValidateCall) Return(arg0 bool, arg1 error) *MockRolacleValidateCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *RolacleValidateCall) Do(f func(context.Context, types.LayerID, uint32, int, types.NodeID, types.VrfSignature, uint16) (bool, error)) *RolacleValidateCall { +func (c *MockRolacleValidateCall) Do(f func(context.Context, types.LayerID, uint32, int, types.NodeID, types.VrfSignature, uint16) (bool, error)) *MockRolacleValidateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *RolacleValidateCall) DoAndReturn(f func(context.Context, types.LayerID, uint32, int, types.NodeID, types.VrfSignature, uint16) (bool, error)) *RolacleValidateCall { +func (c *MockRolacleValidateCall) DoAndReturn(f func(context.Context, types.LayerID, uint32, int, types.NodeID, types.VrfSignature, uint16) (bool, error)) *MockRolacleValidateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/log/log_mock.go b/log/log_mock.go index ff5565cbd9e..a09bc81a2f0 100644 --- a/log/log_mock.go +++ b/log/log_mock.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=log -destination=./log_mock.go -source=./log.go // + // Package log is a generated GoMock package. package log @@ -49,32 +50,32 @@ func (m *MockLogger) Debug(format string, args ...any) { } // Debug indicates an expected call of Debug. -func (mr *MockLoggerMockRecorder) Debug(format any, args ...any) *LoggerDebugCall { +func (mr *MockLoggerMockRecorder) Debug(format any, args ...any) *MockLoggerDebugCall { mr.mock.ctrl.T.Helper() varargs := append([]any{format}, args...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockLogger)(nil).Debug), varargs...) - return &LoggerDebugCall{Call: call} + return &MockLoggerDebugCall{Call: call} } -// LoggerDebugCall wrap *gomock.Call -type LoggerDebugCall struct { +// MockLoggerDebugCall wrap *gomock.Call +type MockLoggerDebugCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *LoggerDebugCall) Return() *LoggerDebugCall { +func (c *MockLoggerDebugCall) Return() *MockLoggerDebugCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *LoggerDebugCall) Do(f func(string, ...any)) *LoggerDebugCall { +func (c *MockLoggerDebugCall) Do(f func(string, ...any)) *MockLoggerDebugCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *LoggerDebugCall) DoAndReturn(f func(string, ...any)) *LoggerDebugCall { +func (c *MockLoggerDebugCall) DoAndReturn(f func(string, ...any)) *MockLoggerDebugCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -90,32 +91,32 @@ func (m *MockLogger) Error(format string, args ...any) { } // Error indicates an expected call of Error. -func (mr *MockLoggerMockRecorder) Error(format any, args ...any) *LoggerErrorCall { +func (mr *MockLoggerMockRecorder) Error(format any, args ...any) *MockLoggerErrorCall { mr.mock.ctrl.T.Helper() varargs := append([]any{format}, args...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Error", reflect.TypeOf((*MockLogger)(nil).Error), varargs...) - return &LoggerErrorCall{Call: call} + return &MockLoggerErrorCall{Call: call} } -// LoggerErrorCall wrap *gomock.Call -type LoggerErrorCall struct { +// MockLoggerErrorCall wrap *gomock.Call +type MockLoggerErrorCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *LoggerErrorCall) Return() *LoggerErrorCall { +func (c *MockLoggerErrorCall) Return() *MockLoggerErrorCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *LoggerErrorCall) Do(f func(string, ...any)) *LoggerErrorCall { +func (c *MockLoggerErrorCall) Do(f func(string, ...any)) *MockLoggerErrorCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *LoggerErrorCall) DoAndReturn(f func(string, ...any)) *LoggerErrorCall { +func (c *MockLoggerErrorCall) DoAndReturn(f func(string, ...any)) *MockLoggerErrorCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,32 +132,32 @@ func (m *MockLogger) Info(format string, args ...any) { } // Info indicates an expected call of Info. -func (mr *MockLoggerMockRecorder) Info(format any, args ...any) *LoggerInfoCall { +func (mr *MockLoggerMockRecorder) Info(format any, args ...any) *MockLoggerInfoCall { mr.mock.ctrl.T.Helper() varargs := append([]any{format}, args...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockLogger)(nil).Info), varargs...) - return &LoggerInfoCall{Call: call} + return &MockLoggerInfoCall{Call: call} } -// LoggerInfoCall wrap *gomock.Call -type LoggerInfoCall struct { +// MockLoggerInfoCall wrap *gomock.Call +type MockLoggerInfoCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *LoggerInfoCall) Return() *LoggerInfoCall { +func (c *MockLoggerInfoCall) Return() *MockLoggerInfoCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *LoggerInfoCall) Do(f func(string, ...any)) *LoggerInfoCall { +func (c *MockLoggerInfoCall) Do(f func(string, ...any)) *MockLoggerInfoCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *LoggerInfoCall) DoAndReturn(f func(string, ...any)) *LoggerInfoCall { +func (c *MockLoggerInfoCall) DoAndReturn(f func(string, ...any)) *MockLoggerInfoCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -172,32 +173,32 @@ func (m *MockLogger) Panic(format string, args ...any) { } // Panic indicates an expected call of Panic. -func (mr *MockLoggerMockRecorder) Panic(format any, args ...any) *LoggerPanicCall { +func (mr *MockLoggerMockRecorder) Panic(format any, args ...any) *MockLoggerPanicCall { mr.mock.ctrl.T.Helper() varargs := append([]any{format}, args...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Panic", reflect.TypeOf((*MockLogger)(nil).Panic), varargs...) - return &LoggerPanicCall{Call: call} + return &MockLoggerPanicCall{Call: call} } -// LoggerPanicCall wrap *gomock.Call -type LoggerPanicCall struct { +// MockLoggerPanicCall wrap *gomock.Call +type MockLoggerPanicCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *LoggerPanicCall) Return() *LoggerPanicCall { +func (c *MockLoggerPanicCall) Return() *MockLoggerPanicCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *LoggerPanicCall) Do(f func(string, ...any)) *LoggerPanicCall { +func (c *MockLoggerPanicCall) Do(f func(string, ...any)) *MockLoggerPanicCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *LoggerPanicCall) DoAndReturn(f func(string, ...any)) *LoggerPanicCall { +func (c *MockLoggerPanicCall) DoAndReturn(f func(string, ...any)) *MockLoggerPanicCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -213,32 +214,32 @@ func (m *MockLogger) Warning(format string, args ...any) { } // Warning indicates an expected call of Warning. -func (mr *MockLoggerMockRecorder) Warning(format any, args ...any) *LoggerWarningCall { +func (mr *MockLoggerMockRecorder) Warning(format any, args ...any) *MockLoggerWarningCall { mr.mock.ctrl.T.Helper() varargs := append([]any{format}, args...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Warning", reflect.TypeOf((*MockLogger)(nil).Warning), varargs...) - return &LoggerWarningCall{Call: call} + return &MockLoggerWarningCall{Call: call} } -// LoggerWarningCall wrap *gomock.Call -type LoggerWarningCall struct { +// MockLoggerWarningCall wrap *gomock.Call +type MockLoggerWarningCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *LoggerWarningCall) Return() *LoggerWarningCall { +func (c *MockLoggerWarningCall) Return() *MockLoggerWarningCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *LoggerWarningCall) Do(f func(string, ...any)) *LoggerWarningCall { +func (c *MockLoggerWarningCall) Do(f func(string, ...any)) *MockLoggerWarningCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *LoggerWarningCall) DoAndReturn(f func(string, ...any)) *LoggerWarningCall { +func (c *MockLoggerWarningCall) DoAndReturn(f func(string, ...any)) *MockLoggerWarningCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -252,31 +253,31 @@ func (m *MockLogger) With() FieldLogger { } // With indicates an expected call of With. -func (mr *MockLoggerMockRecorder) With() *LoggerWithCall { +func (mr *MockLoggerMockRecorder) With() *MockLoggerWithCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MockLogger)(nil).With)) - return &LoggerWithCall{Call: call} + return &MockLoggerWithCall{Call: call} } -// LoggerWithCall wrap *gomock.Call -type LoggerWithCall struct { +// MockLoggerWithCall wrap *gomock.Call +type MockLoggerWithCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *LoggerWithCall) Return(arg0 FieldLogger) *LoggerWithCall { +func (c *MockLoggerWithCall) Return(arg0 FieldLogger) *MockLoggerWithCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *LoggerWithCall) Do(f func() FieldLogger) *LoggerWithCall { +func (c *MockLoggerWithCall) Do(f func() FieldLogger) *MockLoggerWithCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *LoggerWithCall) DoAndReturn(f func() FieldLogger) *LoggerWithCall { +func (c *MockLoggerWithCall) DoAndReturn(f func() FieldLogger) *MockLoggerWithCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -290,31 +291,31 @@ func (m *MockLogger) WithContext(arg0 context.Context) Log { } // WithContext indicates an expected call of WithContext. -func (mr *MockLoggerMockRecorder) WithContext(arg0 any) *LoggerWithContextCall { +func (mr *MockLoggerMockRecorder) WithContext(arg0 any) *MockLoggerWithContextCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithContext", reflect.TypeOf((*MockLogger)(nil).WithContext), arg0) - return &LoggerWithContextCall{Call: call} + return &MockLoggerWithContextCall{Call: call} } -// LoggerWithContextCall wrap *gomock.Call -type LoggerWithContextCall struct { +// MockLoggerWithContextCall wrap *gomock.Call +type MockLoggerWithContextCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *LoggerWithContextCall) Return(arg0 Log) *LoggerWithContextCall { +func (c *MockLoggerWithContextCall) Return(arg0 Log) *MockLoggerWithContextCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *LoggerWithContextCall) Do(f func(context.Context) Log) *LoggerWithContextCall { +func (c *MockLoggerWithContextCall) Do(f func(context.Context) Log) *MockLoggerWithContextCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *LoggerWithContextCall) DoAndReturn(f func(context.Context) Log) *LoggerWithContextCall { +func (c *MockLoggerWithContextCall) DoAndReturn(f func(context.Context) Log) *MockLoggerWithContextCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -328,31 +329,31 @@ func (m *MockLogger) WithName(arg0 string) Log { } // WithName indicates an expected call of WithName. -func (mr *MockLoggerMockRecorder) WithName(arg0 any) *LoggerWithNameCall { +func (mr *MockLoggerMockRecorder) WithName(arg0 any) *MockLoggerWithNameCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithName", reflect.TypeOf((*MockLogger)(nil).WithName), arg0) - return &LoggerWithNameCall{Call: call} + return &MockLoggerWithNameCall{Call: call} } -// LoggerWithNameCall wrap *gomock.Call -type LoggerWithNameCall struct { +// MockLoggerWithNameCall wrap *gomock.Call +type MockLoggerWithNameCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *LoggerWithNameCall) Return(arg0 Log) *LoggerWithNameCall { +func (c *MockLoggerWithNameCall) Return(arg0 Log) *MockLoggerWithNameCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *LoggerWithNameCall) Do(f func(string) Log) *LoggerWithNameCall { +func (c *MockLoggerWithNameCall) Do(f func(string) Log) *MockLoggerWithNameCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *LoggerWithNameCall) DoAndReturn(f func(string) Log) *LoggerWithNameCall { +func (c *MockLoggerWithNameCall) DoAndReturn(f func(string) Log) *MockLoggerWithNameCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/malfeasance/mocks.go b/malfeasance/mocks.go index aa8e02d0378..380eb6d4501 100644 --- a/malfeasance/mocks.go +++ b/malfeasance/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=malfeasance -destination=./mocks.go -source=./interface.go // + // Package malfeasance is a generated GoMock package. package malfeasance @@ -51,31 +52,31 @@ func (m *MockSigVerifier) Verify(arg0 signing.Domain, arg1 types.NodeID, arg2 [] } // Verify indicates an expected call of Verify. -func (mr *MockSigVerifierMockRecorder) Verify(arg0, arg1, arg2, arg3 any) *SigVerifierVerifyCall { +func (mr *MockSigVerifierMockRecorder) Verify(arg0, arg1, arg2, arg3 any) *MockSigVerifierVerifyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockSigVerifier)(nil).Verify), arg0, arg1, arg2, arg3) - return &SigVerifierVerifyCall{Call: call} + return &MockSigVerifierVerifyCall{Call: call} } -// SigVerifierVerifyCall wrap *gomock.Call -type SigVerifierVerifyCall struct { +// MockSigVerifierVerifyCall wrap *gomock.Call +type MockSigVerifierVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SigVerifierVerifyCall) Return(arg0 bool) *SigVerifierVerifyCall { +func (c *MockSigVerifierVerifyCall) Return(arg0 bool) *MockSigVerifierVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SigVerifierVerifyCall) Do(f func(signing.Domain, types.NodeID, []byte, types.EdSignature) bool) *SigVerifierVerifyCall { +func (c *MockSigVerifierVerifyCall) Do(f func(signing.Domain, types.NodeID, []byte, types.EdSignature) bool) *MockSigVerifierVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SigVerifierVerifyCall) DoAndReturn(f func(signing.Domain, types.NodeID, []byte, types.EdSignature) bool) *SigVerifierVerifyCall { +func (c *MockSigVerifierVerifyCall) DoAndReturn(f func(signing.Domain, types.NodeID, []byte, types.EdSignature) bool) *MockSigVerifierVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -110,31 +111,31 @@ func (m *Mocktortoise) OnMalfeasance(arg0 types.NodeID) { } // OnMalfeasance indicates an expected call of OnMalfeasance. -func (mr *MocktortoiseMockRecorder) OnMalfeasance(arg0 any) *tortoiseOnMalfeasanceCall { +func (mr *MocktortoiseMockRecorder) OnMalfeasance(arg0 any) *MocktortoiseOnMalfeasanceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnMalfeasance", reflect.TypeOf((*Mocktortoise)(nil).OnMalfeasance), arg0) - return &tortoiseOnMalfeasanceCall{Call: call} + return &MocktortoiseOnMalfeasanceCall{Call: call} } -// tortoiseOnMalfeasanceCall wrap *gomock.Call -type tortoiseOnMalfeasanceCall struct { +// MocktortoiseOnMalfeasanceCall wrap *gomock.Call +type MocktortoiseOnMalfeasanceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *tortoiseOnMalfeasanceCall) Return() *tortoiseOnMalfeasanceCall { +func (c *MocktortoiseOnMalfeasanceCall) Return() *MocktortoiseOnMalfeasanceCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *tortoiseOnMalfeasanceCall) Do(f func(types.NodeID)) *tortoiseOnMalfeasanceCall { +func (c *MocktortoiseOnMalfeasanceCall) Do(f func(types.NodeID)) *MocktortoiseOnMalfeasanceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *tortoiseOnMalfeasanceCall) DoAndReturn(f func(types.NodeID)) *tortoiseOnMalfeasanceCall { +func (c *MocktortoiseOnMalfeasanceCall) DoAndReturn(f func(types.NodeID)) *MocktortoiseOnMalfeasanceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -175,32 +176,32 @@ func (m_2 *MockpostVerifier) Verify(ctx context.Context, p *shared.Proof, m *sha } // Verify indicates an expected call of Verify. -func (mr *MockpostVerifierMockRecorder) Verify(ctx, p, m any, opts ...any) *postVerifierVerifyCall { +func (mr *MockpostVerifierMockRecorder) Verify(ctx, p, m any, opts ...any) *MockpostVerifierVerifyCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, p, m}, opts...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockpostVerifier)(nil).Verify), varargs...) - return &postVerifierVerifyCall{Call: call} + return &MockpostVerifierVerifyCall{Call: call} } -// postVerifierVerifyCall wrap *gomock.Call -type postVerifierVerifyCall struct { +// MockpostVerifierVerifyCall wrap *gomock.Call +type MockpostVerifierVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *postVerifierVerifyCall) Return(arg0 error) *postVerifierVerifyCall { +func (c *MockpostVerifierVerifyCall) Return(arg0 error) *MockpostVerifierVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *postVerifierVerifyCall) Do(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *postVerifierVerifyCall { +func (c *MockpostVerifierVerifyCall) Do(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *MockpostVerifierVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *postVerifierVerifyCall) DoAndReturn(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *postVerifierVerifyCall { +func (c *MockpostVerifierVerifyCall) DoAndReturn(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *MockpostVerifierVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/mesh/mocks/mocks.go b/mesh/mocks/mocks.go index 44fd6e6d441..c232ac2ce04 100644 --- a/mesh/mocks/mocks.go +++ b/mesh/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./interface.go // + // Package mocks is a generated GoMock package. package mocks @@ -49,31 +50,31 @@ func (m *MockconservativeState) LinkTXsWithBlock(arg0 types.LayerID, arg1 types. } // LinkTXsWithBlock indicates an expected call of LinkTXsWithBlock. -func (mr *MockconservativeStateMockRecorder) LinkTXsWithBlock(arg0, arg1, arg2 any) *conservativeStateLinkTXsWithBlockCall { +func (mr *MockconservativeStateMockRecorder) LinkTXsWithBlock(arg0, arg1, arg2 any) *MockconservativeStateLinkTXsWithBlockCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkTXsWithBlock", reflect.TypeOf((*MockconservativeState)(nil).LinkTXsWithBlock), arg0, arg1, arg2) - return &conservativeStateLinkTXsWithBlockCall{Call: call} + return &MockconservativeStateLinkTXsWithBlockCall{Call: call} } -// conservativeStateLinkTXsWithBlockCall wrap *gomock.Call -type conservativeStateLinkTXsWithBlockCall struct { +// MockconservativeStateLinkTXsWithBlockCall wrap *gomock.Call +type MockconservativeStateLinkTXsWithBlockCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateLinkTXsWithBlockCall) Return(arg0 error) *conservativeStateLinkTXsWithBlockCall { +func (c *MockconservativeStateLinkTXsWithBlockCall) Return(arg0 error) *MockconservativeStateLinkTXsWithBlockCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateLinkTXsWithBlockCall) Do(f func(types.LayerID, types.BlockID, []types.TransactionID) error) *conservativeStateLinkTXsWithBlockCall { +func (c *MockconservativeStateLinkTXsWithBlockCall) Do(f func(types.LayerID, types.BlockID, []types.TransactionID) error) *MockconservativeStateLinkTXsWithBlockCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateLinkTXsWithBlockCall) DoAndReturn(f func(types.LayerID, types.BlockID, []types.TransactionID) error) *conservativeStateLinkTXsWithBlockCall { +func (c *MockconservativeStateLinkTXsWithBlockCall) DoAndReturn(f func(types.LayerID, types.BlockID, []types.TransactionID) error) *MockconservativeStateLinkTXsWithBlockCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -87,31 +88,31 @@ func (m *MockconservativeState) LinkTXsWithProposal(arg0 types.LayerID, arg1 typ } // LinkTXsWithProposal indicates an expected call of LinkTXsWithProposal. -func (mr *MockconservativeStateMockRecorder) LinkTXsWithProposal(arg0, arg1, arg2 any) *conservativeStateLinkTXsWithProposalCall { +func (mr *MockconservativeStateMockRecorder) LinkTXsWithProposal(arg0, arg1, arg2 any) *MockconservativeStateLinkTXsWithProposalCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkTXsWithProposal", reflect.TypeOf((*MockconservativeState)(nil).LinkTXsWithProposal), arg0, arg1, arg2) - return &conservativeStateLinkTXsWithProposalCall{Call: call} + return &MockconservativeStateLinkTXsWithProposalCall{Call: call} } -// conservativeStateLinkTXsWithProposalCall wrap *gomock.Call -type conservativeStateLinkTXsWithProposalCall struct { +// MockconservativeStateLinkTXsWithProposalCall wrap *gomock.Call +type MockconservativeStateLinkTXsWithProposalCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateLinkTXsWithProposalCall) Return(arg0 error) *conservativeStateLinkTXsWithProposalCall { +func (c *MockconservativeStateLinkTXsWithProposalCall) Return(arg0 error) *MockconservativeStateLinkTXsWithProposalCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateLinkTXsWithProposalCall) Do(f func(types.LayerID, types.ProposalID, []types.TransactionID) error) *conservativeStateLinkTXsWithProposalCall { +func (c *MockconservativeStateLinkTXsWithProposalCall) Do(f func(types.LayerID, types.ProposalID, []types.TransactionID) error) *MockconservativeStateLinkTXsWithProposalCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateLinkTXsWithProposalCall) DoAndReturn(f func(types.LayerID, types.ProposalID, []types.TransactionID) error) *conservativeStateLinkTXsWithProposalCall { +func (c *MockconservativeStateLinkTXsWithProposalCall) DoAndReturn(f func(types.LayerID, types.ProposalID, []types.TransactionID) error) *MockconservativeStateLinkTXsWithProposalCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -125,31 +126,31 @@ func (m *MockconservativeState) RevertCache(arg0 types.LayerID) error { } // RevertCache indicates an expected call of RevertCache. -func (mr *MockconservativeStateMockRecorder) RevertCache(arg0 any) *conservativeStateRevertCacheCall { +func (mr *MockconservativeStateMockRecorder) RevertCache(arg0 any) *MockconservativeStateRevertCacheCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevertCache", reflect.TypeOf((*MockconservativeState)(nil).RevertCache), arg0) - return &conservativeStateRevertCacheCall{Call: call} + return &MockconservativeStateRevertCacheCall{Call: call} } -// conservativeStateRevertCacheCall wrap *gomock.Call -type conservativeStateRevertCacheCall struct { +// MockconservativeStateRevertCacheCall wrap *gomock.Call +type MockconservativeStateRevertCacheCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateRevertCacheCall) Return(arg0 error) *conservativeStateRevertCacheCall { +func (c *MockconservativeStateRevertCacheCall) Return(arg0 error) *MockconservativeStateRevertCacheCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateRevertCacheCall) Do(f func(types.LayerID) error) *conservativeStateRevertCacheCall { +func (c *MockconservativeStateRevertCacheCall) Do(f func(types.LayerID) error) *MockconservativeStateRevertCacheCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateRevertCacheCall) DoAndReturn(f func(types.LayerID) error) *conservativeStateRevertCacheCall { +func (c *MockconservativeStateRevertCacheCall) DoAndReturn(f func(types.LayerID) error) *MockconservativeStateRevertCacheCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -163,31 +164,31 @@ func (m *MockconservativeState) UpdateCache(arg0 context.Context, arg1 types.Lay } // UpdateCache indicates an expected call of UpdateCache. -func (mr *MockconservativeStateMockRecorder) UpdateCache(arg0, arg1, arg2, arg3, arg4 any) *conservativeStateUpdateCacheCall { +func (mr *MockconservativeStateMockRecorder) UpdateCache(arg0, arg1, arg2, arg3, arg4 any) *MockconservativeStateUpdateCacheCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCache", reflect.TypeOf((*MockconservativeState)(nil).UpdateCache), arg0, arg1, arg2, arg3, arg4) - return &conservativeStateUpdateCacheCall{Call: call} + return &MockconservativeStateUpdateCacheCall{Call: call} } -// conservativeStateUpdateCacheCall wrap *gomock.Call -type conservativeStateUpdateCacheCall struct { +// MockconservativeStateUpdateCacheCall wrap *gomock.Call +type MockconservativeStateUpdateCacheCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateUpdateCacheCall) Return(arg0 error) *conservativeStateUpdateCacheCall { +func (c *MockconservativeStateUpdateCacheCall) Return(arg0 error) *MockconservativeStateUpdateCacheCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateUpdateCacheCall) Do(f func(context.Context, types.LayerID, types.BlockID, []types.TransactionWithResult, []types.Transaction) error) *conservativeStateUpdateCacheCall { +func (c *MockconservativeStateUpdateCacheCall) Do(f func(context.Context, types.LayerID, types.BlockID, []types.TransactionWithResult, []types.Transaction) error) *MockconservativeStateUpdateCacheCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateUpdateCacheCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID, []types.TransactionWithResult, []types.Transaction) error) *conservativeStateUpdateCacheCall { +func (c *MockconservativeStateUpdateCacheCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID, []types.TransactionWithResult, []types.Transaction) error) *MockconservativeStateUpdateCacheCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -226,31 +227,31 @@ func (m *MockvmState) Apply(arg0 vm.ApplyContext, arg1 []types.Transaction, arg2 } // Apply indicates an expected call of Apply. -func (mr *MockvmStateMockRecorder) Apply(arg0, arg1, arg2 any) *vmStateApplyCall { +func (mr *MockvmStateMockRecorder) Apply(arg0, arg1, arg2 any) *MockvmStateApplyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockvmState)(nil).Apply), arg0, arg1, arg2) - return &vmStateApplyCall{Call: call} + return &MockvmStateApplyCall{Call: call} } -// vmStateApplyCall wrap *gomock.Call -type vmStateApplyCall struct { +// MockvmStateApplyCall wrap *gomock.Call +type MockvmStateApplyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateApplyCall) Return(arg0 []types.Transaction, arg1 []types.TransactionWithResult, arg2 error) *vmStateApplyCall { +func (c *MockvmStateApplyCall) Return(arg0 []types.Transaction, arg1 []types.TransactionWithResult, arg2 error) *MockvmStateApplyCall { c.Call = c.Call.Return(arg0, arg1, arg2) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateApplyCall) Do(f func(vm.ApplyContext, []types.Transaction, []types.CoinbaseReward) ([]types.Transaction, []types.TransactionWithResult, error)) *vmStateApplyCall { +func (c *MockvmStateApplyCall) Do(f func(vm.ApplyContext, []types.Transaction, []types.CoinbaseReward) ([]types.Transaction, []types.TransactionWithResult, error)) *MockvmStateApplyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateApplyCall) DoAndReturn(f func(vm.ApplyContext, []types.Transaction, []types.CoinbaseReward) ([]types.Transaction, []types.TransactionWithResult, error)) *vmStateApplyCall { +func (c *MockvmStateApplyCall) DoAndReturn(f func(vm.ApplyContext, []types.Transaction, []types.CoinbaseReward) ([]types.Transaction, []types.TransactionWithResult, error)) *MockvmStateApplyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -265,31 +266,31 @@ func (m *MockvmState) GetStateRoot() (types.Hash32, error) { } // GetStateRoot indicates an expected call of GetStateRoot. -func (mr *MockvmStateMockRecorder) GetStateRoot() *vmStateGetStateRootCall { +func (mr *MockvmStateMockRecorder) GetStateRoot() *MockvmStateGetStateRootCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStateRoot", reflect.TypeOf((*MockvmState)(nil).GetStateRoot)) - return &vmStateGetStateRootCall{Call: call} + return &MockvmStateGetStateRootCall{Call: call} } -// vmStateGetStateRootCall wrap *gomock.Call -type vmStateGetStateRootCall struct { +// MockvmStateGetStateRootCall wrap *gomock.Call +type MockvmStateGetStateRootCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateGetStateRootCall) Return(arg0 types.Hash32, arg1 error) *vmStateGetStateRootCall { +func (c *MockvmStateGetStateRootCall) Return(arg0 types.Hash32, arg1 error) *MockvmStateGetStateRootCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateGetStateRootCall) Do(f func() (types.Hash32, error)) *vmStateGetStateRootCall { +func (c *MockvmStateGetStateRootCall) Do(f func() (types.Hash32, error)) *MockvmStateGetStateRootCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateGetStateRootCall) DoAndReturn(f func() (types.Hash32, error)) *vmStateGetStateRootCall { +func (c *MockvmStateGetStateRootCall) DoAndReturn(f func() (types.Hash32, error)) *MockvmStateGetStateRootCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -303,31 +304,31 @@ func (m *MockvmState) Revert(arg0 types.LayerID) error { } // Revert indicates an expected call of Revert. -func (mr *MockvmStateMockRecorder) Revert(arg0 any) *vmStateRevertCall { +func (mr *MockvmStateMockRecorder) Revert(arg0 any) *MockvmStateRevertCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revert", reflect.TypeOf((*MockvmState)(nil).Revert), arg0) - return &vmStateRevertCall{Call: call} + return &MockvmStateRevertCall{Call: call} } -// vmStateRevertCall wrap *gomock.Call -type vmStateRevertCall struct { +// MockvmStateRevertCall wrap *gomock.Call +type MockvmStateRevertCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateRevertCall) Return(arg0 error) *vmStateRevertCall { +func (c *MockvmStateRevertCall) Return(arg0 error) *MockvmStateRevertCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateRevertCall) Do(f func(types.LayerID) error) *vmStateRevertCall { +func (c *MockvmStateRevertCall) Do(f func(types.LayerID) error) *MockvmStateRevertCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateRevertCall) DoAndReturn(f func(types.LayerID) error) *vmStateRevertCall { +func (c *MockvmStateRevertCall) DoAndReturn(f func(types.LayerID) error) *MockvmStateRevertCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -364,31 +365,31 @@ func (m *MocklayerClock) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MocklayerClockMockRecorder) CurrentLayer() *layerClockCurrentLayerCall { +func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer)) - return &layerClockCurrentLayerCall{Call: call} + return &MocklayerClockCurrentLayerCall{Call: call} } -// layerClockCurrentLayerCall wrap *gomock.Call -type layerClockCurrentLayerCall struct { +// MocklayerClockCurrentLayerCall wrap *gomock.Call +type MocklayerClockCurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockCurrentLayerCall) Return(arg0 types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockCurrentLayerCall) Do(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/miner/mocks/mocks.go b/miner/mocks/mocks.go index 672a4a4c505..7af98aab88f 100644 --- a/miner/mocks/mocks.go +++ b/miner/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./proposal_builder.go // + // Package mocks is a generated GoMock package. package mocks @@ -50,31 +51,31 @@ func (m *MockconservativeState) SelectProposalTXs(arg0 types.LayerID, arg1 int) } // SelectProposalTXs indicates an expected call of SelectProposalTXs. -func (mr *MockconservativeStateMockRecorder) SelectProposalTXs(arg0, arg1 any) *conservativeStateSelectProposalTXsCall { +func (mr *MockconservativeStateMockRecorder) SelectProposalTXs(arg0, arg1 any) *MockconservativeStateSelectProposalTXsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectProposalTXs", reflect.TypeOf((*MockconservativeState)(nil).SelectProposalTXs), arg0, arg1) - return &conservativeStateSelectProposalTXsCall{Call: call} + return &MockconservativeStateSelectProposalTXsCall{Call: call} } -// conservativeStateSelectProposalTXsCall wrap *gomock.Call -type conservativeStateSelectProposalTXsCall struct { +// MockconservativeStateSelectProposalTXsCall wrap *gomock.Call +type MockconservativeStateSelectProposalTXsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateSelectProposalTXsCall) Return(arg0 []types.TransactionID) *conservativeStateSelectProposalTXsCall { +func (c *MockconservativeStateSelectProposalTXsCall) Return(arg0 []types.TransactionID) *MockconservativeStateSelectProposalTXsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateSelectProposalTXsCall) Do(f func(types.LayerID, int) []types.TransactionID) *conservativeStateSelectProposalTXsCall { +func (c *MockconservativeStateSelectProposalTXsCall) Do(f func(types.LayerID, int) []types.TransactionID) *MockconservativeStateSelectProposalTXsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateSelectProposalTXsCall) DoAndReturn(f func(types.LayerID, int) []types.TransactionID) *conservativeStateSelectProposalTXsCall { +func (c *MockconservativeStateSelectProposalTXsCall) DoAndReturn(f func(types.LayerID, int) []types.TransactionID) *MockconservativeStateSelectProposalTXsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -116,32 +117,32 @@ func (m *MockvotesEncoder) EncodeVotes(arg0 context.Context, arg1 ...tortoise.En } // EncodeVotes indicates an expected call of EncodeVotes. -func (mr *MockvotesEncoderMockRecorder) EncodeVotes(arg0 any, arg1 ...any) *votesEncoderEncodeVotesCall { +func (mr *MockvotesEncoderMockRecorder) EncodeVotes(arg0 any, arg1 ...any) *MockvotesEncoderEncodeVotesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncodeVotes", reflect.TypeOf((*MockvotesEncoder)(nil).EncodeVotes), varargs...) - return &votesEncoderEncodeVotesCall{Call: call} + return &MockvotesEncoderEncodeVotesCall{Call: call} } -// votesEncoderEncodeVotesCall wrap *gomock.Call -type votesEncoderEncodeVotesCall struct { +// MockvotesEncoderEncodeVotesCall wrap *gomock.Call +type MockvotesEncoderEncodeVotesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *votesEncoderEncodeVotesCall) Return(arg0 *types.Opinion, arg1 error) *votesEncoderEncodeVotesCall { +func (c *MockvotesEncoderEncodeVotesCall) Return(arg0 *types.Opinion, arg1 error) *MockvotesEncoderEncodeVotesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *votesEncoderEncodeVotesCall) Do(f func(context.Context, ...tortoise.EncodeVotesOpts) (*types.Opinion, error)) *votesEncoderEncodeVotesCall { +func (c *MockvotesEncoderEncodeVotesCall) Do(f func(context.Context, ...tortoise.EncodeVotesOpts) (*types.Opinion, error)) *MockvotesEncoderEncodeVotesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *votesEncoderEncodeVotesCall) DoAndReturn(f func(context.Context, ...tortoise.EncodeVotesOpts) (*types.Opinion, error)) *votesEncoderEncodeVotesCall { +func (c *MockvotesEncoderEncodeVotesCall) DoAndReturn(f func(context.Context, ...tortoise.EncodeVotesOpts) (*types.Opinion, error)) *MockvotesEncoderEncodeVotesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -155,31 +156,31 @@ func (m *MockvotesEncoder) LatestComplete() types.LayerID { } // LatestComplete indicates an expected call of LatestComplete. -func (mr *MockvotesEncoderMockRecorder) LatestComplete() *votesEncoderLatestCompleteCall { +func (mr *MockvotesEncoderMockRecorder) LatestComplete() *MockvotesEncoderLatestCompleteCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestComplete", reflect.TypeOf((*MockvotesEncoder)(nil).LatestComplete)) - return &votesEncoderLatestCompleteCall{Call: call} + return &MockvotesEncoderLatestCompleteCall{Call: call} } -// votesEncoderLatestCompleteCall wrap *gomock.Call -type votesEncoderLatestCompleteCall struct { +// MockvotesEncoderLatestCompleteCall wrap *gomock.Call +type MockvotesEncoderLatestCompleteCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *votesEncoderLatestCompleteCall) Return(arg0 types.LayerID) *votesEncoderLatestCompleteCall { +func (c *MockvotesEncoderLatestCompleteCall) Return(arg0 types.LayerID) *MockvotesEncoderLatestCompleteCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *votesEncoderLatestCompleteCall) Do(f func() types.LayerID) *votesEncoderLatestCompleteCall { +func (c *MockvotesEncoderLatestCompleteCall) Do(f func() types.LayerID) *MockvotesEncoderLatestCompleteCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *votesEncoderLatestCompleteCall) DoAndReturn(f func() types.LayerID) *votesEncoderLatestCompleteCall { +func (c *MockvotesEncoderLatestCompleteCall) DoAndReturn(f func() types.LayerID) *MockvotesEncoderLatestCompleteCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -191,31 +192,31 @@ func (m *MockvotesEncoder) TallyVotes(arg0 context.Context, arg1 types.LayerID) } // TallyVotes indicates an expected call of TallyVotes. -func (mr *MockvotesEncoderMockRecorder) TallyVotes(arg0, arg1 any) *votesEncoderTallyVotesCall { +func (mr *MockvotesEncoderMockRecorder) TallyVotes(arg0, arg1 any) *MockvotesEncoderTallyVotesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TallyVotes", reflect.TypeOf((*MockvotesEncoder)(nil).TallyVotes), arg0, arg1) - return &votesEncoderTallyVotesCall{Call: call} + return &MockvotesEncoderTallyVotesCall{Call: call} } -// votesEncoderTallyVotesCall wrap *gomock.Call -type votesEncoderTallyVotesCall struct { +// MockvotesEncoderTallyVotesCall wrap *gomock.Call +type MockvotesEncoderTallyVotesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *votesEncoderTallyVotesCall) Return() *votesEncoderTallyVotesCall { +func (c *MockvotesEncoderTallyVotesCall) Return() *MockvotesEncoderTallyVotesCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *votesEncoderTallyVotesCall) Do(f func(context.Context, types.LayerID)) *votesEncoderTallyVotesCall { +func (c *MockvotesEncoderTallyVotesCall) Do(f func(context.Context, types.LayerID)) *MockvotesEncoderTallyVotesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *votesEncoderTallyVotesCall) DoAndReturn(f func(context.Context, types.LayerID)) *votesEncoderTallyVotesCall { +func (c *MockvotesEncoderTallyVotesCall) DoAndReturn(f func(context.Context, types.LayerID)) *MockvotesEncoderTallyVotesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -253,31 +254,31 @@ func (m *Mockmesh) GetMalfeasanceProof(nodeID types.NodeID) (*types.MalfeasanceP } // GetMalfeasanceProof indicates an expected call of GetMalfeasanceProof. -func (mr *MockmeshMockRecorder) GetMalfeasanceProof(nodeID any) *meshGetMalfeasanceProofCall { +func (mr *MockmeshMockRecorder) GetMalfeasanceProof(nodeID any) *MockmeshGetMalfeasanceProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMalfeasanceProof", reflect.TypeOf((*Mockmesh)(nil).GetMalfeasanceProof), nodeID) - return &meshGetMalfeasanceProofCall{Call: call} + return &MockmeshGetMalfeasanceProofCall{Call: call} } -// meshGetMalfeasanceProofCall wrap *gomock.Call -type meshGetMalfeasanceProofCall struct { +// MockmeshGetMalfeasanceProofCall wrap *gomock.Call +type MockmeshGetMalfeasanceProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshGetMalfeasanceProofCall) Return(arg0 *types.MalfeasanceProof, arg1 error) *meshGetMalfeasanceProofCall { +func (c *MockmeshGetMalfeasanceProofCall) Return(arg0 *types.MalfeasanceProof, arg1 error) *MockmeshGetMalfeasanceProofCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *meshGetMalfeasanceProofCall) Do(f func(types.NodeID) (*types.MalfeasanceProof, error)) *meshGetMalfeasanceProofCall { +func (c *MockmeshGetMalfeasanceProofCall) Do(f func(types.NodeID) (*types.MalfeasanceProof, error)) *MockmeshGetMalfeasanceProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshGetMalfeasanceProofCall) DoAndReturn(f func(types.NodeID) (*types.MalfeasanceProof, error)) *meshGetMalfeasanceProofCall { +func (c *MockmeshGetMalfeasanceProofCall) DoAndReturn(f func(types.NodeID) (*types.MalfeasanceProof, error)) *MockmeshGetMalfeasanceProofCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -314,31 +315,31 @@ func (m *MocklayerClock) AwaitLayer(layerID types.LayerID) <-chan struct{} { } // AwaitLayer indicates an expected call of AwaitLayer. -func (mr *MocklayerClockMockRecorder) AwaitLayer(layerID any) *layerClockAwaitLayerCall { +func (mr *MocklayerClockMockRecorder) AwaitLayer(layerID any) *MocklayerClockAwaitLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AwaitLayer", reflect.TypeOf((*MocklayerClock)(nil).AwaitLayer), layerID) - return &layerClockAwaitLayerCall{Call: call} + return &MocklayerClockAwaitLayerCall{Call: call} } -// layerClockAwaitLayerCall wrap *gomock.Call -type layerClockAwaitLayerCall struct { +// MocklayerClockAwaitLayerCall wrap *gomock.Call +type MocklayerClockAwaitLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *layerClockAwaitLayerCall { +func (c *MocklayerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -352,31 +353,31 @@ func (m *MocklayerClock) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MocklayerClockMockRecorder) CurrentLayer() *layerClockCurrentLayerCall { +func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer)) - return &layerClockCurrentLayerCall{Call: call} + return &MocklayerClockCurrentLayerCall{Call: call} } -// layerClockCurrentLayerCall wrap *gomock.Call -type layerClockCurrentLayerCall struct { +// MocklayerClockCurrentLayerCall wrap *gomock.Call +type MocklayerClockCurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockCurrentLayerCall) Return(arg0 types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockCurrentLayerCall) Do(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -390,31 +391,31 @@ func (m *MocklayerClock) LayerToTime(arg0 types.LayerID) time.Time { } // LayerToTime indicates an expected call of LayerToTime. -func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *layerClockLayerToTimeCall { +func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *MocklayerClockLayerToTimeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LayerToTime", reflect.TypeOf((*MocklayerClock)(nil).LayerToTime), arg0) - return &layerClockLayerToTimeCall{Call: call} + return &MocklayerClockLayerToTimeCall{Call: call} } -// layerClockLayerToTimeCall wrap *gomock.Call -type layerClockLayerToTimeCall struct { +// MocklayerClockLayerToTimeCall wrap *gomock.Call +type MocklayerClockLayerToTimeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockLayerToTimeCall) Return(arg0 time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) Return(arg0 time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/node/node.go b/node/node.go index 7e28f77a4ff..ba97599be27 100644 --- a/node/node.go +++ b/node/node.go @@ -592,7 +592,7 @@ func (app *App) initServices(ctx context.Context) error { app.Config.POST, app.addLogger(NipostValidatorLogger, lg).Zap(), activation.WithVerifyingOpts(app.Config.SMESHING.VerifyingOpts), - activation.PrioritizedIDs(app.edSgn.NodeID()), + activation.WithPrioritizedID(app.edSgn.NodeID()), activation.WithAutoscaling(), ) if err != nil { @@ -919,7 +919,6 @@ func (app *App) initServices(ctx context.Context) error { app.Config.POSTService.NodeAddress = fmt.Sprintf("http://%s:%s", host, port) postSetupMgr, err := activation.NewPostSetupManager( - app.edSgn.NodeID(), app.Config.POST, app.addLogger(PostLogger, lg).Zap(), app.cachedDB, @@ -1276,7 +1275,7 @@ func (app *App) startServices(ctx context.Context) error { if app.Config.SMESHING.CoinbaseAccount == "" { return fmt.Errorf("smeshing enabled but no coinbase account provided") } - if err := app.postSupervisor.Start(app.Config.SMESHING.Opts); err != nil { + if err := app.postSupervisor.Start(app.Config.SMESHING.Opts, app.edSgn.NodeID()); err != nil { return fmt.Errorf("start post service: %w", err) } } else { @@ -1337,10 +1336,12 @@ func (app *App) grpcService(svc grpcserver.Service, lg log.Log) (grpcserver.Serv app.grpcServices[svc] = service return service, nil case grpcserver.Smesher: + nodeID := app.edSgn.NodeID() service := grpcserver.NewSmesherService( app.atxBuilder, app.postSupervisor, app.Config.API.SmesherStreamInterval, + &nodeID, app.Config.SMESHING.Opts, ) app.grpcServices[svc] = service diff --git a/node/node_test.go b/node/node_test.go index fb307bfe23e..558bd60c4ed 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -280,6 +280,9 @@ func TestSpacemeshApp_GrpcService(t *testing.T) { r := require.New(t) app := New(WithLog(logtest.New(t))) + signer, err := app.LoadOrCreateEdSigner() + require.NoError(t, err) + app.edSgn = signer // https://github.com/spacemeshos/go-spacemesh/issues/4653 run := func(c *cobra.Command, args []string) error { app.Config.API.PublicListener = listener @@ -290,7 +293,7 @@ func TestSpacemeshApp_GrpcService(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - _, err := grpc.DialContext( + _, err = grpc.DialContext( ctx, listener, grpc.WithTransportCredentials(insecure.NewCredentials()), @@ -332,6 +335,10 @@ func TestSpacemeshApp_JsonServiceNotRunning(t *testing.T) { r := require.New(t) app := New(WithLog(logtest.New(t))) + signer, err := app.LoadOrCreateEdSigner() + require.NoError(t, err) + app.edSgn = signer // https://github.com/spacemeshos/go-spacemesh/issues/4653 + // Make sure the service is not running by default run := func(c *cobra.Command, args []string) error { app.Config.DataDirParent = t.TempDir() diff --git a/p2p/pubsub/mocks/publisher.go b/p2p/pubsub/mocks/publisher.go index 03e6d60d4b4..57b67d9db68 100644 --- a/p2p/pubsub/mocks/publisher.go +++ b/p2p/pubsub/mocks/publisher.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/publisher.go -source=./pubsub.go // + // Package mocks is a generated GoMock package. package mocks @@ -48,31 +49,31 @@ func (m *MockPublisher) Publish(arg0 context.Context, arg1 string, arg2 []byte) } // Publish indicates an expected call of Publish. -func (mr *MockPublisherMockRecorder) Publish(arg0, arg1, arg2 any) *PublisherPublishCall { +func (mr *MockPublisherMockRecorder) Publish(arg0, arg1, arg2 any) *MockPublisherPublishCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockPublisher)(nil).Publish), arg0, arg1, arg2) - return &PublisherPublishCall{Call: call} + return &MockPublisherPublishCall{Call: call} } -// PublisherPublishCall wrap *gomock.Call -type PublisherPublishCall struct { +// MockPublisherPublishCall wrap *gomock.Call +type MockPublisherPublishCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PublisherPublishCall) Return(arg0 error) *PublisherPublishCall { +func (c *MockPublisherPublishCall) Return(arg0 error) *MockPublisherPublishCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *PublisherPublishCall) Do(f func(context.Context, string, []byte) error) *PublisherPublishCall { +func (c *MockPublisherPublishCall) Do(f func(context.Context, string, []byte) error) *MockPublisherPublishCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PublisherPublishCall) DoAndReturn(f func(context.Context, string, []byte) error) *PublisherPublishCall { +func (c *MockPublisherPublishCall) DoAndReturn(f func(context.Context, string, []byte) error) *MockPublisherPublishCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -111,32 +112,32 @@ func (m *MockSubscriber) Register(arg0 string, arg1 pubsub.GossipHandler, arg2 . } // Register indicates an expected call of Register. -func (mr *MockSubscriberMockRecorder) Register(arg0, arg1 any, arg2 ...any) *SubscriberRegisterCall { +func (mr *MockSubscriberMockRecorder) Register(arg0, arg1 any, arg2 ...any) *MockSubscriberRegisterCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockSubscriber)(nil).Register), varargs...) - return &SubscriberRegisterCall{Call: call} + return &MockSubscriberRegisterCall{Call: call} } -// SubscriberRegisterCall wrap *gomock.Call -type SubscriberRegisterCall struct { +// MockSubscriberRegisterCall wrap *gomock.Call +type MockSubscriberRegisterCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SubscriberRegisterCall) Return() *SubscriberRegisterCall { +func (c *MockSubscriberRegisterCall) Return() *MockSubscriberRegisterCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *SubscriberRegisterCall) Do(f func(string, pubsub.GossipHandler, ...pubsub.ValidatorOpt)) *SubscriberRegisterCall { +func (c *MockSubscriberRegisterCall) Do(f func(string, pubsub.GossipHandler, ...pubsub.ValidatorOpt)) *MockSubscriberRegisterCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SubscriberRegisterCall) DoAndReturn(f func(string, pubsub.GossipHandler, ...pubsub.ValidatorOpt)) *SubscriberRegisterCall { +func (c *MockSubscriberRegisterCall) DoAndReturn(f func(string, pubsub.GossipHandler, ...pubsub.ValidatorOpt)) *MockSubscriberRegisterCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -173,31 +174,31 @@ func (m *MockPublishSubsciber) Publish(arg0 context.Context, arg1 string, arg2 [ } // Publish indicates an expected call of Publish. -func (mr *MockPublishSubsciberMockRecorder) Publish(arg0, arg1, arg2 any) *PublishSubsciberPublishCall { +func (mr *MockPublishSubsciberMockRecorder) Publish(arg0, arg1, arg2 any) *MockPublishSubsciberPublishCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockPublishSubsciber)(nil).Publish), arg0, arg1, arg2) - return &PublishSubsciberPublishCall{Call: call} + return &MockPublishSubsciberPublishCall{Call: call} } -// PublishSubsciberPublishCall wrap *gomock.Call -type PublishSubsciberPublishCall struct { +// MockPublishSubsciberPublishCall wrap *gomock.Call +type MockPublishSubsciberPublishCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PublishSubsciberPublishCall) Return(arg0 error) *PublishSubsciberPublishCall { +func (c *MockPublishSubsciberPublishCall) Return(arg0 error) *MockPublishSubsciberPublishCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *PublishSubsciberPublishCall) Do(f func(context.Context, string, []byte) error) *PublishSubsciberPublishCall { +func (c *MockPublishSubsciberPublishCall) Do(f func(context.Context, string, []byte) error) *MockPublishSubsciberPublishCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PublishSubsciberPublishCall) DoAndReturn(f func(context.Context, string, []byte) error) *PublishSubsciberPublishCall { +func (c *MockPublishSubsciberPublishCall) DoAndReturn(f func(context.Context, string, []byte) error) *MockPublishSubsciberPublishCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -213,32 +214,32 @@ func (m *MockPublishSubsciber) Register(arg0 string, arg1 pubsub.GossipHandler, } // Register indicates an expected call of Register. -func (mr *MockPublishSubsciberMockRecorder) Register(arg0, arg1 any, arg2 ...any) *PublishSubsciberRegisterCall { +func (mr *MockPublishSubsciberMockRecorder) Register(arg0, arg1 any, arg2 ...any) *MockPublishSubsciberRegisterCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockPublishSubsciber)(nil).Register), varargs...) - return &PublishSubsciberRegisterCall{Call: call} + return &MockPublishSubsciberRegisterCall{Call: call} } -// PublishSubsciberRegisterCall wrap *gomock.Call -type PublishSubsciberRegisterCall struct { +// MockPublishSubsciberRegisterCall wrap *gomock.Call +type MockPublishSubsciberRegisterCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PublishSubsciberRegisterCall) Return() *PublishSubsciberRegisterCall { +func (c *MockPublishSubsciberRegisterCall) Return() *MockPublishSubsciberRegisterCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *PublishSubsciberRegisterCall) Do(f func(string, pubsub.GossipHandler, ...pubsub.ValidatorOpt)) *PublishSubsciberRegisterCall { +func (c *MockPublishSubsciberRegisterCall) Do(f func(string, pubsub.GossipHandler, ...pubsub.ValidatorOpt)) *MockPublishSubsciberRegisterCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PublishSubsciberRegisterCall) DoAndReturn(f func(string, pubsub.GossipHandler, ...pubsub.ValidatorOpt)) *PublishSubsciberRegisterCall { +func (c *MockPublishSubsciberRegisterCall) DoAndReturn(f func(string, pubsub.GossipHandler, ...pubsub.ValidatorOpt)) *MockPublishSubsciberRegisterCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/p2p/server/mocks/mocks.go b/p2p/server/mocks/mocks.go index 7e496f27aaa..3da69c74b84 100644 --- a/p2p/server/mocks/mocks.go +++ b/p2p/server/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./interface.go // + // Package mocks is a generated GoMock package. package mocks @@ -52,31 +53,31 @@ func (m *MockHost) ConnManager() connmgr.ConnManager { } // ConnManager indicates an expected call of ConnManager. -func (mr *MockHostMockRecorder) ConnManager() *HostConnManagerCall { +func (mr *MockHostMockRecorder) ConnManager() *MockHostConnManagerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnManager", reflect.TypeOf((*MockHost)(nil).ConnManager)) - return &HostConnManagerCall{Call: call} + return &MockHostConnManagerCall{Call: call} } -// HostConnManagerCall wrap *gomock.Call -type HostConnManagerCall struct { +// MockHostConnManagerCall wrap *gomock.Call +type MockHostConnManagerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HostConnManagerCall) Return(arg0 connmgr.ConnManager) *HostConnManagerCall { +func (c *MockHostConnManagerCall) Return(arg0 connmgr.ConnManager) *MockHostConnManagerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *HostConnManagerCall) Do(f func() connmgr.ConnManager) *HostConnManagerCall { +func (c *MockHostConnManagerCall) Do(f func() connmgr.ConnManager) *MockHostConnManagerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HostConnManagerCall) DoAndReturn(f func() connmgr.ConnManager) *HostConnManagerCall { +func (c *MockHostConnManagerCall) DoAndReturn(f func() connmgr.ConnManager) *MockHostConnManagerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -90,31 +91,31 @@ func (m *MockHost) Network() network.Network { } // Network indicates an expected call of Network. -func (mr *MockHostMockRecorder) Network() *HostNetworkCall { +func (mr *MockHostMockRecorder) Network() *MockHostNetworkCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Network", reflect.TypeOf((*MockHost)(nil).Network)) - return &HostNetworkCall{Call: call} + return &MockHostNetworkCall{Call: call} } -// HostNetworkCall wrap *gomock.Call -type HostNetworkCall struct { +// MockHostNetworkCall wrap *gomock.Call +type MockHostNetworkCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HostNetworkCall) Return(arg0 network.Network) *HostNetworkCall { +func (c *MockHostNetworkCall) Return(arg0 network.Network) *MockHostNetworkCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *HostNetworkCall) Do(f func() network.Network) *HostNetworkCall { +func (c *MockHostNetworkCall) Do(f func() network.Network) *MockHostNetworkCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HostNetworkCall) DoAndReturn(f func() network.Network) *HostNetworkCall { +func (c *MockHostNetworkCall) DoAndReturn(f func() network.Network) *MockHostNetworkCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -133,32 +134,32 @@ func (m *MockHost) NewStream(arg0 context.Context, arg1 peer.ID, arg2 ...protoco } // NewStream indicates an expected call of NewStream. -func (mr *MockHostMockRecorder) NewStream(arg0, arg1 any, arg2 ...any) *HostNewStreamCall { +func (mr *MockHostMockRecorder) NewStream(arg0, arg1 any, arg2 ...any) *MockHostNewStreamCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewStream", reflect.TypeOf((*MockHost)(nil).NewStream), varargs...) - return &HostNewStreamCall{Call: call} + return &MockHostNewStreamCall{Call: call} } -// HostNewStreamCall wrap *gomock.Call -type HostNewStreamCall struct { +// MockHostNewStreamCall wrap *gomock.Call +type MockHostNewStreamCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HostNewStreamCall) Return(arg0 network.Stream, arg1 error) *HostNewStreamCall { +func (c *MockHostNewStreamCall) Return(arg0 network.Stream, arg1 error) *MockHostNewStreamCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *HostNewStreamCall) Do(f func(context.Context, peer.ID, ...protocol.ID) (network.Stream, error)) *HostNewStreamCall { +func (c *MockHostNewStreamCall) Do(f func(context.Context, peer.ID, ...protocol.ID) (network.Stream, error)) *MockHostNewStreamCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HostNewStreamCall) DoAndReturn(f func(context.Context, peer.ID, ...protocol.ID) (network.Stream, error)) *HostNewStreamCall { +func (c *MockHostNewStreamCall) DoAndReturn(f func(context.Context, peer.ID, ...protocol.ID) (network.Stream, error)) *MockHostNewStreamCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -170,31 +171,31 @@ func (m *MockHost) SetStreamHandler(arg0 protocol.ID, arg1 network.StreamHandler } // SetStreamHandler indicates an expected call of SetStreamHandler. -func (mr *MockHostMockRecorder) SetStreamHandler(arg0, arg1 any) *HostSetStreamHandlerCall { +func (mr *MockHostMockRecorder) SetStreamHandler(arg0, arg1 any) *MockHostSetStreamHandlerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStreamHandler", reflect.TypeOf((*MockHost)(nil).SetStreamHandler), arg0, arg1) - return &HostSetStreamHandlerCall{Call: call} + return &MockHostSetStreamHandlerCall{Call: call} } -// HostSetStreamHandlerCall wrap *gomock.Call -type HostSetStreamHandlerCall struct { +// MockHostSetStreamHandlerCall wrap *gomock.Call +type MockHostSetStreamHandlerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *HostSetStreamHandlerCall) Return() *HostSetStreamHandlerCall { +func (c *MockHostSetStreamHandlerCall) Return() *MockHostSetStreamHandlerCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *HostSetStreamHandlerCall) Do(f func(protocol.ID, network.StreamHandler)) *HostSetStreamHandlerCall { +func (c *MockHostSetStreamHandlerCall) Do(f func(protocol.ID, network.StreamHandler)) *MockHostSetStreamHandlerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *HostSetStreamHandlerCall) DoAndReturn(f func(protocol.ID, network.StreamHandler)) *HostSetStreamHandlerCall { +func (c *MockHostSetStreamHandlerCall) DoAndReturn(f func(protocol.ID, network.StreamHandler)) *MockHostSetStreamHandlerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -231,31 +232,31 @@ func (m *MockpeerStream) Close() error { } // Close indicates an expected call of Close. -func (mr *MockpeerStreamMockRecorder) Close() *peerStreamCloseCall { +func (mr *MockpeerStreamMockRecorder) Close() *MockpeerStreamCloseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockpeerStream)(nil).Close)) - return &peerStreamCloseCall{Call: call} + return &MockpeerStreamCloseCall{Call: call} } -// peerStreamCloseCall wrap *gomock.Call -type peerStreamCloseCall struct { +// MockpeerStreamCloseCall wrap *gomock.Call +type MockpeerStreamCloseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *peerStreamCloseCall) Return(arg0 error) *peerStreamCloseCall { +func (c *MockpeerStreamCloseCall) Return(arg0 error) *MockpeerStreamCloseCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *peerStreamCloseCall) Do(f func() error) *peerStreamCloseCall { +func (c *MockpeerStreamCloseCall) Do(f func() error) *MockpeerStreamCloseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *peerStreamCloseCall) DoAndReturn(f func() error) *peerStreamCloseCall { +func (c *MockpeerStreamCloseCall) DoAndReturn(f func() error) *MockpeerStreamCloseCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -270,31 +271,31 @@ func (m *MockpeerStream) Read(p []byte) (int, error) { } // Read indicates an expected call of Read. -func (mr *MockpeerStreamMockRecorder) Read(p any) *peerStreamReadCall { +func (mr *MockpeerStreamMockRecorder) Read(p any) *MockpeerStreamReadCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockpeerStream)(nil).Read), p) - return &peerStreamReadCall{Call: call} + return &MockpeerStreamReadCall{Call: call} } -// peerStreamReadCall wrap *gomock.Call -type peerStreamReadCall struct { +// MockpeerStreamReadCall wrap *gomock.Call +type MockpeerStreamReadCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *peerStreamReadCall) Return(n int, err error) *peerStreamReadCall { +func (c *MockpeerStreamReadCall) Return(n int, err error) *MockpeerStreamReadCall { c.Call = c.Call.Return(n, err) return c } // Do rewrite *gomock.Call.Do -func (c *peerStreamReadCall) Do(f func([]byte) (int, error)) *peerStreamReadCall { +func (c *MockpeerStreamReadCall) Do(f func([]byte) (int, error)) *MockpeerStreamReadCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *peerStreamReadCall) DoAndReturn(f func([]byte) (int, error)) *peerStreamReadCall { +func (c *MockpeerStreamReadCall) DoAndReturn(f func([]byte) (int, error)) *MockpeerStreamReadCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -308,31 +309,31 @@ func (m *MockpeerStream) SetDeadline(arg0 time.Time) error { } // SetDeadline indicates an expected call of SetDeadline. -func (mr *MockpeerStreamMockRecorder) SetDeadline(arg0 any) *peerStreamSetDeadlineCall { +func (mr *MockpeerStreamMockRecorder) SetDeadline(arg0 any) *MockpeerStreamSetDeadlineCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockpeerStream)(nil).SetDeadline), arg0) - return &peerStreamSetDeadlineCall{Call: call} + return &MockpeerStreamSetDeadlineCall{Call: call} } -// peerStreamSetDeadlineCall wrap *gomock.Call -type peerStreamSetDeadlineCall struct { +// MockpeerStreamSetDeadlineCall wrap *gomock.Call +type MockpeerStreamSetDeadlineCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *peerStreamSetDeadlineCall) Return(arg0 error) *peerStreamSetDeadlineCall { +func (c *MockpeerStreamSetDeadlineCall) Return(arg0 error) *MockpeerStreamSetDeadlineCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *peerStreamSetDeadlineCall) Do(f func(time.Time) error) *peerStreamSetDeadlineCall { +func (c *MockpeerStreamSetDeadlineCall) Do(f func(time.Time) error) *MockpeerStreamSetDeadlineCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *peerStreamSetDeadlineCall) DoAndReturn(f func(time.Time) error) *peerStreamSetDeadlineCall { +func (c *MockpeerStreamSetDeadlineCall) DoAndReturn(f func(time.Time) error) *MockpeerStreamSetDeadlineCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -347,31 +348,31 @@ func (m *MockpeerStream) Write(p []byte) (int, error) { } // Write indicates an expected call of Write. -func (mr *MockpeerStreamMockRecorder) Write(p any) *peerStreamWriteCall { +func (mr *MockpeerStreamMockRecorder) Write(p any) *MockpeerStreamWriteCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockpeerStream)(nil).Write), p) - return &peerStreamWriteCall{Call: call} + return &MockpeerStreamWriteCall{Call: call} } -// peerStreamWriteCall wrap *gomock.Call -type peerStreamWriteCall struct { +// MockpeerStreamWriteCall wrap *gomock.Call +type MockpeerStreamWriteCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *peerStreamWriteCall) Return(n int, err error) *peerStreamWriteCall { +func (c *MockpeerStreamWriteCall) Return(n int, err error) *MockpeerStreamWriteCall { c.Call = c.Call.Return(n, err) return c } // Do rewrite *gomock.Call.Do -func (c *peerStreamWriteCall) Do(f func([]byte) (int, error)) *peerStreamWriteCall { +func (c *MockpeerStreamWriteCall) Do(f func([]byte) (int, error)) *MockpeerStreamWriteCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *peerStreamWriteCall) DoAndReturn(f func([]byte) (int, error)) *peerStreamWriteCall { +func (c *MockpeerStreamWriteCall) DoAndReturn(f func([]byte) (int, error)) *MockpeerStreamWriteCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/proposals/mocks.go b/proposals/mocks.go index 40d3b433363..4cbd4502eac 100644 --- a/proposals/mocks.go +++ b/proposals/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=proposals -destination=./mocks.go -source=./interface.go // + // Package proposals is a generated GoMock package. package proposals @@ -51,31 +52,31 @@ func (m *MockmeshProvider) AddBallot(arg0 context.Context, arg1 *types.Ballot) ( } // AddBallot indicates an expected call of AddBallot. -func (mr *MockmeshProviderMockRecorder) AddBallot(arg0, arg1 any) *meshProviderAddBallotCall { +func (mr *MockmeshProviderMockRecorder) AddBallot(arg0, arg1 any) *MockmeshProviderAddBallotCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBallot", reflect.TypeOf((*MockmeshProvider)(nil).AddBallot), arg0, arg1) - return &meshProviderAddBallotCall{Call: call} + return &MockmeshProviderAddBallotCall{Call: call} } -// meshProviderAddBallotCall wrap *gomock.Call -type meshProviderAddBallotCall struct { +// MockmeshProviderAddBallotCall wrap *gomock.Call +type MockmeshProviderAddBallotCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshProviderAddBallotCall) Return(arg0 *types.MalfeasanceProof, arg1 error) *meshProviderAddBallotCall { +func (c *MockmeshProviderAddBallotCall) Return(arg0 *types.MalfeasanceProof, arg1 error) *MockmeshProviderAddBallotCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *meshProviderAddBallotCall) Do(f func(context.Context, *types.Ballot) (*types.MalfeasanceProof, error)) *meshProviderAddBallotCall { +func (c *MockmeshProviderAddBallotCall) Do(f func(context.Context, *types.Ballot) (*types.MalfeasanceProof, error)) *MockmeshProviderAddBallotCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshProviderAddBallotCall) DoAndReturn(f func(context.Context, *types.Ballot) (*types.MalfeasanceProof, error)) *meshProviderAddBallotCall { +func (c *MockmeshProviderAddBallotCall) DoAndReturn(f func(context.Context, *types.Ballot) (*types.MalfeasanceProof, error)) *MockmeshProviderAddBallotCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -89,31 +90,31 @@ func (m *MockmeshProvider) AddTXsFromProposal(arg0 context.Context, arg1 types.L } // AddTXsFromProposal indicates an expected call of AddTXsFromProposal. -func (mr *MockmeshProviderMockRecorder) AddTXsFromProposal(arg0, arg1, arg2, arg3 any) *meshProviderAddTXsFromProposalCall { +func (mr *MockmeshProviderMockRecorder) AddTXsFromProposal(arg0, arg1, arg2, arg3 any) *MockmeshProviderAddTXsFromProposalCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTXsFromProposal", reflect.TypeOf((*MockmeshProvider)(nil).AddTXsFromProposal), arg0, arg1, arg2, arg3) - return &meshProviderAddTXsFromProposalCall{Call: call} + return &MockmeshProviderAddTXsFromProposalCall{Call: call} } -// meshProviderAddTXsFromProposalCall wrap *gomock.Call -type meshProviderAddTXsFromProposalCall struct { +// MockmeshProviderAddTXsFromProposalCall wrap *gomock.Call +type MockmeshProviderAddTXsFromProposalCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshProviderAddTXsFromProposalCall) Return(arg0 error) *meshProviderAddTXsFromProposalCall { +func (c *MockmeshProviderAddTXsFromProposalCall) Return(arg0 error) *MockmeshProviderAddTXsFromProposalCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *meshProviderAddTXsFromProposalCall) Do(f func(context.Context, types.LayerID, types.ProposalID, []types.TransactionID) error) *meshProviderAddTXsFromProposalCall { +func (c *MockmeshProviderAddTXsFromProposalCall) Do(f func(context.Context, types.LayerID, types.ProposalID, []types.TransactionID) error) *MockmeshProviderAddTXsFromProposalCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshProviderAddTXsFromProposalCall) DoAndReturn(f func(context.Context, types.LayerID, types.ProposalID, []types.TransactionID) error) *meshProviderAddTXsFromProposalCall { +func (c *MockmeshProviderAddTXsFromProposalCall) DoAndReturn(f func(context.Context, types.LayerID, types.ProposalID, []types.TransactionID) error) *MockmeshProviderAddTXsFromProposalCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -127,31 +128,31 @@ func (m *MockmeshProvider) ProcessedLayer() types.LayerID { } // ProcessedLayer indicates an expected call of ProcessedLayer. -func (mr *MockmeshProviderMockRecorder) ProcessedLayer() *meshProviderProcessedLayerCall { +func (mr *MockmeshProviderMockRecorder) ProcessedLayer() *MockmeshProviderProcessedLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessedLayer", reflect.TypeOf((*MockmeshProvider)(nil).ProcessedLayer)) - return &meshProviderProcessedLayerCall{Call: call} + return &MockmeshProviderProcessedLayerCall{Call: call} } -// meshProviderProcessedLayerCall wrap *gomock.Call -type meshProviderProcessedLayerCall struct { +// MockmeshProviderProcessedLayerCall wrap *gomock.Call +type MockmeshProviderProcessedLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshProviderProcessedLayerCall) Return(arg0 types.LayerID) *meshProviderProcessedLayerCall { +func (c *MockmeshProviderProcessedLayerCall) Return(arg0 types.LayerID) *MockmeshProviderProcessedLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *meshProviderProcessedLayerCall) Do(f func() types.LayerID) *meshProviderProcessedLayerCall { +func (c *MockmeshProviderProcessedLayerCall) Do(f func() types.LayerID) *MockmeshProviderProcessedLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshProviderProcessedLayerCall) DoAndReturn(f func() types.LayerID) *meshProviderProcessedLayerCall { +func (c *MockmeshProviderProcessedLayerCall) DoAndReturn(f func() types.LayerID) *MockmeshProviderProcessedLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -189,31 +190,31 @@ func (m *MockeligibilityValidator) CheckEligibility(arg0 context.Context, arg1 * } // CheckEligibility indicates an expected call of CheckEligibility. -func (mr *MockeligibilityValidatorMockRecorder) CheckEligibility(arg0, arg1, arg2 any) *eligibilityValidatorCheckEligibilityCall { +func (mr *MockeligibilityValidatorMockRecorder) CheckEligibility(arg0, arg1, arg2 any) *MockeligibilityValidatorCheckEligibilityCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckEligibility", reflect.TypeOf((*MockeligibilityValidator)(nil).CheckEligibility), arg0, arg1, arg2) - return &eligibilityValidatorCheckEligibilityCall{Call: call} + return &MockeligibilityValidatorCheckEligibilityCall{Call: call} } -// eligibilityValidatorCheckEligibilityCall wrap *gomock.Call -type eligibilityValidatorCheckEligibilityCall struct { +// MockeligibilityValidatorCheckEligibilityCall wrap *gomock.Call +type MockeligibilityValidatorCheckEligibilityCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *eligibilityValidatorCheckEligibilityCall) Return(arg0 bool, arg1 error) *eligibilityValidatorCheckEligibilityCall { +func (c *MockeligibilityValidatorCheckEligibilityCall) Return(arg0 bool, arg1 error) *MockeligibilityValidatorCheckEligibilityCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *eligibilityValidatorCheckEligibilityCall) Do(f func(context.Context, *types.Ballot, uint64) (bool, error)) *eligibilityValidatorCheckEligibilityCall { +func (c *MockeligibilityValidatorCheckEligibilityCall) Do(f func(context.Context, *types.Ballot, uint64) (bool, error)) *MockeligibilityValidatorCheckEligibilityCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *eligibilityValidatorCheckEligibilityCall) DoAndReturn(f func(context.Context, *types.Ballot, uint64) (bool, error)) *eligibilityValidatorCheckEligibilityCall { +func (c *MockeligibilityValidatorCheckEligibilityCall) DoAndReturn(f func(context.Context, *types.Ballot, uint64) (bool, error)) *MockeligibilityValidatorCheckEligibilityCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -251,31 +252,31 @@ func (m *MocktortoiseProvider) DecodeBallot(arg0 *types.BallotTortoiseData) (*to } // DecodeBallot indicates an expected call of DecodeBallot. -func (mr *MocktortoiseProviderMockRecorder) DecodeBallot(arg0 any) *tortoiseProviderDecodeBallotCall { +func (mr *MocktortoiseProviderMockRecorder) DecodeBallot(arg0 any) *MocktortoiseProviderDecodeBallotCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecodeBallot", reflect.TypeOf((*MocktortoiseProvider)(nil).DecodeBallot), arg0) - return &tortoiseProviderDecodeBallotCall{Call: call} + return &MocktortoiseProviderDecodeBallotCall{Call: call} } -// tortoiseProviderDecodeBallotCall wrap *gomock.Call -type tortoiseProviderDecodeBallotCall struct { +// MocktortoiseProviderDecodeBallotCall wrap *gomock.Call +type MocktortoiseProviderDecodeBallotCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *tortoiseProviderDecodeBallotCall) Return(arg0 *tortoise.DecodedBallot, arg1 error) *tortoiseProviderDecodeBallotCall { +func (c *MocktortoiseProviderDecodeBallotCall) Return(arg0 *tortoise.DecodedBallot, arg1 error) *MocktortoiseProviderDecodeBallotCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *tortoiseProviderDecodeBallotCall) Do(f func(*types.BallotTortoiseData) (*tortoise.DecodedBallot, error)) *tortoiseProviderDecodeBallotCall { +func (c *MocktortoiseProviderDecodeBallotCall) Do(f func(*types.BallotTortoiseData) (*tortoise.DecodedBallot, error)) *MocktortoiseProviderDecodeBallotCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *tortoiseProviderDecodeBallotCall) DoAndReturn(f func(*types.BallotTortoiseData) (*tortoise.DecodedBallot, error)) *tortoiseProviderDecodeBallotCall { +func (c *MocktortoiseProviderDecodeBallotCall) DoAndReturn(f func(*types.BallotTortoiseData) (*tortoise.DecodedBallot, error)) *MocktortoiseProviderDecodeBallotCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -289,31 +290,31 @@ func (m *MocktortoiseProvider) GetBallot(arg0 types.BallotID) *tortoise.BallotDa } // GetBallot indicates an expected call of GetBallot. -func (mr *MocktortoiseProviderMockRecorder) GetBallot(arg0 any) *tortoiseProviderGetBallotCall { +func (mr *MocktortoiseProviderMockRecorder) GetBallot(arg0 any) *MocktortoiseProviderGetBallotCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallot", reflect.TypeOf((*MocktortoiseProvider)(nil).GetBallot), arg0) - return &tortoiseProviderGetBallotCall{Call: call} + return &MocktortoiseProviderGetBallotCall{Call: call} } -// tortoiseProviderGetBallotCall wrap *gomock.Call -type tortoiseProviderGetBallotCall struct { +// MocktortoiseProviderGetBallotCall wrap *gomock.Call +type MocktortoiseProviderGetBallotCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *tortoiseProviderGetBallotCall) Return(arg0 *tortoise.BallotData) *tortoiseProviderGetBallotCall { +func (c *MocktortoiseProviderGetBallotCall) Return(arg0 *tortoise.BallotData) *MocktortoiseProviderGetBallotCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *tortoiseProviderGetBallotCall) Do(f func(types.BallotID) *tortoise.BallotData) *tortoiseProviderGetBallotCall { +func (c *MocktortoiseProviderGetBallotCall) Do(f func(types.BallotID) *tortoise.BallotData) *MocktortoiseProviderGetBallotCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *tortoiseProviderGetBallotCall) DoAndReturn(f func(types.BallotID) *tortoise.BallotData) *tortoiseProviderGetBallotCall { +func (c *MocktortoiseProviderGetBallotCall) DoAndReturn(f func(types.BallotID) *tortoise.BallotData) *MocktortoiseProviderGetBallotCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -327,31 +328,31 @@ func (m *MocktortoiseProvider) StoreBallot(arg0 *tortoise.DecodedBallot) error { } // StoreBallot indicates an expected call of StoreBallot. -func (mr *MocktortoiseProviderMockRecorder) StoreBallot(arg0 any) *tortoiseProviderStoreBallotCall { +func (mr *MocktortoiseProviderMockRecorder) StoreBallot(arg0 any) *MocktortoiseProviderStoreBallotCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreBallot", reflect.TypeOf((*MocktortoiseProvider)(nil).StoreBallot), arg0) - return &tortoiseProviderStoreBallotCall{Call: call} + return &MocktortoiseProviderStoreBallotCall{Call: call} } -// tortoiseProviderStoreBallotCall wrap *gomock.Call -type tortoiseProviderStoreBallotCall struct { +// MocktortoiseProviderStoreBallotCall wrap *gomock.Call +type MocktortoiseProviderStoreBallotCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *tortoiseProviderStoreBallotCall) Return(arg0 error) *tortoiseProviderStoreBallotCall { +func (c *MocktortoiseProviderStoreBallotCall) Return(arg0 error) *MocktortoiseProviderStoreBallotCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *tortoiseProviderStoreBallotCall) Do(f func(*tortoise.DecodedBallot) error) *tortoiseProviderStoreBallotCall { +func (c *MocktortoiseProviderStoreBallotCall) Do(f func(*tortoise.DecodedBallot) error) *MocktortoiseProviderStoreBallotCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *tortoiseProviderStoreBallotCall) DoAndReturn(f func(*tortoise.DecodedBallot) error) *tortoiseProviderStoreBallotCall { +func (c *MocktortoiseProviderStoreBallotCall) DoAndReturn(f func(*tortoise.DecodedBallot) error) *MocktortoiseProviderStoreBallotCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -388,31 +389,31 @@ func (m *MockvrfVerifier) Verify(arg0 types.NodeID, arg1 []byte, arg2 types.VrfS } // Verify indicates an expected call of Verify. -func (mr *MockvrfVerifierMockRecorder) Verify(arg0, arg1, arg2 any) *vrfVerifierVerifyCall { +func (mr *MockvrfVerifierMockRecorder) Verify(arg0, arg1, arg2 any) *MockvrfVerifierVerifyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockvrfVerifier)(nil).Verify), arg0, arg1, arg2) - return &vrfVerifierVerifyCall{Call: call} + return &MockvrfVerifierVerifyCall{Call: call} } -// vrfVerifierVerifyCall wrap *gomock.Call -type vrfVerifierVerifyCall struct { +// MockvrfVerifierVerifyCall wrap *gomock.Call +type MockvrfVerifierVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vrfVerifierVerifyCall) Return(arg0 bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) Return(arg0 bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall { +func (c *MockvrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *MockvrfVerifierVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -449,31 +450,31 @@ func (m *MocklayerClock) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MocklayerClockMockRecorder) CurrentLayer() *layerClockCurrentLayerCall { +func (mr *MocklayerClockMockRecorder) CurrentLayer() *MocklayerClockCurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer)) - return &layerClockCurrentLayerCall{Call: call} + return &MocklayerClockCurrentLayerCall{Call: call} } -// layerClockCurrentLayerCall wrap *gomock.Call -type layerClockCurrentLayerCall struct { +// MocklayerClockCurrentLayerCall wrap *gomock.Call +type MocklayerClockCurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockCurrentLayerCall) Return(arg0 types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockCurrentLayerCall) Do(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *layerClockCurrentLayerCall { +func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -487,31 +488,31 @@ func (m *MocklayerClock) LayerToTime(arg0 types.LayerID) time.Time { } // LayerToTime indicates an expected call of LayerToTime. -func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *layerClockLayerToTimeCall { +func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 any) *MocklayerClockLayerToTimeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LayerToTime", reflect.TypeOf((*MocklayerClock)(nil).LayerToTime), arg0) - return &layerClockLayerToTimeCall{Call: call} + return &MocklayerClockLayerToTimeCall{Call: call} } -// layerClockLayerToTimeCall wrap *gomock.Call -type layerClockLayerToTimeCall struct { +// MocklayerClockLayerToTimeCall wrap *gomock.Call +type MocklayerClockLayerToTimeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerClockLayerToTimeCall) Return(arg0 time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) Return(arg0 time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *layerClockLayerToTimeCall { +func (c *MocklayerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/proposals/util/util.go b/proposals/util/util.go index d0312da77af..71c77dcf74b 100644 --- a/proposals/util/util.go +++ b/proposals/util/util.go @@ -30,14 +30,8 @@ func GetNumEligibleSlots(weight, minWeight, totalWeight uint64, committeeSize, l if totalWeight == 0 { return 0, ErrZeroTotalWeight } - numEligible := weight * uint64( - committeeSize, - ) * uint64( - layersPerEpoch, - ) / max( - minWeight, - totalWeight, - ) // TODO: ensure no overflow + // TODO: numEligible could overflow uint64 if weight is very large + numEligible := weight * uint64(committeeSize) * uint64(layersPerEpoch) / max(minWeight, totalWeight) if numEligible == 0 { numEligible = 1 } diff --git a/sql/localsql/0003_mocks.go b/sql/localsql/0003_mocks.go index bc165f71007..5b1d8b80925 100644 --- a/sql/localsql/0003_mocks.go +++ b/sql/localsql/0003_mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=localsql -destination=./0003_mocks.go -source=./0003_migration_interfaces.go // + // Package localsql is a generated GoMock package. package localsql @@ -47,31 +48,31 @@ func (m *MockPoetClient) Address() string { } // Address indicates an expected call of Address. -func (mr *MockPoetClientMockRecorder) Address() *PoetClientAddressCall { +func (mr *MockPoetClientMockRecorder) Address() *MockPoetClientAddressCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockPoetClient)(nil).Address)) - return &PoetClientAddressCall{Call: call} + return &MockPoetClientAddressCall{Call: call} } -// PoetClientAddressCall wrap *gomock.Call -type PoetClientAddressCall struct { +// MockPoetClientAddressCall wrap *gomock.Call +type MockPoetClientAddressCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PoetClientAddressCall) Return(arg0 string) *PoetClientAddressCall { +func (c *MockPoetClientAddressCall) Return(arg0 string) *MockPoetClientAddressCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *PoetClientAddressCall) Do(f func() string) *PoetClientAddressCall { +func (c *MockPoetClientAddressCall) Do(f func() string) *MockPoetClientAddressCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PoetClientAddressCall) DoAndReturn(f func() string) *PoetClientAddressCall { +func (c *MockPoetClientAddressCall) DoAndReturn(f func() string) *MockPoetClientAddressCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -85,31 +86,31 @@ func (m *MockPoetClient) PoetServiceID(ctx context.Context) []byte { } // PoetServiceID indicates an expected call of PoetServiceID. -func (mr *MockPoetClientMockRecorder) PoetServiceID(ctx any) *PoetClientPoetServiceIDCall { +func (mr *MockPoetClientMockRecorder) PoetServiceID(ctx any) *MockPoetClientPoetServiceIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PoetServiceID", reflect.TypeOf((*MockPoetClient)(nil).PoetServiceID), ctx) - return &PoetClientPoetServiceIDCall{Call: call} + return &MockPoetClientPoetServiceIDCall{Call: call} } -// PoetClientPoetServiceIDCall wrap *gomock.Call -type PoetClientPoetServiceIDCall struct { +// MockPoetClientPoetServiceIDCall wrap *gomock.Call +type MockPoetClientPoetServiceIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PoetClientPoetServiceIDCall) Return(arg0 []byte) *PoetClientPoetServiceIDCall { +func (c *MockPoetClientPoetServiceIDCall) Return(arg0 []byte) *MockPoetClientPoetServiceIDCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *PoetClientPoetServiceIDCall) Do(f func(context.Context) []byte) *PoetClientPoetServiceIDCall { +func (c *MockPoetClientPoetServiceIDCall) Do(f func(context.Context) []byte) *MockPoetClientPoetServiceIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PoetClientPoetServiceIDCall) DoAndReturn(f func(context.Context) []byte) *PoetClientPoetServiceIDCall { +func (c *MockPoetClientPoetServiceIDCall) DoAndReturn(f func(context.Context) []byte) *MockPoetClientPoetServiceIDCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/sql/mocks.go b/sql/mocks.go index 3bab7c049b4..bbd869f3d49 100644 --- a/sql/mocks.go +++ b/sql/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=sql -destination=./mocks.go -source=./interface.go // + // Package sql is a generated GoMock package. package sql @@ -46,31 +47,31 @@ func (m *MockMigration) Apply(db Executor) error { } // Apply indicates an expected call of Apply. -func (mr *MockMigrationMockRecorder) Apply(db any) *MigrationApplyCall { +func (mr *MockMigrationMockRecorder) Apply(db any) *MockMigrationApplyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockMigration)(nil).Apply), db) - return &MigrationApplyCall{Call: call} + return &MockMigrationApplyCall{Call: call} } -// MigrationApplyCall wrap *gomock.Call -type MigrationApplyCall struct { +// MockMigrationApplyCall wrap *gomock.Call +type MockMigrationApplyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *MigrationApplyCall) Return(arg0 error) *MigrationApplyCall { +func (c *MockMigrationApplyCall) Return(arg0 error) *MockMigrationApplyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *MigrationApplyCall) Do(f func(Executor) error) *MigrationApplyCall { +func (c *MockMigrationApplyCall) Do(f func(Executor) error) *MockMigrationApplyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MigrationApplyCall) DoAndReturn(f func(Executor) error) *MigrationApplyCall { +func (c *MockMigrationApplyCall) DoAndReturn(f func(Executor) error) *MockMigrationApplyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -84,31 +85,31 @@ func (m *MockMigration) Name() string { } // Name indicates an expected call of Name. -func (mr *MockMigrationMockRecorder) Name() *MigrationNameCall { +func (mr *MockMigrationMockRecorder) Name() *MockMigrationNameCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockMigration)(nil).Name)) - return &MigrationNameCall{Call: call} + return &MockMigrationNameCall{Call: call} } -// MigrationNameCall wrap *gomock.Call -type MigrationNameCall struct { +// MockMigrationNameCall wrap *gomock.Call +type MockMigrationNameCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *MigrationNameCall) Return(arg0 string) *MigrationNameCall { +func (c *MockMigrationNameCall) Return(arg0 string) *MockMigrationNameCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *MigrationNameCall) Do(f func() string) *MigrationNameCall { +func (c *MockMigrationNameCall) Do(f func() string) *MockMigrationNameCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MigrationNameCall) DoAndReturn(f func() string) *MigrationNameCall { +func (c *MockMigrationNameCall) DoAndReturn(f func() string) *MockMigrationNameCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -122,31 +123,31 @@ func (m *MockMigration) Order() int { } // Order indicates an expected call of Order. -func (mr *MockMigrationMockRecorder) Order() *MigrationOrderCall { +func (mr *MockMigrationMockRecorder) Order() *MockMigrationOrderCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Order", reflect.TypeOf((*MockMigration)(nil).Order)) - return &MigrationOrderCall{Call: call} + return &MockMigrationOrderCall{Call: call} } -// MigrationOrderCall wrap *gomock.Call -type MigrationOrderCall struct { +// MockMigrationOrderCall wrap *gomock.Call +type MockMigrationOrderCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *MigrationOrderCall) Return(arg0 int) *MigrationOrderCall { +func (c *MockMigrationOrderCall) Return(arg0 int) *MockMigrationOrderCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *MigrationOrderCall) Do(f func() int) *MigrationOrderCall { +func (c *MockMigrationOrderCall) Do(f func() int) *MockMigrationOrderCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MigrationOrderCall) DoAndReturn(f func() int) *MigrationOrderCall { +func (c *MockMigrationOrderCall) DoAndReturn(f func() int) *MockMigrationOrderCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -160,31 +161,31 @@ func (m *MockMigration) Rollback() error { } // Rollback indicates an expected call of Rollback. -func (mr *MockMigrationMockRecorder) Rollback() *MigrationRollbackCall { +func (mr *MockMigrationMockRecorder) Rollback() *MockMigrationRollbackCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockMigration)(nil).Rollback)) - return &MigrationRollbackCall{Call: call} + return &MockMigrationRollbackCall{Call: call} } -// MigrationRollbackCall wrap *gomock.Call -type MigrationRollbackCall struct { +// MockMigrationRollbackCall wrap *gomock.Call +type MockMigrationRollbackCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *MigrationRollbackCall) Return(arg0 error) *MigrationRollbackCall { +func (c *MockMigrationRollbackCall) Return(arg0 error) *MockMigrationRollbackCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *MigrationRollbackCall) Do(f func() error) *MigrationRollbackCall { +func (c *MockMigrationRollbackCall) Do(f func() error) *MockMigrationRollbackCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MigrationRollbackCall) DoAndReturn(f func() error) *MigrationRollbackCall { +func (c *MockMigrationRollbackCall) DoAndReturn(f func() error) *MockMigrationRollbackCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/sql/mocks/mocks.go b/sql/mocks/mocks.go index be8ea5fca6a..c5133b30640 100644 --- a/sql/mocks/mocks.go +++ b/sql/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./database.go // + // Package mocks is a generated GoMock package. package mocks @@ -48,31 +49,31 @@ func (m *MockExecutor) Exec(arg0 string, arg1 sql.Encoder, arg2 sql.Decoder) (in } // Exec indicates an expected call of Exec. -func (mr *MockExecutorMockRecorder) Exec(arg0, arg1, arg2 any) *ExecutorExecCall { +func (mr *MockExecutorMockRecorder) Exec(arg0, arg1, arg2 any) *MockExecutorExecCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockExecutor)(nil).Exec), arg0, arg1, arg2) - return &ExecutorExecCall{Call: call} + return &MockExecutorExecCall{Call: call} } -// ExecutorExecCall wrap *gomock.Call -type ExecutorExecCall struct { +// MockExecutorExecCall wrap *gomock.Call +type MockExecutorExecCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ExecutorExecCall) Return(arg0 int, arg1 error) *ExecutorExecCall { +func (c *MockExecutorExecCall) Return(arg0 int, arg1 error) *MockExecutorExecCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ExecutorExecCall) Do(f func(string, sql.Encoder, sql.Decoder) (int, error)) *ExecutorExecCall { +func (c *MockExecutorExecCall) Do(f func(string, sql.Encoder, sql.Decoder) (int, error)) *MockExecutorExecCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ExecutorExecCall) DoAndReturn(f func(string, sql.Encoder, sql.Decoder) (int, error)) *ExecutorExecCall { +func (c *MockExecutorExecCall) DoAndReturn(f func(string, sql.Encoder, sql.Decoder) (int, error)) *MockExecutorExecCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/syncer/blockssync/mocks.go b/syncer/blockssync/mocks.go index cbbbca4e814..a4a6cce2ab8 100644 --- a/syncer/blockssync/mocks.go +++ b/syncer/blockssync/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=blockssync -destination=./mocks.go -source=./blocks.go // + // Package blockssync is a generated GoMock package. package blockssync @@ -48,31 +49,31 @@ func (m *MockblockFetcher) GetBlocks(arg0 context.Context, arg1 []types.BlockID) } // GetBlocks indicates an expected call of GetBlocks. -func (mr *MockblockFetcherMockRecorder) GetBlocks(arg0, arg1 any) *blockFetcherGetBlocksCall { +func (mr *MockblockFetcherMockRecorder) GetBlocks(arg0, arg1 any) *MockblockFetcherGetBlocksCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*MockblockFetcher)(nil).GetBlocks), arg0, arg1) - return &blockFetcherGetBlocksCall{Call: call} + return &MockblockFetcherGetBlocksCall{Call: call} } -// blockFetcherGetBlocksCall wrap *gomock.Call -type blockFetcherGetBlocksCall struct { +// MockblockFetcherGetBlocksCall wrap *gomock.Call +type MockblockFetcherGetBlocksCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *blockFetcherGetBlocksCall) Return(arg0 error) *blockFetcherGetBlocksCall { +func (c *MockblockFetcherGetBlocksCall) Return(arg0 error) *MockblockFetcherGetBlocksCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *blockFetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *blockFetcherGetBlocksCall { +func (c *MockblockFetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *MockblockFetcherGetBlocksCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *blockFetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *blockFetcherGetBlocksCall { +func (c *MockblockFetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *MockblockFetcherGetBlocksCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/syncer/mocks/mocks.go b/syncer/mocks/mocks.go index a113003eb70..69deec43813 100644 --- a/syncer/mocks/mocks.go +++ b/syncer/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./interface.go // + // Package mocks is a generated GoMock package. package mocks @@ -52,31 +53,31 @@ func (m *MocklayerTicker) CurrentLayer() types.LayerID { } // CurrentLayer indicates an expected call of CurrentLayer. -func (mr *MocklayerTickerMockRecorder) CurrentLayer() *layerTickerCurrentLayerCall { +func (mr *MocklayerTickerMockRecorder) CurrentLayer() *MocklayerTickerCurrentLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerTicker)(nil).CurrentLayer)) - return &layerTickerCurrentLayerCall{Call: call} + return &MocklayerTickerCurrentLayerCall{Call: call} } -// layerTickerCurrentLayerCall wrap *gomock.Call -type layerTickerCurrentLayerCall struct { +// MocklayerTickerCurrentLayerCall wrap *gomock.Call +type MocklayerTickerCurrentLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerTickerCurrentLayerCall) Return(arg0 types.LayerID) *layerTickerCurrentLayerCall { +func (c *MocklayerTickerCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerTickerCurrentLayerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerTickerCurrentLayerCall) Do(f func() types.LayerID) *layerTickerCurrentLayerCall { +func (c *MocklayerTickerCurrentLayerCall) Do(f func() types.LayerID) *MocklayerTickerCurrentLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerTickerCurrentLayerCall) DoAndReturn(f func() types.LayerID) *layerTickerCurrentLayerCall { +func (c *MocklayerTickerCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerTickerCurrentLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -111,31 +112,31 @@ func (m *MockmeshProvider) SetZeroBlockLayer(arg0 context.Context, arg1 types.La } // SetZeroBlockLayer indicates an expected call of SetZeroBlockLayer. -func (mr *MockmeshProviderMockRecorder) SetZeroBlockLayer(arg0, arg1 any) *meshProviderSetZeroBlockLayerCall { +func (mr *MockmeshProviderMockRecorder) SetZeroBlockLayer(arg0, arg1 any) *MockmeshProviderSetZeroBlockLayerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetZeroBlockLayer", reflect.TypeOf((*MockmeshProvider)(nil).SetZeroBlockLayer), arg0, arg1) - return &meshProviderSetZeroBlockLayerCall{Call: call} + return &MockmeshProviderSetZeroBlockLayerCall{Call: call} } -// meshProviderSetZeroBlockLayerCall wrap *gomock.Call -type meshProviderSetZeroBlockLayerCall struct { +// MockmeshProviderSetZeroBlockLayerCall wrap *gomock.Call +type MockmeshProviderSetZeroBlockLayerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *meshProviderSetZeroBlockLayerCall) Return() *meshProviderSetZeroBlockLayerCall { +func (c *MockmeshProviderSetZeroBlockLayerCall) Return() *MockmeshProviderSetZeroBlockLayerCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *meshProviderSetZeroBlockLayerCall) Do(f func(context.Context, types.LayerID)) *meshProviderSetZeroBlockLayerCall { +func (c *MockmeshProviderSetZeroBlockLayerCall) Do(f func(context.Context, types.LayerID)) *MockmeshProviderSetZeroBlockLayerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *meshProviderSetZeroBlockLayerCall) DoAndReturn(f func(context.Context, types.LayerID)) *meshProviderSetZeroBlockLayerCall { +func (c *MockmeshProviderSetZeroBlockLayerCall) DoAndReturn(f func(context.Context, types.LayerID)) *MockmeshProviderSetZeroBlockLayerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -176,32 +177,32 @@ func (m *MockfetchLogic) GetAtxs(arg0 context.Context, arg1 []types.ATXID, arg2 } // GetAtxs indicates an expected call of GetAtxs. -func (mr *MockfetchLogicMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *fetchLogicGetAtxsCall { +func (mr *MockfetchLogicMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *MockfetchLogicGetAtxsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxs", reflect.TypeOf((*MockfetchLogic)(nil).GetAtxs), varargs...) - return &fetchLogicGetAtxsCall{Call: call} + return &MockfetchLogicGetAtxsCall{Call: call} } -// fetchLogicGetAtxsCall wrap *gomock.Call -type fetchLogicGetAtxsCall struct { +// MockfetchLogicGetAtxsCall wrap *gomock.Call +type MockfetchLogicGetAtxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetAtxsCall) Return(arg0 error) *fetchLogicGetAtxsCall { +func (c *MockfetchLogicGetAtxsCall) Return(arg0 error) *MockfetchLogicGetAtxsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *fetchLogicGetAtxsCall { +func (c *MockfetchLogicGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *MockfetchLogicGetAtxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *fetchLogicGetAtxsCall { +func (c *MockfetchLogicGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *MockfetchLogicGetAtxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -215,31 +216,31 @@ func (m *MockfetchLogic) GetBallots(arg0 context.Context, arg1 []types.BallotID) } // GetBallots indicates an expected call of GetBallots. -func (mr *MockfetchLogicMockRecorder) GetBallots(arg0, arg1 any) *fetchLogicGetBallotsCall { +func (mr *MockfetchLogicMockRecorder) GetBallots(arg0, arg1 any) *MockfetchLogicGetBallotsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallots", reflect.TypeOf((*MockfetchLogic)(nil).GetBallots), arg0, arg1) - return &fetchLogicGetBallotsCall{Call: call} + return &MockfetchLogicGetBallotsCall{Call: call} } -// fetchLogicGetBallotsCall wrap *gomock.Call -type fetchLogicGetBallotsCall struct { +// MockfetchLogicGetBallotsCall wrap *gomock.Call +type MockfetchLogicGetBallotsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetBallotsCall) Return(arg0 error) *fetchLogicGetBallotsCall { +func (c *MockfetchLogicGetBallotsCall) Return(arg0 error) *MockfetchLogicGetBallotsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *fetchLogicGetBallotsCall { +func (c *MockfetchLogicGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *MockfetchLogicGetBallotsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *fetchLogicGetBallotsCall { +func (c *MockfetchLogicGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *MockfetchLogicGetBallotsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -253,31 +254,31 @@ func (m *MockfetchLogic) GetBlocks(arg0 context.Context, arg1 []types.BlockID) e } // GetBlocks indicates an expected call of GetBlocks. -func (mr *MockfetchLogicMockRecorder) GetBlocks(arg0, arg1 any) *fetchLogicGetBlocksCall { +func (mr *MockfetchLogicMockRecorder) GetBlocks(arg0, arg1 any) *MockfetchLogicGetBlocksCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*MockfetchLogic)(nil).GetBlocks), arg0, arg1) - return &fetchLogicGetBlocksCall{Call: call} + return &MockfetchLogicGetBlocksCall{Call: call} } -// fetchLogicGetBlocksCall wrap *gomock.Call -type fetchLogicGetBlocksCall struct { +// MockfetchLogicGetBlocksCall wrap *gomock.Call +type MockfetchLogicGetBlocksCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetBlocksCall) Return(arg0 error) *fetchLogicGetBlocksCall { +func (c *MockfetchLogicGetBlocksCall) Return(arg0 error) *MockfetchLogicGetBlocksCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *fetchLogicGetBlocksCall { +func (c *MockfetchLogicGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *MockfetchLogicGetBlocksCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *fetchLogicGetBlocksCall { +func (c *MockfetchLogicGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *MockfetchLogicGetBlocksCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -292,31 +293,31 @@ func (m *MockfetchLogic) GetCert(arg0 context.Context, arg1 types.LayerID, arg2 } // GetCert indicates an expected call of GetCert. -func (mr *MockfetchLogicMockRecorder) GetCert(arg0, arg1, arg2, arg3 any) *fetchLogicGetCertCall { +func (mr *MockfetchLogicMockRecorder) GetCert(arg0, arg1, arg2, arg3 any) *MockfetchLogicGetCertCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCert", reflect.TypeOf((*MockfetchLogic)(nil).GetCert), arg0, arg1, arg2, arg3) - return &fetchLogicGetCertCall{Call: call} + return &MockfetchLogicGetCertCall{Call: call} } -// fetchLogicGetCertCall wrap *gomock.Call -type fetchLogicGetCertCall struct { +// MockfetchLogicGetCertCall wrap *gomock.Call +type MockfetchLogicGetCertCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetCertCall) Return(arg0 *types.Certificate, arg1 error) *fetchLogicGetCertCall { +func (c *MockfetchLogicGetCertCall) Return(arg0 *types.Certificate, arg1 error) *MockfetchLogicGetCertCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetCertCall) Do(f func(context.Context, types.LayerID, types.BlockID, []p2p.Peer) (*types.Certificate, error)) *fetchLogicGetCertCall { +func (c *MockfetchLogicGetCertCall) Do(f func(context.Context, types.LayerID, types.BlockID, []p2p.Peer) (*types.Certificate, error)) *MockfetchLogicGetCertCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetCertCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID, []p2p.Peer) (*types.Certificate, error)) *fetchLogicGetCertCall { +func (c *MockfetchLogicGetCertCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID, []p2p.Peer) (*types.Certificate, error)) *MockfetchLogicGetCertCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -330,31 +331,31 @@ func (m *MockfetchLogic) GetEpochATXs(arg0 context.Context, arg1 types.EpochID) } // GetEpochATXs indicates an expected call of GetEpochATXs. -func (mr *MockfetchLogicMockRecorder) GetEpochATXs(arg0, arg1 any) *fetchLogicGetEpochATXsCall { +func (mr *MockfetchLogicMockRecorder) GetEpochATXs(arg0, arg1 any) *MockfetchLogicGetEpochATXsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEpochATXs", reflect.TypeOf((*MockfetchLogic)(nil).GetEpochATXs), arg0, arg1) - return &fetchLogicGetEpochATXsCall{Call: call} + return &MockfetchLogicGetEpochATXsCall{Call: call} } -// fetchLogicGetEpochATXsCall wrap *gomock.Call -type fetchLogicGetEpochATXsCall struct { +// MockfetchLogicGetEpochATXsCall wrap *gomock.Call +type MockfetchLogicGetEpochATXsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetEpochATXsCall) Return(arg0 error) *fetchLogicGetEpochATXsCall { +func (c *MockfetchLogicGetEpochATXsCall) Return(arg0 error) *MockfetchLogicGetEpochATXsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetEpochATXsCall) Do(f func(context.Context, types.EpochID) error) *fetchLogicGetEpochATXsCall { +func (c *MockfetchLogicGetEpochATXsCall) Do(f func(context.Context, types.EpochID) error) *MockfetchLogicGetEpochATXsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetEpochATXsCall) DoAndReturn(f func(context.Context, types.EpochID) error) *fetchLogicGetEpochATXsCall { +func (c *MockfetchLogicGetEpochATXsCall) DoAndReturn(f func(context.Context, types.EpochID) error) *MockfetchLogicGetEpochATXsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -369,31 +370,31 @@ func (m *MockfetchLogic) GetLayerData(arg0 context.Context, arg1 p2p.Peer, arg2 } // GetLayerData indicates an expected call of GetLayerData. -func (mr *MockfetchLogicMockRecorder) GetLayerData(arg0, arg1, arg2 any) *fetchLogicGetLayerDataCall { +func (mr *MockfetchLogicMockRecorder) GetLayerData(arg0, arg1, arg2 any) *MockfetchLogicGetLayerDataCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerData", reflect.TypeOf((*MockfetchLogic)(nil).GetLayerData), arg0, arg1, arg2) - return &fetchLogicGetLayerDataCall{Call: call} + return &MockfetchLogicGetLayerDataCall{Call: call} } -// fetchLogicGetLayerDataCall wrap *gomock.Call -type fetchLogicGetLayerDataCall struct { +// MockfetchLogicGetLayerDataCall wrap *gomock.Call +type MockfetchLogicGetLayerDataCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetLayerDataCall) Return(arg0 []byte, arg1 error) *fetchLogicGetLayerDataCall { +func (c *MockfetchLogicGetLayerDataCall) Return(arg0 []byte, arg1 error) *MockfetchLogicGetLayerDataCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetLayerDataCall) Do(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *fetchLogicGetLayerDataCall { +func (c *MockfetchLogicGetLayerDataCall) Do(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *MockfetchLogicGetLayerDataCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetLayerDataCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *fetchLogicGetLayerDataCall { +func (c *MockfetchLogicGetLayerDataCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *MockfetchLogicGetLayerDataCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -408,31 +409,31 @@ func (m *MockfetchLogic) GetLayerOpinions(arg0 context.Context, arg1 p2p.Peer, a } // GetLayerOpinions indicates an expected call of GetLayerOpinions. -func (mr *MockfetchLogicMockRecorder) GetLayerOpinions(arg0, arg1, arg2 any) *fetchLogicGetLayerOpinionsCall { +func (mr *MockfetchLogicMockRecorder) GetLayerOpinions(arg0, arg1, arg2 any) *MockfetchLogicGetLayerOpinionsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerOpinions", reflect.TypeOf((*MockfetchLogic)(nil).GetLayerOpinions), arg0, arg1, arg2) - return &fetchLogicGetLayerOpinionsCall{Call: call} + return &MockfetchLogicGetLayerOpinionsCall{Call: call} } -// fetchLogicGetLayerOpinionsCall wrap *gomock.Call -type fetchLogicGetLayerOpinionsCall struct { +// MockfetchLogicGetLayerOpinionsCall wrap *gomock.Call +type MockfetchLogicGetLayerOpinionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetLayerOpinionsCall) Return(arg0 []byte, arg1 error) *fetchLogicGetLayerOpinionsCall { +func (c *MockfetchLogicGetLayerOpinionsCall) Return(arg0 []byte, arg1 error) *MockfetchLogicGetLayerOpinionsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetLayerOpinionsCall) Do(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *fetchLogicGetLayerOpinionsCall { +func (c *MockfetchLogicGetLayerOpinionsCall) Do(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *MockfetchLogicGetLayerOpinionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetLayerOpinionsCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *fetchLogicGetLayerOpinionsCall { +func (c *MockfetchLogicGetLayerOpinionsCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *MockfetchLogicGetLayerOpinionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -446,31 +447,31 @@ func (m *MockfetchLogic) GetMalfeasanceProofs(arg0 context.Context, arg1 []types } // GetMalfeasanceProofs indicates an expected call of GetMalfeasanceProofs. -func (mr *MockfetchLogicMockRecorder) GetMalfeasanceProofs(arg0, arg1 any) *fetchLogicGetMalfeasanceProofsCall { +func (mr *MockfetchLogicMockRecorder) GetMalfeasanceProofs(arg0, arg1 any) *MockfetchLogicGetMalfeasanceProofsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMalfeasanceProofs", reflect.TypeOf((*MockfetchLogic)(nil).GetMalfeasanceProofs), arg0, arg1) - return &fetchLogicGetMalfeasanceProofsCall{Call: call} + return &MockfetchLogicGetMalfeasanceProofsCall{Call: call} } -// fetchLogicGetMalfeasanceProofsCall wrap *gomock.Call -type fetchLogicGetMalfeasanceProofsCall struct { +// MockfetchLogicGetMalfeasanceProofsCall wrap *gomock.Call +type MockfetchLogicGetMalfeasanceProofsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetMalfeasanceProofsCall) Return(arg0 error) *fetchLogicGetMalfeasanceProofsCall { +func (c *MockfetchLogicGetMalfeasanceProofsCall) Return(arg0 error) *MockfetchLogicGetMalfeasanceProofsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetMalfeasanceProofsCall) Do(f func(context.Context, []types.NodeID) error) *fetchLogicGetMalfeasanceProofsCall { +func (c *MockfetchLogicGetMalfeasanceProofsCall) Do(f func(context.Context, []types.NodeID) error) *MockfetchLogicGetMalfeasanceProofsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetMalfeasanceProofsCall) DoAndReturn(f func(context.Context, []types.NodeID) error) *fetchLogicGetMalfeasanceProofsCall { +func (c *MockfetchLogicGetMalfeasanceProofsCall) DoAndReturn(f func(context.Context, []types.NodeID) error) *MockfetchLogicGetMalfeasanceProofsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -485,31 +486,31 @@ func (m *MockfetchLogic) GetMaliciousIDs(arg0 context.Context, arg1 p2p.Peer) ([ } // GetMaliciousIDs indicates an expected call of GetMaliciousIDs. -func (mr *MockfetchLogicMockRecorder) GetMaliciousIDs(arg0, arg1 any) *fetchLogicGetMaliciousIDsCall { +func (mr *MockfetchLogicMockRecorder) GetMaliciousIDs(arg0, arg1 any) *MockfetchLogicGetMaliciousIDsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMaliciousIDs", reflect.TypeOf((*MockfetchLogic)(nil).GetMaliciousIDs), arg0, arg1) - return &fetchLogicGetMaliciousIDsCall{Call: call} + return &MockfetchLogicGetMaliciousIDsCall{Call: call} } -// fetchLogicGetMaliciousIDsCall wrap *gomock.Call -type fetchLogicGetMaliciousIDsCall struct { +// MockfetchLogicGetMaliciousIDsCall wrap *gomock.Call +type MockfetchLogicGetMaliciousIDsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicGetMaliciousIDsCall) Return(arg0 []byte, arg1 error) *fetchLogicGetMaliciousIDsCall { +func (c *MockfetchLogicGetMaliciousIDsCall) Return(arg0 []byte, arg1 error) *MockfetchLogicGetMaliciousIDsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicGetMaliciousIDsCall) Do(f func(context.Context, p2p.Peer) ([]byte, error)) *fetchLogicGetMaliciousIDsCall { +func (c *MockfetchLogicGetMaliciousIDsCall) Do(f func(context.Context, p2p.Peer) ([]byte, error)) *MockfetchLogicGetMaliciousIDsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicGetMaliciousIDsCall) DoAndReturn(f func(context.Context, p2p.Peer) ([]byte, error)) *fetchLogicGetMaliciousIDsCall { +func (c *MockfetchLogicGetMaliciousIDsCall) DoAndReturn(f func(context.Context, p2p.Peer) ([]byte, error)) *MockfetchLogicGetMaliciousIDsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -524,31 +525,31 @@ func (m *MockfetchLogic) PeerEpochInfo(arg0 context.Context, arg1 p2p.Peer, arg2 } // PeerEpochInfo indicates an expected call of PeerEpochInfo. -func (mr *MockfetchLogicMockRecorder) PeerEpochInfo(arg0, arg1, arg2 any) *fetchLogicPeerEpochInfoCall { +func (mr *MockfetchLogicMockRecorder) PeerEpochInfo(arg0, arg1, arg2 any) *MockfetchLogicPeerEpochInfoCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerEpochInfo", reflect.TypeOf((*MockfetchLogic)(nil).PeerEpochInfo), arg0, arg1, arg2) - return &fetchLogicPeerEpochInfoCall{Call: call} + return &MockfetchLogicPeerEpochInfoCall{Call: call} } -// fetchLogicPeerEpochInfoCall wrap *gomock.Call -type fetchLogicPeerEpochInfoCall struct { +// MockfetchLogicPeerEpochInfoCall wrap *gomock.Call +type MockfetchLogicPeerEpochInfoCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicPeerEpochInfoCall) Return(arg0 *fetch.EpochData, arg1 error) *fetchLogicPeerEpochInfoCall { +func (c *MockfetchLogicPeerEpochInfoCall) Return(arg0 *fetch.EpochData, arg1 error) *MockfetchLogicPeerEpochInfoCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicPeerEpochInfoCall) Do(f func(context.Context, p2p.Peer, types.EpochID) (*fetch.EpochData, error)) *fetchLogicPeerEpochInfoCall { +func (c *MockfetchLogicPeerEpochInfoCall) Do(f func(context.Context, p2p.Peer, types.EpochID) (*fetch.EpochData, error)) *MockfetchLogicPeerEpochInfoCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicPeerEpochInfoCall) DoAndReturn(f func(context.Context, p2p.Peer, types.EpochID) (*fetch.EpochData, error)) *fetchLogicPeerEpochInfoCall { +func (c *MockfetchLogicPeerEpochInfoCall) DoAndReturn(f func(context.Context, p2p.Peer, types.EpochID) (*fetch.EpochData, error)) *MockfetchLogicPeerEpochInfoCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -563,31 +564,31 @@ func (m *MockfetchLogic) PeerMeshHashes(arg0 context.Context, arg1 p2p.Peer, arg } // PeerMeshHashes indicates an expected call of PeerMeshHashes. -func (mr *MockfetchLogicMockRecorder) PeerMeshHashes(arg0, arg1, arg2 any) *fetchLogicPeerMeshHashesCall { +func (mr *MockfetchLogicMockRecorder) PeerMeshHashes(arg0, arg1, arg2 any) *MockfetchLogicPeerMeshHashesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerMeshHashes", reflect.TypeOf((*MockfetchLogic)(nil).PeerMeshHashes), arg0, arg1, arg2) - return &fetchLogicPeerMeshHashesCall{Call: call} + return &MockfetchLogicPeerMeshHashesCall{Call: call} } -// fetchLogicPeerMeshHashesCall wrap *gomock.Call -type fetchLogicPeerMeshHashesCall struct { +// MockfetchLogicPeerMeshHashesCall wrap *gomock.Call +type MockfetchLogicPeerMeshHashesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicPeerMeshHashesCall) Return(arg0 *fetch.MeshHashes, arg1 error) *fetchLogicPeerMeshHashesCall { +func (c *MockfetchLogicPeerMeshHashesCall) Return(arg0 *fetch.MeshHashes, arg1 error) *MockfetchLogicPeerMeshHashesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicPeerMeshHashesCall) Do(f func(context.Context, p2p.Peer, *fetch.MeshHashRequest) (*fetch.MeshHashes, error)) *fetchLogicPeerMeshHashesCall { +func (c *MockfetchLogicPeerMeshHashesCall) Do(f func(context.Context, p2p.Peer, *fetch.MeshHashRequest) (*fetch.MeshHashes, error)) *MockfetchLogicPeerMeshHashesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicPeerMeshHashesCall) DoAndReturn(f func(context.Context, p2p.Peer, *fetch.MeshHashRequest) (*fetch.MeshHashes, error)) *fetchLogicPeerMeshHashesCall { +func (c *MockfetchLogicPeerMeshHashesCall) DoAndReturn(f func(context.Context, p2p.Peer, *fetch.MeshHashRequest) (*fetch.MeshHashes, error)) *MockfetchLogicPeerMeshHashesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -605,32 +606,32 @@ func (m *MockfetchLogic) PollLayerData(arg0 context.Context, arg1 types.LayerID, } // PollLayerData indicates an expected call of PollLayerData. -func (mr *MockfetchLogicMockRecorder) PollLayerData(arg0, arg1 any, arg2 ...any) *fetchLogicPollLayerDataCall { +func (mr *MockfetchLogicMockRecorder) PollLayerData(arg0, arg1 any, arg2 ...any) *MockfetchLogicPollLayerDataCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollLayerData", reflect.TypeOf((*MockfetchLogic)(nil).PollLayerData), varargs...) - return &fetchLogicPollLayerDataCall{Call: call} + return &MockfetchLogicPollLayerDataCall{Call: call} } -// fetchLogicPollLayerDataCall wrap *gomock.Call -type fetchLogicPollLayerDataCall struct { +// MockfetchLogicPollLayerDataCall wrap *gomock.Call +type MockfetchLogicPollLayerDataCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicPollLayerDataCall) Return(arg0 error) *fetchLogicPollLayerDataCall { +func (c *MockfetchLogicPollLayerDataCall) Return(arg0 error) *MockfetchLogicPollLayerDataCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicPollLayerDataCall) Do(f func(context.Context, types.LayerID, ...p2p.Peer) error) *fetchLogicPollLayerDataCall { +func (c *MockfetchLogicPollLayerDataCall) Do(f func(context.Context, types.LayerID, ...p2p.Peer) error) *MockfetchLogicPollLayerDataCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicPollLayerDataCall) DoAndReturn(f func(context.Context, types.LayerID, ...p2p.Peer) error) *fetchLogicPollLayerDataCall { +func (c *MockfetchLogicPollLayerDataCall) DoAndReturn(f func(context.Context, types.LayerID, ...p2p.Peer) error) *MockfetchLogicPollLayerDataCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -646,31 +647,31 @@ func (m *MockfetchLogic) PollLayerOpinions(arg0 context.Context, arg1 types.Laye } // PollLayerOpinions indicates an expected call of PollLayerOpinions. -func (mr *MockfetchLogicMockRecorder) PollLayerOpinions(arg0, arg1, arg2, arg3 any) *fetchLogicPollLayerOpinionsCall { +func (mr *MockfetchLogicMockRecorder) PollLayerOpinions(arg0, arg1, arg2, arg3 any) *MockfetchLogicPollLayerOpinionsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollLayerOpinions", reflect.TypeOf((*MockfetchLogic)(nil).PollLayerOpinions), arg0, arg1, arg2, arg3) - return &fetchLogicPollLayerOpinionsCall{Call: call} + return &MockfetchLogicPollLayerOpinionsCall{Call: call} } -// fetchLogicPollLayerOpinionsCall wrap *gomock.Call -type fetchLogicPollLayerOpinionsCall struct { +// MockfetchLogicPollLayerOpinionsCall wrap *gomock.Call +type MockfetchLogicPollLayerOpinionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicPollLayerOpinionsCall) Return(arg0 []*fetch.LayerOpinion, arg1 []*types.Certificate, arg2 error) *fetchLogicPollLayerOpinionsCall { +func (c *MockfetchLogicPollLayerOpinionsCall) Return(arg0 []*fetch.LayerOpinion, arg1 []*types.Certificate, arg2 error) *MockfetchLogicPollLayerOpinionsCall { c.Call = c.Call.Return(arg0, arg1, arg2) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicPollLayerOpinionsCall) Do(f func(context.Context, types.LayerID, bool, []p2p.Peer) ([]*fetch.LayerOpinion, []*types.Certificate, error)) *fetchLogicPollLayerOpinionsCall { +func (c *MockfetchLogicPollLayerOpinionsCall) Do(f func(context.Context, types.LayerID, bool, []p2p.Peer) ([]*fetch.LayerOpinion, []*types.Certificate, error)) *MockfetchLogicPollLayerOpinionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicPollLayerOpinionsCall) DoAndReturn(f func(context.Context, types.LayerID, bool, []p2p.Peer) ([]*fetch.LayerOpinion, []*types.Certificate, error)) *fetchLogicPollLayerOpinionsCall { +func (c *MockfetchLogicPollLayerOpinionsCall) DoAndReturn(f func(context.Context, types.LayerID, bool, []p2p.Peer) ([]*fetch.LayerOpinion, []*types.Certificate, error)) *MockfetchLogicPollLayerOpinionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -684,31 +685,31 @@ func (m *MockfetchLogic) PollMaliciousProofs(ctx context.Context) error { } // PollMaliciousProofs indicates an expected call of PollMaliciousProofs. -func (mr *MockfetchLogicMockRecorder) PollMaliciousProofs(ctx any) *fetchLogicPollMaliciousProofsCall { +func (mr *MockfetchLogicMockRecorder) PollMaliciousProofs(ctx any) *MockfetchLogicPollMaliciousProofsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollMaliciousProofs", reflect.TypeOf((*MockfetchLogic)(nil).PollMaliciousProofs), ctx) - return &fetchLogicPollMaliciousProofsCall{Call: call} + return &MockfetchLogicPollMaliciousProofsCall{Call: call} } -// fetchLogicPollMaliciousProofsCall wrap *gomock.Call -type fetchLogicPollMaliciousProofsCall struct { +// MockfetchLogicPollMaliciousProofsCall wrap *gomock.Call +type MockfetchLogicPollMaliciousProofsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicPollMaliciousProofsCall) Return(arg0 error) *fetchLogicPollMaliciousProofsCall { +func (c *MockfetchLogicPollMaliciousProofsCall) Return(arg0 error) *MockfetchLogicPollMaliciousProofsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicPollMaliciousProofsCall) Do(f func(context.Context) error) *fetchLogicPollMaliciousProofsCall { +func (c *MockfetchLogicPollMaliciousProofsCall) Do(f func(context.Context) error) *MockfetchLogicPollMaliciousProofsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicPollMaliciousProofsCall) DoAndReturn(f func(context.Context) error) *fetchLogicPollMaliciousProofsCall { +func (c *MockfetchLogicPollMaliciousProofsCall) DoAndReturn(f func(context.Context) error) *MockfetchLogicPollMaliciousProofsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -720,31 +721,31 @@ func (m *MockfetchLogic) RegisterPeerHashes(peer p2p.Peer, hashes []types.Hash32 } // RegisterPeerHashes indicates an expected call of RegisterPeerHashes. -func (mr *MockfetchLogicMockRecorder) RegisterPeerHashes(peer, hashes any) *fetchLogicRegisterPeerHashesCall { +func (mr *MockfetchLogicMockRecorder) RegisterPeerHashes(peer, hashes any) *MockfetchLogicRegisterPeerHashesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeerHashes", reflect.TypeOf((*MockfetchLogic)(nil).RegisterPeerHashes), peer, hashes) - return &fetchLogicRegisterPeerHashesCall{Call: call} + return &MockfetchLogicRegisterPeerHashesCall{Call: call} } -// fetchLogicRegisterPeerHashesCall wrap *gomock.Call -type fetchLogicRegisterPeerHashesCall struct { +// MockfetchLogicRegisterPeerHashesCall wrap *gomock.Call +type MockfetchLogicRegisterPeerHashesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicRegisterPeerHashesCall) Return() *fetchLogicRegisterPeerHashesCall { +func (c *MockfetchLogicRegisterPeerHashesCall) Return() *MockfetchLogicRegisterPeerHashesCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *fetchLogicRegisterPeerHashesCall { +func (c *MockfetchLogicRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *MockfetchLogicRegisterPeerHashesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *fetchLogicRegisterPeerHashesCall { +func (c *MockfetchLogicRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *MockfetchLogicRegisterPeerHashesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -758,31 +759,31 @@ func (m *MockfetchLogic) SelectBestShuffled(arg0 int) []p2p.Peer { } // SelectBestShuffled indicates an expected call of SelectBestShuffled. -func (mr *MockfetchLogicMockRecorder) SelectBestShuffled(arg0 any) *fetchLogicSelectBestShuffledCall { +func (mr *MockfetchLogicMockRecorder) SelectBestShuffled(arg0 any) *MockfetchLogicSelectBestShuffledCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectBestShuffled", reflect.TypeOf((*MockfetchLogic)(nil).SelectBestShuffled), arg0) - return &fetchLogicSelectBestShuffledCall{Call: call} + return &MockfetchLogicSelectBestShuffledCall{Call: call} } -// fetchLogicSelectBestShuffledCall wrap *gomock.Call -type fetchLogicSelectBestShuffledCall struct { +// MockfetchLogicSelectBestShuffledCall wrap *gomock.Call +type MockfetchLogicSelectBestShuffledCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetchLogicSelectBestShuffledCall) Return(arg0 []p2p.Peer) *fetchLogicSelectBestShuffledCall { +func (c *MockfetchLogicSelectBestShuffledCall) Return(arg0 []p2p.Peer) *MockfetchLogicSelectBestShuffledCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetchLogicSelectBestShuffledCall) Do(f func(int) []p2p.Peer) *fetchLogicSelectBestShuffledCall { +func (c *MockfetchLogicSelectBestShuffledCall) Do(f func(int) []p2p.Peer) *MockfetchLogicSelectBestShuffledCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetchLogicSelectBestShuffledCall) DoAndReturn(f func(int) []p2p.Peer) *fetchLogicSelectBestShuffledCall { +func (c *MockfetchLogicSelectBestShuffledCall) DoAndReturn(f func(int) []p2p.Peer) *MockfetchLogicSelectBestShuffledCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -823,32 +824,32 @@ func (m *Mockfetcher) GetAtxs(arg0 context.Context, arg1 []types.ATXID, arg2 ... } // GetAtxs indicates an expected call of GetAtxs. -func (mr *MockfetcherMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *fetcherGetAtxsCall { +func (mr *MockfetcherMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *MockfetcherGetAtxsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxs", reflect.TypeOf((*Mockfetcher)(nil).GetAtxs), varargs...) - return &fetcherGetAtxsCall{Call: call} + return &MockfetcherGetAtxsCall{Call: call} } -// fetcherGetAtxsCall wrap *gomock.Call -type fetcherGetAtxsCall struct { +// MockfetcherGetAtxsCall wrap *gomock.Call +type MockfetcherGetAtxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherGetAtxsCall) Return(arg0 error) *fetcherGetAtxsCall { +func (c *MockfetcherGetAtxsCall) Return(arg0 error) *MockfetcherGetAtxsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *fetcherGetAtxsCall { +func (c *MockfetcherGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *MockfetcherGetAtxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *fetcherGetAtxsCall { +func (c *MockfetcherGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *MockfetcherGetAtxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -862,31 +863,31 @@ func (m *Mockfetcher) GetBallots(arg0 context.Context, arg1 []types.BallotID) er } // GetBallots indicates an expected call of GetBallots. -func (mr *MockfetcherMockRecorder) GetBallots(arg0, arg1 any) *fetcherGetBallotsCall { +func (mr *MockfetcherMockRecorder) GetBallots(arg0, arg1 any) *MockfetcherGetBallotsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallots", reflect.TypeOf((*Mockfetcher)(nil).GetBallots), arg0, arg1) - return &fetcherGetBallotsCall{Call: call} + return &MockfetcherGetBallotsCall{Call: call} } -// fetcherGetBallotsCall wrap *gomock.Call -type fetcherGetBallotsCall struct { +// MockfetcherGetBallotsCall wrap *gomock.Call +type MockfetcherGetBallotsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherGetBallotsCall) Return(arg0 error) *fetcherGetBallotsCall { +func (c *MockfetcherGetBallotsCall) Return(arg0 error) *MockfetcherGetBallotsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *fetcherGetBallotsCall { +func (c *MockfetcherGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *MockfetcherGetBallotsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *fetcherGetBallotsCall { +func (c *MockfetcherGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *MockfetcherGetBallotsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -900,31 +901,31 @@ func (m *Mockfetcher) GetBlocks(arg0 context.Context, arg1 []types.BlockID) erro } // GetBlocks indicates an expected call of GetBlocks. -func (mr *MockfetcherMockRecorder) GetBlocks(arg0, arg1 any) *fetcherGetBlocksCall { +func (mr *MockfetcherMockRecorder) GetBlocks(arg0, arg1 any) *MockfetcherGetBlocksCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*Mockfetcher)(nil).GetBlocks), arg0, arg1) - return &fetcherGetBlocksCall{Call: call} + return &MockfetcherGetBlocksCall{Call: call} } -// fetcherGetBlocksCall wrap *gomock.Call -type fetcherGetBlocksCall struct { +// MockfetcherGetBlocksCall wrap *gomock.Call +type MockfetcherGetBlocksCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherGetBlocksCall) Return(arg0 error) *fetcherGetBlocksCall { +func (c *MockfetcherGetBlocksCall) Return(arg0 error) *MockfetcherGetBlocksCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *fetcherGetBlocksCall { +func (c *MockfetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *MockfetcherGetBlocksCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *fetcherGetBlocksCall { +func (c *MockfetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *MockfetcherGetBlocksCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -939,31 +940,31 @@ func (m *Mockfetcher) GetCert(arg0 context.Context, arg1 types.LayerID, arg2 typ } // GetCert indicates an expected call of GetCert. -func (mr *MockfetcherMockRecorder) GetCert(arg0, arg1, arg2, arg3 any) *fetcherGetCertCall { +func (mr *MockfetcherMockRecorder) GetCert(arg0, arg1, arg2, arg3 any) *MockfetcherGetCertCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCert", reflect.TypeOf((*Mockfetcher)(nil).GetCert), arg0, arg1, arg2, arg3) - return &fetcherGetCertCall{Call: call} + return &MockfetcherGetCertCall{Call: call} } -// fetcherGetCertCall wrap *gomock.Call -type fetcherGetCertCall struct { +// MockfetcherGetCertCall wrap *gomock.Call +type MockfetcherGetCertCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherGetCertCall) Return(arg0 *types.Certificate, arg1 error) *fetcherGetCertCall { +func (c *MockfetcherGetCertCall) Return(arg0 *types.Certificate, arg1 error) *MockfetcherGetCertCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherGetCertCall) Do(f func(context.Context, types.LayerID, types.BlockID, []p2p.Peer) (*types.Certificate, error)) *fetcherGetCertCall { +func (c *MockfetcherGetCertCall) Do(f func(context.Context, types.LayerID, types.BlockID, []p2p.Peer) (*types.Certificate, error)) *MockfetcherGetCertCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherGetCertCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID, []p2p.Peer) (*types.Certificate, error)) *fetcherGetCertCall { +func (c *MockfetcherGetCertCall) DoAndReturn(f func(context.Context, types.LayerID, types.BlockID, []p2p.Peer) (*types.Certificate, error)) *MockfetcherGetCertCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -978,31 +979,31 @@ func (m *Mockfetcher) GetLayerData(arg0 context.Context, arg1 p2p.Peer, arg2 typ } // GetLayerData indicates an expected call of GetLayerData. -func (mr *MockfetcherMockRecorder) GetLayerData(arg0, arg1, arg2 any) *fetcherGetLayerDataCall { +func (mr *MockfetcherMockRecorder) GetLayerData(arg0, arg1, arg2 any) *MockfetcherGetLayerDataCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerData", reflect.TypeOf((*Mockfetcher)(nil).GetLayerData), arg0, arg1, arg2) - return &fetcherGetLayerDataCall{Call: call} + return &MockfetcherGetLayerDataCall{Call: call} } -// fetcherGetLayerDataCall wrap *gomock.Call -type fetcherGetLayerDataCall struct { +// MockfetcherGetLayerDataCall wrap *gomock.Call +type MockfetcherGetLayerDataCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherGetLayerDataCall) Return(arg0 []byte, arg1 error) *fetcherGetLayerDataCall { +func (c *MockfetcherGetLayerDataCall) Return(arg0 []byte, arg1 error) *MockfetcherGetLayerDataCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherGetLayerDataCall) Do(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *fetcherGetLayerDataCall { +func (c *MockfetcherGetLayerDataCall) Do(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *MockfetcherGetLayerDataCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherGetLayerDataCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *fetcherGetLayerDataCall { +func (c *MockfetcherGetLayerDataCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *MockfetcherGetLayerDataCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1017,31 +1018,31 @@ func (m *Mockfetcher) GetLayerOpinions(arg0 context.Context, arg1 p2p.Peer, arg2 } // GetLayerOpinions indicates an expected call of GetLayerOpinions. -func (mr *MockfetcherMockRecorder) GetLayerOpinions(arg0, arg1, arg2 any) *fetcherGetLayerOpinionsCall { +func (mr *MockfetcherMockRecorder) GetLayerOpinions(arg0, arg1, arg2 any) *MockfetcherGetLayerOpinionsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerOpinions", reflect.TypeOf((*Mockfetcher)(nil).GetLayerOpinions), arg0, arg1, arg2) - return &fetcherGetLayerOpinionsCall{Call: call} + return &MockfetcherGetLayerOpinionsCall{Call: call} } -// fetcherGetLayerOpinionsCall wrap *gomock.Call -type fetcherGetLayerOpinionsCall struct { +// MockfetcherGetLayerOpinionsCall wrap *gomock.Call +type MockfetcherGetLayerOpinionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherGetLayerOpinionsCall) Return(arg0 []byte, arg1 error) *fetcherGetLayerOpinionsCall { +func (c *MockfetcherGetLayerOpinionsCall) Return(arg0 []byte, arg1 error) *MockfetcherGetLayerOpinionsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherGetLayerOpinionsCall) Do(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *fetcherGetLayerOpinionsCall { +func (c *MockfetcherGetLayerOpinionsCall) Do(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *MockfetcherGetLayerOpinionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherGetLayerOpinionsCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *fetcherGetLayerOpinionsCall { +func (c *MockfetcherGetLayerOpinionsCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID) ([]byte, error)) *MockfetcherGetLayerOpinionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1055,31 +1056,31 @@ func (m *Mockfetcher) GetMalfeasanceProofs(arg0 context.Context, arg1 []types.No } // GetMalfeasanceProofs indicates an expected call of GetMalfeasanceProofs. -func (mr *MockfetcherMockRecorder) GetMalfeasanceProofs(arg0, arg1 any) *fetcherGetMalfeasanceProofsCall { +func (mr *MockfetcherMockRecorder) GetMalfeasanceProofs(arg0, arg1 any) *MockfetcherGetMalfeasanceProofsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMalfeasanceProofs", reflect.TypeOf((*Mockfetcher)(nil).GetMalfeasanceProofs), arg0, arg1) - return &fetcherGetMalfeasanceProofsCall{Call: call} + return &MockfetcherGetMalfeasanceProofsCall{Call: call} } -// fetcherGetMalfeasanceProofsCall wrap *gomock.Call -type fetcherGetMalfeasanceProofsCall struct { +// MockfetcherGetMalfeasanceProofsCall wrap *gomock.Call +type MockfetcherGetMalfeasanceProofsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherGetMalfeasanceProofsCall) Return(arg0 error) *fetcherGetMalfeasanceProofsCall { +func (c *MockfetcherGetMalfeasanceProofsCall) Return(arg0 error) *MockfetcherGetMalfeasanceProofsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherGetMalfeasanceProofsCall) Do(f func(context.Context, []types.NodeID) error) *fetcherGetMalfeasanceProofsCall { +func (c *MockfetcherGetMalfeasanceProofsCall) Do(f func(context.Context, []types.NodeID) error) *MockfetcherGetMalfeasanceProofsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherGetMalfeasanceProofsCall) DoAndReturn(f func(context.Context, []types.NodeID) error) *fetcherGetMalfeasanceProofsCall { +func (c *MockfetcherGetMalfeasanceProofsCall) DoAndReturn(f func(context.Context, []types.NodeID) error) *MockfetcherGetMalfeasanceProofsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1094,31 +1095,31 @@ func (m *Mockfetcher) GetMaliciousIDs(arg0 context.Context, arg1 p2p.Peer) ([]by } // GetMaliciousIDs indicates an expected call of GetMaliciousIDs. -func (mr *MockfetcherMockRecorder) GetMaliciousIDs(arg0, arg1 any) *fetcherGetMaliciousIDsCall { +func (mr *MockfetcherMockRecorder) GetMaliciousIDs(arg0, arg1 any) *MockfetcherGetMaliciousIDsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMaliciousIDs", reflect.TypeOf((*Mockfetcher)(nil).GetMaliciousIDs), arg0, arg1) - return &fetcherGetMaliciousIDsCall{Call: call} + return &MockfetcherGetMaliciousIDsCall{Call: call} } -// fetcherGetMaliciousIDsCall wrap *gomock.Call -type fetcherGetMaliciousIDsCall struct { +// MockfetcherGetMaliciousIDsCall wrap *gomock.Call +type MockfetcherGetMaliciousIDsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherGetMaliciousIDsCall) Return(arg0 []byte, arg1 error) *fetcherGetMaliciousIDsCall { +func (c *MockfetcherGetMaliciousIDsCall) Return(arg0 []byte, arg1 error) *MockfetcherGetMaliciousIDsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherGetMaliciousIDsCall) Do(f func(context.Context, p2p.Peer) ([]byte, error)) *fetcherGetMaliciousIDsCall { +func (c *MockfetcherGetMaliciousIDsCall) Do(f func(context.Context, p2p.Peer) ([]byte, error)) *MockfetcherGetMaliciousIDsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherGetMaliciousIDsCall) DoAndReturn(f func(context.Context, p2p.Peer) ([]byte, error)) *fetcherGetMaliciousIDsCall { +func (c *MockfetcherGetMaliciousIDsCall) DoAndReturn(f func(context.Context, p2p.Peer) ([]byte, error)) *MockfetcherGetMaliciousIDsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1133,31 +1134,31 @@ func (m *Mockfetcher) PeerEpochInfo(arg0 context.Context, arg1 p2p.Peer, arg2 ty } // PeerEpochInfo indicates an expected call of PeerEpochInfo. -func (mr *MockfetcherMockRecorder) PeerEpochInfo(arg0, arg1, arg2 any) *fetcherPeerEpochInfoCall { +func (mr *MockfetcherMockRecorder) PeerEpochInfo(arg0, arg1, arg2 any) *MockfetcherPeerEpochInfoCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerEpochInfo", reflect.TypeOf((*Mockfetcher)(nil).PeerEpochInfo), arg0, arg1, arg2) - return &fetcherPeerEpochInfoCall{Call: call} + return &MockfetcherPeerEpochInfoCall{Call: call} } -// fetcherPeerEpochInfoCall wrap *gomock.Call -type fetcherPeerEpochInfoCall struct { +// MockfetcherPeerEpochInfoCall wrap *gomock.Call +type MockfetcherPeerEpochInfoCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherPeerEpochInfoCall) Return(arg0 *fetch.EpochData, arg1 error) *fetcherPeerEpochInfoCall { +func (c *MockfetcherPeerEpochInfoCall) Return(arg0 *fetch.EpochData, arg1 error) *MockfetcherPeerEpochInfoCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherPeerEpochInfoCall) Do(f func(context.Context, p2p.Peer, types.EpochID) (*fetch.EpochData, error)) *fetcherPeerEpochInfoCall { +func (c *MockfetcherPeerEpochInfoCall) Do(f func(context.Context, p2p.Peer, types.EpochID) (*fetch.EpochData, error)) *MockfetcherPeerEpochInfoCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherPeerEpochInfoCall) DoAndReturn(f func(context.Context, p2p.Peer, types.EpochID) (*fetch.EpochData, error)) *fetcherPeerEpochInfoCall { +func (c *MockfetcherPeerEpochInfoCall) DoAndReturn(f func(context.Context, p2p.Peer, types.EpochID) (*fetch.EpochData, error)) *MockfetcherPeerEpochInfoCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1172,31 +1173,31 @@ func (m *Mockfetcher) PeerMeshHashes(arg0 context.Context, arg1 p2p.Peer, arg2 * } // PeerMeshHashes indicates an expected call of PeerMeshHashes. -func (mr *MockfetcherMockRecorder) PeerMeshHashes(arg0, arg1, arg2 any) *fetcherPeerMeshHashesCall { +func (mr *MockfetcherMockRecorder) PeerMeshHashes(arg0, arg1, arg2 any) *MockfetcherPeerMeshHashesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerMeshHashes", reflect.TypeOf((*Mockfetcher)(nil).PeerMeshHashes), arg0, arg1, arg2) - return &fetcherPeerMeshHashesCall{Call: call} + return &MockfetcherPeerMeshHashesCall{Call: call} } -// fetcherPeerMeshHashesCall wrap *gomock.Call -type fetcherPeerMeshHashesCall struct { +// MockfetcherPeerMeshHashesCall wrap *gomock.Call +type MockfetcherPeerMeshHashesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherPeerMeshHashesCall) Return(arg0 *fetch.MeshHashes, arg1 error) *fetcherPeerMeshHashesCall { +func (c *MockfetcherPeerMeshHashesCall) Return(arg0 *fetch.MeshHashes, arg1 error) *MockfetcherPeerMeshHashesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherPeerMeshHashesCall) Do(f func(context.Context, p2p.Peer, *fetch.MeshHashRequest) (*fetch.MeshHashes, error)) *fetcherPeerMeshHashesCall { +func (c *MockfetcherPeerMeshHashesCall) Do(f func(context.Context, p2p.Peer, *fetch.MeshHashRequest) (*fetch.MeshHashes, error)) *MockfetcherPeerMeshHashesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherPeerMeshHashesCall) DoAndReturn(f func(context.Context, p2p.Peer, *fetch.MeshHashRequest) (*fetch.MeshHashes, error)) *fetcherPeerMeshHashesCall { +func (c *MockfetcherPeerMeshHashesCall) DoAndReturn(f func(context.Context, p2p.Peer, *fetch.MeshHashRequest) (*fetch.MeshHashes, error)) *MockfetcherPeerMeshHashesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1208,31 +1209,31 @@ func (m *Mockfetcher) RegisterPeerHashes(peer p2p.Peer, hashes []types.Hash32) { } // RegisterPeerHashes indicates an expected call of RegisterPeerHashes. -func (mr *MockfetcherMockRecorder) RegisterPeerHashes(peer, hashes any) *fetcherRegisterPeerHashesCall { +func (mr *MockfetcherMockRecorder) RegisterPeerHashes(peer, hashes any) *MockfetcherRegisterPeerHashesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeerHashes", reflect.TypeOf((*Mockfetcher)(nil).RegisterPeerHashes), peer, hashes) - return &fetcherRegisterPeerHashesCall{Call: call} + return &MockfetcherRegisterPeerHashesCall{Call: call} } -// fetcherRegisterPeerHashesCall wrap *gomock.Call -type fetcherRegisterPeerHashesCall struct { +// MockfetcherRegisterPeerHashesCall wrap *gomock.Call +type MockfetcherRegisterPeerHashesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherRegisterPeerHashesCall) Return() *fetcherRegisterPeerHashesCall { +func (c *MockfetcherRegisterPeerHashesCall) Return() *MockfetcherRegisterPeerHashesCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *fetcherRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *fetcherRegisterPeerHashesCall { +func (c *MockfetcherRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *MockfetcherRegisterPeerHashesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *fetcherRegisterPeerHashesCall { +func (c *MockfetcherRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *MockfetcherRegisterPeerHashesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1246,31 +1247,31 @@ func (m *Mockfetcher) SelectBestShuffled(arg0 int) []p2p.Peer { } // SelectBestShuffled indicates an expected call of SelectBestShuffled. -func (mr *MockfetcherMockRecorder) SelectBestShuffled(arg0 any) *fetcherSelectBestShuffledCall { +func (mr *MockfetcherMockRecorder) SelectBestShuffled(arg0 any) *MockfetcherSelectBestShuffledCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectBestShuffled", reflect.TypeOf((*Mockfetcher)(nil).SelectBestShuffled), arg0) - return &fetcherSelectBestShuffledCall{Call: call} + return &MockfetcherSelectBestShuffledCall{Call: call} } -// fetcherSelectBestShuffledCall wrap *gomock.Call -type fetcherSelectBestShuffledCall struct { +// MockfetcherSelectBestShuffledCall wrap *gomock.Call +type MockfetcherSelectBestShuffledCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *fetcherSelectBestShuffledCall) Return(arg0 []p2p.Peer) *fetcherSelectBestShuffledCall { +func (c *MockfetcherSelectBestShuffledCall) Return(arg0 []p2p.Peer) *MockfetcherSelectBestShuffledCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *fetcherSelectBestShuffledCall) Do(f func(int) []p2p.Peer) *fetcherSelectBestShuffledCall { +func (c *MockfetcherSelectBestShuffledCall) Do(f func(int) []p2p.Peer) *MockfetcherSelectBestShuffledCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *fetcherSelectBestShuffledCall) DoAndReturn(f func(int) []p2p.Peer) *fetcherSelectBestShuffledCall { +func (c *MockfetcherSelectBestShuffledCall) DoAndReturn(f func(int) []p2p.Peer) *MockfetcherSelectBestShuffledCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1307,31 +1308,31 @@ func (m *MocklayerPatrol) IsHareInCharge(arg0 types.LayerID) bool { } // IsHareInCharge indicates an expected call of IsHareInCharge. -func (mr *MocklayerPatrolMockRecorder) IsHareInCharge(arg0 any) *layerPatrolIsHareInChargeCall { +func (mr *MocklayerPatrolMockRecorder) IsHareInCharge(arg0 any) *MocklayerPatrolIsHareInChargeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsHareInCharge", reflect.TypeOf((*MocklayerPatrol)(nil).IsHareInCharge), arg0) - return &layerPatrolIsHareInChargeCall{Call: call} + return &MocklayerPatrolIsHareInChargeCall{Call: call} } -// layerPatrolIsHareInChargeCall wrap *gomock.Call -type layerPatrolIsHareInChargeCall struct { +// MocklayerPatrolIsHareInChargeCall wrap *gomock.Call +type MocklayerPatrolIsHareInChargeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *layerPatrolIsHareInChargeCall) Return(arg0 bool) *layerPatrolIsHareInChargeCall { +func (c *MocklayerPatrolIsHareInChargeCall) Return(arg0 bool) *MocklayerPatrolIsHareInChargeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *layerPatrolIsHareInChargeCall) Do(f func(types.LayerID) bool) *layerPatrolIsHareInChargeCall { +func (c *MocklayerPatrolIsHareInChargeCall) Do(f func(types.LayerID) bool) *MocklayerPatrolIsHareInChargeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *layerPatrolIsHareInChargeCall) DoAndReturn(f func(types.LayerID) bool) *layerPatrolIsHareInChargeCall { +func (c *MocklayerPatrolIsHareInChargeCall) DoAndReturn(f func(types.LayerID) bool) *MocklayerPatrolIsHareInChargeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1368,31 +1369,31 @@ func (m *MockcertHandler) HandleSyncedCertificate(arg0 context.Context, arg1 typ } // HandleSyncedCertificate indicates an expected call of HandleSyncedCertificate. -func (mr *MockcertHandlerMockRecorder) HandleSyncedCertificate(arg0, arg1, arg2 any) *certHandlerHandleSyncedCertificateCall { +func (mr *MockcertHandlerMockRecorder) HandleSyncedCertificate(arg0, arg1, arg2 any) *MockcertHandlerHandleSyncedCertificateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleSyncedCertificate", reflect.TypeOf((*MockcertHandler)(nil).HandleSyncedCertificate), arg0, arg1, arg2) - return &certHandlerHandleSyncedCertificateCall{Call: call} + return &MockcertHandlerHandleSyncedCertificateCall{Call: call} } -// certHandlerHandleSyncedCertificateCall wrap *gomock.Call -type certHandlerHandleSyncedCertificateCall struct { +// MockcertHandlerHandleSyncedCertificateCall wrap *gomock.Call +type MockcertHandlerHandleSyncedCertificateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *certHandlerHandleSyncedCertificateCall) Return(arg0 error) *certHandlerHandleSyncedCertificateCall { +func (c *MockcertHandlerHandleSyncedCertificateCall) Return(arg0 error) *MockcertHandlerHandleSyncedCertificateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *certHandlerHandleSyncedCertificateCall) Do(f func(context.Context, types.LayerID, *types.Certificate) error) *certHandlerHandleSyncedCertificateCall { +func (c *MockcertHandlerHandleSyncedCertificateCall) Do(f func(context.Context, types.LayerID, *types.Certificate) error) *MockcertHandlerHandleSyncedCertificateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *certHandlerHandleSyncedCertificateCall) DoAndReturn(f func(context.Context, types.LayerID, *types.Certificate) error) *certHandlerHandleSyncedCertificateCall { +func (c *MockcertHandlerHandleSyncedCertificateCall) DoAndReturn(f func(context.Context, types.LayerID, *types.Certificate) error) *MockcertHandlerHandleSyncedCertificateCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1427,31 +1428,31 @@ func (m *MockforkFinder) AddResynced(arg0 types.LayerID, arg1 types.Hash32) { } // AddResynced indicates an expected call of AddResynced. -func (mr *MockforkFinderMockRecorder) AddResynced(arg0, arg1 any) *forkFinderAddResyncedCall { +func (mr *MockforkFinderMockRecorder) AddResynced(arg0, arg1 any) *MockforkFinderAddResyncedCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddResynced", reflect.TypeOf((*MockforkFinder)(nil).AddResynced), arg0, arg1) - return &forkFinderAddResyncedCall{Call: call} + return &MockforkFinderAddResyncedCall{Call: call} } -// forkFinderAddResyncedCall wrap *gomock.Call -type forkFinderAddResyncedCall struct { +// MockforkFinderAddResyncedCall wrap *gomock.Call +type MockforkFinderAddResyncedCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *forkFinderAddResyncedCall) Return() *forkFinderAddResyncedCall { +func (c *MockforkFinderAddResyncedCall) Return() *MockforkFinderAddResyncedCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *forkFinderAddResyncedCall) Do(f func(types.LayerID, types.Hash32)) *forkFinderAddResyncedCall { +func (c *MockforkFinderAddResyncedCall) Do(f func(types.LayerID, types.Hash32)) *MockforkFinderAddResyncedCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *forkFinderAddResyncedCall) DoAndReturn(f func(types.LayerID, types.Hash32)) *forkFinderAddResyncedCall { +func (c *MockforkFinderAddResyncedCall) DoAndReturn(f func(types.LayerID, types.Hash32)) *MockforkFinderAddResyncedCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1466,31 +1467,31 @@ func (m *MockforkFinder) FindFork(arg0 context.Context, arg1 p2p.Peer, arg2 type } // FindFork indicates an expected call of FindFork. -func (mr *MockforkFinderMockRecorder) FindFork(arg0, arg1, arg2, arg3 any) *forkFinderFindForkCall { +func (mr *MockforkFinderMockRecorder) FindFork(arg0, arg1, arg2, arg3 any) *MockforkFinderFindForkCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindFork", reflect.TypeOf((*MockforkFinder)(nil).FindFork), arg0, arg1, arg2, arg3) - return &forkFinderFindForkCall{Call: call} + return &MockforkFinderFindForkCall{Call: call} } -// forkFinderFindForkCall wrap *gomock.Call -type forkFinderFindForkCall struct { +// MockforkFinderFindForkCall wrap *gomock.Call +type MockforkFinderFindForkCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *forkFinderFindForkCall) Return(arg0 types.LayerID, arg1 error) *forkFinderFindForkCall { +func (c *MockforkFinderFindForkCall) Return(arg0 types.LayerID, arg1 error) *MockforkFinderFindForkCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *forkFinderFindForkCall) Do(f func(context.Context, p2p.Peer, types.LayerID, types.Hash32) (types.LayerID, error)) *forkFinderFindForkCall { +func (c *MockforkFinderFindForkCall) Do(f func(context.Context, p2p.Peer, types.LayerID, types.Hash32) (types.LayerID, error)) *MockforkFinderFindForkCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *forkFinderFindForkCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID, types.Hash32) (types.LayerID, error)) *forkFinderFindForkCall { +func (c *MockforkFinderFindForkCall) DoAndReturn(f func(context.Context, p2p.Peer, types.LayerID, types.Hash32) (types.LayerID, error)) *MockforkFinderFindForkCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1504,31 +1505,31 @@ func (m *MockforkFinder) NeedResync(arg0 types.LayerID, arg1 types.Hash32) bool } // NeedResync indicates an expected call of NeedResync. -func (mr *MockforkFinderMockRecorder) NeedResync(arg0, arg1 any) *forkFinderNeedResyncCall { +func (mr *MockforkFinderMockRecorder) NeedResync(arg0, arg1 any) *MockforkFinderNeedResyncCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeedResync", reflect.TypeOf((*MockforkFinder)(nil).NeedResync), arg0, arg1) - return &forkFinderNeedResyncCall{Call: call} + return &MockforkFinderNeedResyncCall{Call: call} } -// forkFinderNeedResyncCall wrap *gomock.Call -type forkFinderNeedResyncCall struct { +// MockforkFinderNeedResyncCall wrap *gomock.Call +type MockforkFinderNeedResyncCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *forkFinderNeedResyncCall) Return(arg0 bool) *forkFinderNeedResyncCall { +func (c *MockforkFinderNeedResyncCall) Return(arg0 bool) *MockforkFinderNeedResyncCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *forkFinderNeedResyncCall) Do(f func(types.LayerID, types.Hash32) bool) *forkFinderNeedResyncCall { +func (c *MockforkFinderNeedResyncCall) Do(f func(types.LayerID, types.Hash32) bool) *MockforkFinderNeedResyncCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *forkFinderNeedResyncCall) DoAndReturn(f func(types.LayerID, types.Hash32) bool) *forkFinderNeedResyncCall { +func (c *MockforkFinderNeedResyncCall) DoAndReturn(f func(types.LayerID, types.Hash32) bool) *MockforkFinderNeedResyncCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1544,32 +1545,32 @@ func (m *MockforkFinder) Purge(arg0 bool, arg1 ...p2p.Peer) { } // Purge indicates an expected call of Purge. -func (mr *MockforkFinderMockRecorder) Purge(arg0 any, arg1 ...any) *forkFinderPurgeCall { +func (mr *MockforkFinderMockRecorder) Purge(arg0 any, arg1 ...any) *MockforkFinderPurgeCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Purge", reflect.TypeOf((*MockforkFinder)(nil).Purge), varargs...) - return &forkFinderPurgeCall{Call: call} + return &MockforkFinderPurgeCall{Call: call} } -// forkFinderPurgeCall wrap *gomock.Call -type forkFinderPurgeCall struct { +// MockforkFinderPurgeCall wrap *gomock.Call +type MockforkFinderPurgeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *forkFinderPurgeCall) Return() *forkFinderPurgeCall { +func (c *MockforkFinderPurgeCall) Return() *MockforkFinderPurgeCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *forkFinderPurgeCall) Do(f func(bool, ...p2p.Peer)) *forkFinderPurgeCall { +func (c *MockforkFinderPurgeCall) Do(f func(bool, ...p2p.Peer)) *MockforkFinderPurgeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *forkFinderPurgeCall) DoAndReturn(f func(bool, ...p2p.Peer)) *forkFinderPurgeCall { +func (c *MockforkFinderPurgeCall) DoAndReturn(f func(bool, ...p2p.Peer)) *MockforkFinderPurgeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1581,31 +1582,31 @@ func (m *MockforkFinder) UpdateAgreement(arg0 p2p.Peer, arg1 types.LayerID, arg2 } // UpdateAgreement indicates an expected call of UpdateAgreement. -func (mr *MockforkFinderMockRecorder) UpdateAgreement(arg0, arg1, arg2, arg3 any) *forkFinderUpdateAgreementCall { +func (mr *MockforkFinderMockRecorder) UpdateAgreement(arg0, arg1, arg2, arg3 any) *MockforkFinderUpdateAgreementCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAgreement", reflect.TypeOf((*MockforkFinder)(nil).UpdateAgreement), arg0, arg1, arg2, arg3) - return &forkFinderUpdateAgreementCall{Call: call} + return &MockforkFinderUpdateAgreementCall{Call: call} } -// forkFinderUpdateAgreementCall wrap *gomock.Call -type forkFinderUpdateAgreementCall struct { +// MockforkFinderUpdateAgreementCall wrap *gomock.Call +type MockforkFinderUpdateAgreementCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *forkFinderUpdateAgreementCall) Return() *forkFinderUpdateAgreementCall { +func (c *MockforkFinderUpdateAgreementCall) Return() *MockforkFinderUpdateAgreementCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *forkFinderUpdateAgreementCall) Do(f func(p2p.Peer, types.LayerID, types.Hash32, time.Time)) *forkFinderUpdateAgreementCall { +func (c *MockforkFinderUpdateAgreementCall) Do(f func(p2p.Peer, types.LayerID, types.Hash32, time.Time)) *MockforkFinderUpdateAgreementCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *forkFinderUpdateAgreementCall) DoAndReturn(f func(p2p.Peer, types.LayerID, types.Hash32, time.Time)) *forkFinderUpdateAgreementCall { +func (c *MockforkFinderUpdateAgreementCall) DoAndReturn(f func(p2p.Peer, types.LayerID, types.Hash32, time.Time)) *MockforkFinderUpdateAgreementCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1643,31 +1644,31 @@ func (m *MockidProvider) IdentityExists(id types.NodeID) (bool, error) { } // IdentityExists indicates an expected call of IdentityExists. -func (mr *MockidProviderMockRecorder) IdentityExists(id any) *idProviderIdentityExistsCall { +func (mr *MockidProviderMockRecorder) IdentityExists(id any) *MockidProviderIdentityExistsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityExists", reflect.TypeOf((*MockidProvider)(nil).IdentityExists), id) - return &idProviderIdentityExistsCall{Call: call} + return &MockidProviderIdentityExistsCall{Call: call} } -// idProviderIdentityExistsCall wrap *gomock.Call -type idProviderIdentityExistsCall struct { +// MockidProviderIdentityExistsCall wrap *gomock.Call +type MockidProviderIdentityExistsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *idProviderIdentityExistsCall) Return(arg0 bool, arg1 error) *idProviderIdentityExistsCall { +func (c *MockidProviderIdentityExistsCall) Return(arg0 bool, arg1 error) *MockidProviderIdentityExistsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *idProviderIdentityExistsCall) Do(f func(types.NodeID) (bool, error)) *idProviderIdentityExistsCall { +func (c *MockidProviderIdentityExistsCall) Do(f func(types.NodeID) (bool, error)) *MockidProviderIdentityExistsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *idProviderIdentityExistsCall) DoAndReturn(f func(types.NodeID) (bool, error)) *idProviderIdentityExistsCall { +func (c *MockidProviderIdentityExistsCall) DoAndReturn(f func(types.NodeID) (bool, error)) *MockidProviderIdentityExistsCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/system/mocks/beacons.go b/system/mocks/beacons.go index a64810e27ec..65fc1ebbfce 100644 --- a/system/mocks/beacons.go +++ b/system/mocks/beacons.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/beacons.go -source=./beacons.go // + // Package mocks is a generated GoMock package. package mocks @@ -46,31 +47,31 @@ func (m *MockBeaconCollector) ReportBeaconFromBallot(arg0 types.EpochID, arg1 *t } // ReportBeaconFromBallot indicates an expected call of ReportBeaconFromBallot. -func (mr *MockBeaconCollectorMockRecorder) ReportBeaconFromBallot(arg0, arg1, arg2, arg3 any) *BeaconCollectorReportBeaconFromBallotCall { +func (mr *MockBeaconCollectorMockRecorder) ReportBeaconFromBallot(arg0, arg1, arg2, arg3 any) *MockBeaconCollectorReportBeaconFromBallotCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportBeaconFromBallot", reflect.TypeOf((*MockBeaconCollector)(nil).ReportBeaconFromBallot), arg0, arg1, arg2, arg3) - return &BeaconCollectorReportBeaconFromBallotCall{Call: call} + return &MockBeaconCollectorReportBeaconFromBallotCall{Call: call} } -// BeaconCollectorReportBeaconFromBallotCall wrap *gomock.Call -type BeaconCollectorReportBeaconFromBallotCall struct { +// MockBeaconCollectorReportBeaconFromBallotCall wrap *gomock.Call +type MockBeaconCollectorReportBeaconFromBallotCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *BeaconCollectorReportBeaconFromBallotCall) Return() *BeaconCollectorReportBeaconFromBallotCall { +func (c *MockBeaconCollectorReportBeaconFromBallotCall) Return() *MockBeaconCollectorReportBeaconFromBallotCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *BeaconCollectorReportBeaconFromBallotCall) Do(f func(types.EpochID, *types.Ballot, types.Beacon, fixed.Fixed)) *BeaconCollectorReportBeaconFromBallotCall { +func (c *MockBeaconCollectorReportBeaconFromBallotCall) Do(f func(types.EpochID, *types.Ballot, types.Beacon, fixed.Fixed)) *MockBeaconCollectorReportBeaconFromBallotCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *BeaconCollectorReportBeaconFromBallotCall) DoAndReturn(f func(types.EpochID, *types.Ballot, types.Beacon, fixed.Fixed)) *BeaconCollectorReportBeaconFromBallotCall { +func (c *MockBeaconCollectorReportBeaconFromBallotCall) DoAndReturn(f func(types.EpochID, *types.Ballot, types.Beacon, fixed.Fixed)) *MockBeaconCollectorReportBeaconFromBallotCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -108,31 +109,31 @@ func (m *MockBeaconGetter) GetBeacon(arg0 types.EpochID) (types.Beacon, error) { } // GetBeacon indicates an expected call of GetBeacon. -func (mr *MockBeaconGetterMockRecorder) GetBeacon(arg0 any) *BeaconGetterGetBeaconCall { +func (mr *MockBeaconGetterMockRecorder) GetBeacon(arg0 any) *MockBeaconGetterGetBeaconCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBeacon", reflect.TypeOf((*MockBeaconGetter)(nil).GetBeacon), arg0) - return &BeaconGetterGetBeaconCall{Call: call} + return &MockBeaconGetterGetBeaconCall{Call: call} } -// BeaconGetterGetBeaconCall wrap *gomock.Call -type BeaconGetterGetBeaconCall struct { +// MockBeaconGetterGetBeaconCall wrap *gomock.Call +type MockBeaconGetterGetBeaconCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *BeaconGetterGetBeaconCall) Return(arg0 types.Beacon, arg1 error) *BeaconGetterGetBeaconCall { +func (c *MockBeaconGetterGetBeaconCall) Return(arg0 types.Beacon, arg1 error) *MockBeaconGetterGetBeaconCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *BeaconGetterGetBeaconCall) Do(f func(types.EpochID) (types.Beacon, error)) *BeaconGetterGetBeaconCall { +func (c *MockBeaconGetterGetBeaconCall) Do(f func(types.EpochID) (types.Beacon, error)) *MockBeaconGetterGetBeaconCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *BeaconGetterGetBeaconCall) DoAndReturn(f func(types.EpochID) (types.Beacon, error)) *BeaconGetterGetBeaconCall { +func (c *MockBeaconGetterGetBeaconCall) DoAndReturn(f func(types.EpochID) (types.Beacon, error)) *MockBeaconGetterGetBeaconCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/system/mocks/fetcher.go b/system/mocks/fetcher.go index 1b4f4fd3bca..fc231df7206 100644 --- a/system/mocks/fetcher.go +++ b/system/mocks/fetcher.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/fetcher.go -source=./fetcher.go // + // Package mocks is a generated GoMock package. package mocks @@ -50,31 +51,31 @@ func (m *MockFetcher) GetActiveSet(arg0 context.Context, arg1 types.Hash32) erro } // GetActiveSet indicates an expected call of GetActiveSet. -func (mr *MockFetcherMockRecorder) GetActiveSet(arg0, arg1 any) *FetcherGetActiveSetCall { +func (mr *MockFetcherMockRecorder) GetActiveSet(arg0, arg1 any) *MockFetcherGetActiveSetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActiveSet", reflect.TypeOf((*MockFetcher)(nil).GetActiveSet), arg0, arg1) - return &FetcherGetActiveSetCall{Call: call} + return &MockFetcherGetActiveSetCall{Call: call} } -// FetcherGetActiveSetCall wrap *gomock.Call -type FetcherGetActiveSetCall struct { +// MockFetcherGetActiveSetCall wrap *gomock.Call +type MockFetcherGetActiveSetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherGetActiveSetCall) Return(arg0 error) *FetcherGetActiveSetCall { +func (c *MockFetcherGetActiveSetCall) Return(arg0 error) *MockFetcherGetActiveSetCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *FetcherGetActiveSetCall) Do(f func(context.Context, types.Hash32) error) *FetcherGetActiveSetCall { +func (c *MockFetcherGetActiveSetCall) Do(f func(context.Context, types.Hash32) error) *MockFetcherGetActiveSetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherGetActiveSetCall) DoAndReturn(f func(context.Context, types.Hash32) error) *FetcherGetActiveSetCall { +func (c *MockFetcherGetActiveSetCall) DoAndReturn(f func(context.Context, types.Hash32) error) *MockFetcherGetActiveSetCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,32 +93,32 @@ func (m *MockFetcher) GetAtxs(arg0 context.Context, arg1 []types.ATXID, arg2 ... } // GetAtxs indicates an expected call of GetAtxs. -func (mr *MockFetcherMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *FetcherGetAtxsCall { +func (mr *MockFetcherMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *MockFetcherGetAtxsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxs", reflect.TypeOf((*MockFetcher)(nil).GetAtxs), varargs...) - return &FetcherGetAtxsCall{Call: call} + return &MockFetcherGetAtxsCall{Call: call} } -// FetcherGetAtxsCall wrap *gomock.Call -type FetcherGetAtxsCall struct { +// MockFetcherGetAtxsCall wrap *gomock.Call +type MockFetcherGetAtxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherGetAtxsCall) Return(arg0 error) *FetcherGetAtxsCall { +func (c *MockFetcherGetAtxsCall) Return(arg0 error) *MockFetcherGetAtxsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *FetcherGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *FetcherGetAtxsCall { +func (c *MockFetcherGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *MockFetcherGetAtxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *FetcherGetAtxsCall { +func (c *MockFetcherGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *MockFetcherGetAtxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,31 +132,31 @@ func (m *MockFetcher) GetBallots(arg0 context.Context, arg1 []types.BallotID) er } // GetBallots indicates an expected call of GetBallots. -func (mr *MockFetcherMockRecorder) GetBallots(arg0, arg1 any) *FetcherGetBallotsCall { +func (mr *MockFetcherMockRecorder) GetBallots(arg0, arg1 any) *MockFetcherGetBallotsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallots", reflect.TypeOf((*MockFetcher)(nil).GetBallots), arg0, arg1) - return &FetcherGetBallotsCall{Call: call} + return &MockFetcherGetBallotsCall{Call: call} } -// FetcherGetBallotsCall wrap *gomock.Call -type FetcherGetBallotsCall struct { +// MockFetcherGetBallotsCall wrap *gomock.Call +type MockFetcherGetBallotsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherGetBallotsCall) Return(arg0 error) *FetcherGetBallotsCall { +func (c *MockFetcherGetBallotsCall) Return(arg0 error) *MockFetcherGetBallotsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *FetcherGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *FetcherGetBallotsCall { +func (c *MockFetcherGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *MockFetcherGetBallotsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *FetcherGetBallotsCall { +func (c *MockFetcherGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *MockFetcherGetBallotsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +170,31 @@ func (m *MockFetcher) GetBlockTxs(arg0 context.Context, arg1 []types.Transaction } // GetBlockTxs indicates an expected call of GetBlockTxs. -func (mr *MockFetcherMockRecorder) GetBlockTxs(arg0, arg1 any) *FetcherGetBlockTxsCall { +func (mr *MockFetcherMockRecorder) GetBlockTxs(arg0, arg1 any) *MockFetcherGetBlockTxsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockTxs", reflect.TypeOf((*MockFetcher)(nil).GetBlockTxs), arg0, arg1) - return &FetcherGetBlockTxsCall{Call: call} + return &MockFetcherGetBlockTxsCall{Call: call} } -// FetcherGetBlockTxsCall wrap *gomock.Call -type FetcherGetBlockTxsCall struct { +// MockFetcherGetBlockTxsCall wrap *gomock.Call +type MockFetcherGetBlockTxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherGetBlockTxsCall) Return(arg0 error) *FetcherGetBlockTxsCall { +func (c *MockFetcherGetBlockTxsCall) Return(arg0 error) *MockFetcherGetBlockTxsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *FetcherGetBlockTxsCall) Do(f func(context.Context, []types.TransactionID) error) *FetcherGetBlockTxsCall { +func (c *MockFetcherGetBlockTxsCall) Do(f func(context.Context, []types.TransactionID) error) *MockFetcherGetBlockTxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherGetBlockTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *FetcherGetBlockTxsCall { +func (c *MockFetcherGetBlockTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *MockFetcherGetBlockTxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -207,31 +208,31 @@ func (m *MockFetcher) GetBlocks(arg0 context.Context, arg1 []types.BlockID) erro } // GetBlocks indicates an expected call of GetBlocks. -func (mr *MockFetcherMockRecorder) GetBlocks(arg0, arg1 any) *FetcherGetBlocksCall { +func (mr *MockFetcherMockRecorder) GetBlocks(arg0, arg1 any) *MockFetcherGetBlocksCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*MockFetcher)(nil).GetBlocks), arg0, arg1) - return &FetcherGetBlocksCall{Call: call} + return &MockFetcherGetBlocksCall{Call: call} } -// FetcherGetBlocksCall wrap *gomock.Call -type FetcherGetBlocksCall struct { +// MockFetcherGetBlocksCall wrap *gomock.Call +type MockFetcherGetBlocksCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherGetBlocksCall) Return(arg0 error) *FetcherGetBlocksCall { +func (c *MockFetcherGetBlocksCall) Return(arg0 error) *MockFetcherGetBlocksCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *FetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *FetcherGetBlocksCall { +func (c *MockFetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *MockFetcherGetBlocksCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *FetcherGetBlocksCall { +func (c *MockFetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *MockFetcherGetBlocksCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -245,31 +246,31 @@ func (m *MockFetcher) GetPoetProof(arg0 context.Context, arg1 types.Hash32) erro } // GetPoetProof indicates an expected call of GetPoetProof. -func (mr *MockFetcherMockRecorder) GetPoetProof(arg0, arg1 any) *FetcherGetPoetProofCall { +func (mr *MockFetcherMockRecorder) GetPoetProof(arg0, arg1 any) *MockFetcherGetPoetProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPoetProof", reflect.TypeOf((*MockFetcher)(nil).GetPoetProof), arg0, arg1) - return &FetcherGetPoetProofCall{Call: call} + return &MockFetcherGetPoetProofCall{Call: call} } -// FetcherGetPoetProofCall wrap *gomock.Call -type FetcherGetPoetProofCall struct { +// MockFetcherGetPoetProofCall wrap *gomock.Call +type MockFetcherGetPoetProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherGetPoetProofCall) Return(arg0 error) *FetcherGetPoetProofCall { +func (c *MockFetcherGetPoetProofCall) Return(arg0 error) *MockFetcherGetPoetProofCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *FetcherGetPoetProofCall) Do(f func(context.Context, types.Hash32) error) *FetcherGetPoetProofCall { +func (c *MockFetcherGetPoetProofCall) Do(f func(context.Context, types.Hash32) error) *MockFetcherGetPoetProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherGetPoetProofCall) DoAndReturn(f func(context.Context, types.Hash32) error) *FetcherGetPoetProofCall { +func (c *MockFetcherGetPoetProofCall) DoAndReturn(f func(context.Context, types.Hash32) error) *MockFetcherGetPoetProofCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -283,31 +284,31 @@ func (m *MockFetcher) GetProposalTxs(arg0 context.Context, arg1 []types.Transact } // GetProposalTxs indicates an expected call of GetProposalTxs. -func (mr *MockFetcherMockRecorder) GetProposalTxs(arg0, arg1 any) *FetcherGetProposalTxsCall { +func (mr *MockFetcherMockRecorder) GetProposalTxs(arg0, arg1 any) *MockFetcherGetProposalTxsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposalTxs", reflect.TypeOf((*MockFetcher)(nil).GetProposalTxs), arg0, arg1) - return &FetcherGetProposalTxsCall{Call: call} + return &MockFetcherGetProposalTxsCall{Call: call} } -// FetcherGetProposalTxsCall wrap *gomock.Call -type FetcherGetProposalTxsCall struct { +// MockFetcherGetProposalTxsCall wrap *gomock.Call +type MockFetcherGetProposalTxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherGetProposalTxsCall) Return(arg0 error) *FetcherGetProposalTxsCall { +func (c *MockFetcherGetProposalTxsCall) Return(arg0 error) *MockFetcherGetProposalTxsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *FetcherGetProposalTxsCall) Do(f func(context.Context, []types.TransactionID) error) *FetcherGetProposalTxsCall { +func (c *MockFetcherGetProposalTxsCall) Do(f func(context.Context, []types.TransactionID) error) *MockFetcherGetProposalTxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherGetProposalTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *FetcherGetProposalTxsCall { +func (c *MockFetcherGetProposalTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *MockFetcherGetProposalTxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -321,31 +322,31 @@ func (m *MockFetcher) GetProposals(arg0 context.Context, arg1 []types.ProposalID } // GetProposals indicates an expected call of GetProposals. -func (mr *MockFetcherMockRecorder) GetProposals(arg0, arg1 any) *FetcherGetProposalsCall { +func (mr *MockFetcherMockRecorder) GetProposals(arg0, arg1 any) *MockFetcherGetProposalsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposals", reflect.TypeOf((*MockFetcher)(nil).GetProposals), arg0, arg1) - return &FetcherGetProposalsCall{Call: call} + return &MockFetcherGetProposalsCall{Call: call} } -// FetcherGetProposalsCall wrap *gomock.Call -type FetcherGetProposalsCall struct { +// MockFetcherGetProposalsCall wrap *gomock.Call +type MockFetcherGetProposalsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherGetProposalsCall) Return(arg0 error) *FetcherGetProposalsCall { +func (c *MockFetcherGetProposalsCall) Return(arg0 error) *MockFetcherGetProposalsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *FetcherGetProposalsCall) Do(f func(context.Context, []types.ProposalID) error) *FetcherGetProposalsCall { +func (c *MockFetcherGetProposalsCall) Do(f func(context.Context, []types.ProposalID) error) *MockFetcherGetProposalsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherGetProposalsCall) DoAndReturn(f func(context.Context, []types.ProposalID) error) *FetcherGetProposalsCall { +func (c *MockFetcherGetProposalsCall) DoAndReturn(f func(context.Context, []types.ProposalID) error) *MockFetcherGetProposalsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -357,31 +358,31 @@ func (m *MockFetcher) RegisterPeerHashes(peer p2p.Peer, hashes []types.Hash32) { } // RegisterPeerHashes indicates an expected call of RegisterPeerHashes. -func (mr *MockFetcherMockRecorder) RegisterPeerHashes(peer, hashes any) *FetcherRegisterPeerHashesCall { +func (mr *MockFetcherMockRecorder) RegisterPeerHashes(peer, hashes any) *MockFetcherRegisterPeerHashesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeerHashes", reflect.TypeOf((*MockFetcher)(nil).RegisterPeerHashes), peer, hashes) - return &FetcherRegisterPeerHashesCall{Call: call} + return &MockFetcherRegisterPeerHashesCall{Call: call} } -// FetcherRegisterPeerHashesCall wrap *gomock.Call -type FetcherRegisterPeerHashesCall struct { +// MockFetcherRegisterPeerHashesCall wrap *gomock.Call +type MockFetcherRegisterPeerHashesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *FetcherRegisterPeerHashesCall) Return() *FetcherRegisterPeerHashesCall { +func (c *MockFetcherRegisterPeerHashesCall) Return() *MockFetcherRegisterPeerHashesCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *FetcherRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *FetcherRegisterPeerHashesCall { +func (c *MockFetcherRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *MockFetcherRegisterPeerHashesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *FetcherRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *FetcherRegisterPeerHashesCall { +func (c *MockFetcherRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *MockFetcherRegisterPeerHashesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -418,31 +419,31 @@ func (m *MockBlockFetcher) GetBlocks(arg0 context.Context, arg1 []types.BlockID) } // GetBlocks indicates an expected call of GetBlocks. -func (mr *MockBlockFetcherMockRecorder) GetBlocks(arg0, arg1 any) *BlockFetcherGetBlocksCall { +func (mr *MockBlockFetcherMockRecorder) GetBlocks(arg0, arg1 any) *MockBlockFetcherGetBlocksCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*MockBlockFetcher)(nil).GetBlocks), arg0, arg1) - return &BlockFetcherGetBlocksCall{Call: call} + return &MockBlockFetcherGetBlocksCall{Call: call} } -// BlockFetcherGetBlocksCall wrap *gomock.Call -type BlockFetcherGetBlocksCall struct { +// MockBlockFetcherGetBlocksCall wrap *gomock.Call +type MockBlockFetcherGetBlocksCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *BlockFetcherGetBlocksCall) Return(arg0 error) *BlockFetcherGetBlocksCall { +func (c *MockBlockFetcherGetBlocksCall) Return(arg0 error) *MockBlockFetcherGetBlocksCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *BlockFetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *BlockFetcherGetBlocksCall { +func (c *MockBlockFetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *MockBlockFetcherGetBlocksCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *BlockFetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *BlockFetcherGetBlocksCall { +func (c *MockBlockFetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *MockBlockFetcherGetBlocksCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -483,32 +484,32 @@ func (m *MockAtxFetcher) GetAtxs(arg0 context.Context, arg1 []types.ATXID, arg2 } // GetAtxs indicates an expected call of GetAtxs. -func (mr *MockAtxFetcherMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *AtxFetcherGetAtxsCall { +func (mr *MockAtxFetcherMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *MockAtxFetcherGetAtxsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1}, arg2...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxs", reflect.TypeOf((*MockAtxFetcher)(nil).GetAtxs), varargs...) - return &AtxFetcherGetAtxsCall{Call: call} + return &MockAtxFetcherGetAtxsCall{Call: call} } -// AtxFetcherGetAtxsCall wrap *gomock.Call -type AtxFetcherGetAtxsCall struct { +// MockAtxFetcherGetAtxsCall wrap *gomock.Call +type MockAtxFetcherGetAtxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *AtxFetcherGetAtxsCall) Return(arg0 error) *AtxFetcherGetAtxsCall { +func (c *MockAtxFetcherGetAtxsCall) Return(arg0 error) *MockAtxFetcherGetAtxsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *AtxFetcherGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *AtxFetcherGetAtxsCall { +func (c *MockAtxFetcherGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *MockAtxFetcherGetAtxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *AtxFetcherGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *AtxFetcherGetAtxsCall { +func (c *MockAtxFetcherGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *MockAtxFetcherGetAtxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -545,31 +546,31 @@ func (m *MockTxFetcher) GetBlockTxs(arg0 context.Context, arg1 []types.Transacti } // GetBlockTxs indicates an expected call of GetBlockTxs. -func (mr *MockTxFetcherMockRecorder) GetBlockTxs(arg0, arg1 any) *TxFetcherGetBlockTxsCall { +func (mr *MockTxFetcherMockRecorder) GetBlockTxs(arg0, arg1 any) *MockTxFetcherGetBlockTxsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockTxs", reflect.TypeOf((*MockTxFetcher)(nil).GetBlockTxs), arg0, arg1) - return &TxFetcherGetBlockTxsCall{Call: call} + return &MockTxFetcherGetBlockTxsCall{Call: call} } -// TxFetcherGetBlockTxsCall wrap *gomock.Call -type TxFetcherGetBlockTxsCall struct { +// MockTxFetcherGetBlockTxsCall wrap *gomock.Call +type MockTxFetcherGetBlockTxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TxFetcherGetBlockTxsCall) Return(arg0 error) *TxFetcherGetBlockTxsCall { +func (c *MockTxFetcherGetBlockTxsCall) Return(arg0 error) *MockTxFetcherGetBlockTxsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TxFetcherGetBlockTxsCall) Do(f func(context.Context, []types.TransactionID) error) *TxFetcherGetBlockTxsCall { +func (c *MockTxFetcherGetBlockTxsCall) Do(f func(context.Context, []types.TransactionID) error) *MockTxFetcherGetBlockTxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TxFetcherGetBlockTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *TxFetcherGetBlockTxsCall { +func (c *MockTxFetcherGetBlockTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *MockTxFetcherGetBlockTxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -583,31 +584,31 @@ func (m *MockTxFetcher) GetProposalTxs(arg0 context.Context, arg1 []types.Transa } // GetProposalTxs indicates an expected call of GetProposalTxs. -func (mr *MockTxFetcherMockRecorder) GetProposalTxs(arg0, arg1 any) *TxFetcherGetProposalTxsCall { +func (mr *MockTxFetcherMockRecorder) GetProposalTxs(arg0, arg1 any) *MockTxFetcherGetProposalTxsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposalTxs", reflect.TypeOf((*MockTxFetcher)(nil).GetProposalTxs), arg0, arg1) - return &TxFetcherGetProposalTxsCall{Call: call} + return &MockTxFetcherGetProposalTxsCall{Call: call} } -// TxFetcherGetProposalTxsCall wrap *gomock.Call -type TxFetcherGetProposalTxsCall struct { +// MockTxFetcherGetProposalTxsCall wrap *gomock.Call +type MockTxFetcherGetProposalTxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TxFetcherGetProposalTxsCall) Return(arg0 error) *TxFetcherGetProposalTxsCall { +func (c *MockTxFetcherGetProposalTxsCall) Return(arg0 error) *MockTxFetcherGetProposalTxsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TxFetcherGetProposalTxsCall) Do(f func(context.Context, []types.TransactionID) error) *TxFetcherGetProposalTxsCall { +func (c *MockTxFetcherGetProposalTxsCall) Do(f func(context.Context, []types.TransactionID) error) *MockTxFetcherGetProposalTxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TxFetcherGetProposalTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *TxFetcherGetProposalTxsCall { +func (c *MockTxFetcherGetProposalTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *MockTxFetcherGetProposalTxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -644,31 +645,31 @@ func (m *MockPoetProofFetcher) GetPoetProof(arg0 context.Context, arg1 types.Has } // GetPoetProof indicates an expected call of GetPoetProof. -func (mr *MockPoetProofFetcherMockRecorder) GetPoetProof(arg0, arg1 any) *PoetProofFetcherGetPoetProofCall { +func (mr *MockPoetProofFetcherMockRecorder) GetPoetProof(arg0, arg1 any) *MockPoetProofFetcherGetPoetProofCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPoetProof", reflect.TypeOf((*MockPoetProofFetcher)(nil).GetPoetProof), arg0, arg1) - return &PoetProofFetcherGetPoetProofCall{Call: call} + return &MockPoetProofFetcherGetPoetProofCall{Call: call} } -// PoetProofFetcherGetPoetProofCall wrap *gomock.Call -type PoetProofFetcherGetPoetProofCall struct { +// MockPoetProofFetcherGetPoetProofCall wrap *gomock.Call +type MockPoetProofFetcherGetPoetProofCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PoetProofFetcherGetPoetProofCall) Return(arg0 error) *PoetProofFetcherGetPoetProofCall { +func (c *MockPoetProofFetcherGetPoetProofCall) Return(arg0 error) *MockPoetProofFetcherGetPoetProofCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *PoetProofFetcherGetPoetProofCall) Do(f func(context.Context, types.Hash32) error) *PoetProofFetcherGetPoetProofCall { +func (c *MockPoetProofFetcherGetPoetProofCall) Do(f func(context.Context, types.Hash32) error) *MockPoetProofFetcherGetPoetProofCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PoetProofFetcherGetPoetProofCall) DoAndReturn(f func(context.Context, types.Hash32) error) *PoetProofFetcherGetPoetProofCall { +func (c *MockPoetProofFetcherGetPoetProofCall) DoAndReturn(f func(context.Context, types.Hash32) error) *MockPoetProofFetcherGetPoetProofCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -705,31 +706,31 @@ func (m *MockBallotFetcher) GetBallots(arg0 context.Context, arg1 []types.Ballot } // GetBallots indicates an expected call of GetBallots. -func (mr *MockBallotFetcherMockRecorder) GetBallots(arg0, arg1 any) *BallotFetcherGetBallotsCall { +func (mr *MockBallotFetcherMockRecorder) GetBallots(arg0, arg1 any) *MockBallotFetcherGetBallotsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallots", reflect.TypeOf((*MockBallotFetcher)(nil).GetBallots), arg0, arg1) - return &BallotFetcherGetBallotsCall{Call: call} + return &MockBallotFetcherGetBallotsCall{Call: call} } -// BallotFetcherGetBallotsCall wrap *gomock.Call -type BallotFetcherGetBallotsCall struct { +// MockBallotFetcherGetBallotsCall wrap *gomock.Call +type MockBallotFetcherGetBallotsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *BallotFetcherGetBallotsCall) Return(arg0 error) *BallotFetcherGetBallotsCall { +func (c *MockBallotFetcherGetBallotsCall) Return(arg0 error) *MockBallotFetcherGetBallotsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *BallotFetcherGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *BallotFetcherGetBallotsCall { +func (c *MockBallotFetcherGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *MockBallotFetcherGetBallotsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *BallotFetcherGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *BallotFetcherGetBallotsCall { +func (c *MockBallotFetcherGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *MockBallotFetcherGetBallotsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -766,31 +767,31 @@ func (m *MockProposalFetcher) GetProposals(arg0 context.Context, arg1 []types.Pr } // GetProposals indicates an expected call of GetProposals. -func (mr *MockProposalFetcherMockRecorder) GetProposals(arg0, arg1 any) *ProposalFetcherGetProposalsCall { +func (mr *MockProposalFetcherMockRecorder) GetProposals(arg0, arg1 any) *MockProposalFetcherGetProposalsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposals", reflect.TypeOf((*MockProposalFetcher)(nil).GetProposals), arg0, arg1) - return &ProposalFetcherGetProposalsCall{Call: call} + return &MockProposalFetcherGetProposalsCall{Call: call} } -// ProposalFetcherGetProposalsCall wrap *gomock.Call -type ProposalFetcherGetProposalsCall struct { +// MockProposalFetcherGetProposalsCall wrap *gomock.Call +type MockProposalFetcherGetProposalsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ProposalFetcherGetProposalsCall) Return(arg0 error) *ProposalFetcherGetProposalsCall { +func (c *MockProposalFetcherGetProposalsCall) Return(arg0 error) *MockProposalFetcherGetProposalsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ProposalFetcherGetProposalsCall) Do(f func(context.Context, []types.ProposalID) error) *ProposalFetcherGetProposalsCall { +func (c *MockProposalFetcherGetProposalsCall) Do(f func(context.Context, []types.ProposalID) error) *MockProposalFetcherGetProposalsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ProposalFetcherGetProposalsCall) DoAndReturn(f func(context.Context, []types.ProposalID) error) *ProposalFetcherGetProposalsCall { +func (c *MockProposalFetcherGetProposalsCall) DoAndReturn(f func(context.Context, []types.ProposalID) error) *MockProposalFetcherGetProposalsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -827,31 +828,31 @@ func (m *MockActiveSetFetcher) GetActiveSet(arg0 context.Context, arg1 types.Has } // GetActiveSet indicates an expected call of GetActiveSet. -func (mr *MockActiveSetFetcherMockRecorder) GetActiveSet(arg0, arg1 any) *ActiveSetFetcherGetActiveSetCall { +func (mr *MockActiveSetFetcherMockRecorder) GetActiveSet(arg0, arg1 any) *MockActiveSetFetcherGetActiveSetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActiveSet", reflect.TypeOf((*MockActiveSetFetcher)(nil).GetActiveSet), arg0, arg1) - return &ActiveSetFetcherGetActiveSetCall{Call: call} + return &MockActiveSetFetcherGetActiveSetCall{Call: call} } -// ActiveSetFetcherGetActiveSetCall wrap *gomock.Call -type ActiveSetFetcherGetActiveSetCall struct { +// MockActiveSetFetcherGetActiveSetCall wrap *gomock.Call +type MockActiveSetFetcherGetActiveSetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ActiveSetFetcherGetActiveSetCall) Return(arg0 error) *ActiveSetFetcherGetActiveSetCall { +func (c *MockActiveSetFetcherGetActiveSetCall) Return(arg0 error) *MockActiveSetFetcherGetActiveSetCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ActiveSetFetcherGetActiveSetCall) Do(f func(context.Context, types.Hash32) error) *ActiveSetFetcherGetActiveSetCall { +func (c *MockActiveSetFetcherGetActiveSetCall) Do(f func(context.Context, types.Hash32) error) *MockActiveSetFetcherGetActiveSetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ActiveSetFetcherGetActiveSetCall) DoAndReturn(f func(context.Context, types.Hash32) error) *ActiveSetFetcherGetActiveSetCall { +func (c *MockActiveSetFetcherGetActiveSetCall) DoAndReturn(f func(context.Context, types.Hash32) error) *MockActiveSetFetcherGetActiveSetCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -886,31 +887,31 @@ func (m *MockPeerTracker) RegisterPeerHashes(peer p2p.Peer, hashes []types.Hash3 } // RegisterPeerHashes indicates an expected call of RegisterPeerHashes. -func (mr *MockPeerTrackerMockRecorder) RegisterPeerHashes(peer, hashes any) *PeerTrackerRegisterPeerHashesCall { +func (mr *MockPeerTrackerMockRecorder) RegisterPeerHashes(peer, hashes any) *MockPeerTrackerRegisterPeerHashesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeerHashes", reflect.TypeOf((*MockPeerTracker)(nil).RegisterPeerHashes), peer, hashes) - return &PeerTrackerRegisterPeerHashesCall{Call: call} + return &MockPeerTrackerRegisterPeerHashesCall{Call: call} } -// PeerTrackerRegisterPeerHashesCall wrap *gomock.Call -type PeerTrackerRegisterPeerHashesCall struct { +// MockPeerTrackerRegisterPeerHashesCall wrap *gomock.Call +type MockPeerTrackerRegisterPeerHashesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *PeerTrackerRegisterPeerHashesCall) Return() *PeerTrackerRegisterPeerHashesCall { +func (c *MockPeerTrackerRegisterPeerHashesCall) Return() *MockPeerTrackerRegisterPeerHashesCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *PeerTrackerRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *PeerTrackerRegisterPeerHashesCall { +func (c *MockPeerTrackerRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *MockPeerTrackerRegisterPeerHashesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *PeerTrackerRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *PeerTrackerRegisterPeerHashesCall { +func (c *MockPeerTrackerRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *MockPeerTrackerRegisterPeerHashesCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/system/mocks/sync.go b/system/mocks/sync.go index 042ba9ea9c8..c3dcda1933b 100644 --- a/system/mocks/sync.go +++ b/system/mocks/sync.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/sync.go -source=./sync.go // + // Package mocks is a generated GoMock package. package mocks @@ -48,31 +49,31 @@ func (m *MockSyncStateProvider) IsBeaconSynced(arg0 types.EpochID) bool { } // IsBeaconSynced indicates an expected call of IsBeaconSynced. -func (mr *MockSyncStateProviderMockRecorder) IsBeaconSynced(arg0 any) *SyncStateProviderIsBeaconSyncedCall { +func (mr *MockSyncStateProviderMockRecorder) IsBeaconSynced(arg0 any) *MockSyncStateProviderIsBeaconSyncedCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsBeaconSynced", reflect.TypeOf((*MockSyncStateProvider)(nil).IsBeaconSynced), arg0) - return &SyncStateProviderIsBeaconSyncedCall{Call: call} + return &MockSyncStateProviderIsBeaconSyncedCall{Call: call} } -// SyncStateProviderIsBeaconSyncedCall wrap *gomock.Call -type SyncStateProviderIsBeaconSyncedCall struct { +// MockSyncStateProviderIsBeaconSyncedCall wrap *gomock.Call +type MockSyncStateProviderIsBeaconSyncedCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SyncStateProviderIsBeaconSyncedCall) Return(arg0 bool) *SyncStateProviderIsBeaconSyncedCall { +func (c *MockSyncStateProviderIsBeaconSyncedCall) Return(arg0 bool) *MockSyncStateProviderIsBeaconSyncedCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SyncStateProviderIsBeaconSyncedCall) Do(f func(types.EpochID) bool) *SyncStateProviderIsBeaconSyncedCall { +func (c *MockSyncStateProviderIsBeaconSyncedCall) Do(f func(types.EpochID) bool) *MockSyncStateProviderIsBeaconSyncedCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SyncStateProviderIsBeaconSyncedCall) DoAndReturn(f func(types.EpochID) bool) *SyncStateProviderIsBeaconSyncedCall { +func (c *MockSyncStateProviderIsBeaconSyncedCall) DoAndReturn(f func(types.EpochID) bool) *MockSyncStateProviderIsBeaconSyncedCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -86,31 +87,31 @@ func (m *MockSyncStateProvider) IsSynced(arg0 context.Context) bool { } // IsSynced indicates an expected call of IsSynced. -func (mr *MockSyncStateProviderMockRecorder) IsSynced(arg0 any) *SyncStateProviderIsSyncedCall { +func (mr *MockSyncStateProviderMockRecorder) IsSynced(arg0 any) *MockSyncStateProviderIsSyncedCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSynced", reflect.TypeOf((*MockSyncStateProvider)(nil).IsSynced), arg0) - return &SyncStateProviderIsSyncedCall{Call: call} + return &MockSyncStateProviderIsSyncedCall{Call: call} } -// SyncStateProviderIsSyncedCall wrap *gomock.Call -type SyncStateProviderIsSyncedCall struct { +// MockSyncStateProviderIsSyncedCall wrap *gomock.Call +type MockSyncStateProviderIsSyncedCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *SyncStateProviderIsSyncedCall) Return(arg0 bool) *SyncStateProviderIsSyncedCall { +func (c *MockSyncStateProviderIsSyncedCall) Return(arg0 bool) *MockSyncStateProviderIsSyncedCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *SyncStateProviderIsSyncedCall) Do(f func(context.Context) bool) *SyncStateProviderIsSyncedCall { +func (c *MockSyncStateProviderIsSyncedCall) Do(f func(context.Context) bool) *MockSyncStateProviderIsSyncedCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *SyncStateProviderIsSyncedCall) DoAndReturn(f func(context.Context) bool) *SyncStateProviderIsSyncedCall { +func (c *MockSyncStateProviderIsSyncedCall) DoAndReturn(f func(context.Context) bool) *MockSyncStateProviderIsSyncedCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/system/mocks/tortoise.go b/system/mocks/tortoise.go index f8c5ee435cb..0c73f1ff852 100644 --- a/system/mocks/tortoise.go +++ b/system/mocks/tortoise.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/tortoise.go -source=./tortoise.go // + // Package mocks is a generated GoMock package. package mocks @@ -49,31 +50,31 @@ func (m *MockTortoise) GetMissingActiveSet(arg0 types.EpochID, arg1 []types.ATXI } // GetMissingActiveSet indicates an expected call of GetMissingActiveSet. -func (mr *MockTortoiseMockRecorder) GetMissingActiveSet(arg0, arg1 any) *TortoiseGetMissingActiveSetCall { +func (mr *MockTortoiseMockRecorder) GetMissingActiveSet(arg0, arg1 any) *MockTortoiseGetMissingActiveSetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMissingActiveSet", reflect.TypeOf((*MockTortoise)(nil).GetMissingActiveSet), arg0, arg1) - return &TortoiseGetMissingActiveSetCall{Call: call} + return &MockTortoiseGetMissingActiveSetCall{Call: call} } -// TortoiseGetMissingActiveSetCall wrap *gomock.Call -type TortoiseGetMissingActiveSetCall struct { +// MockTortoiseGetMissingActiveSetCall wrap *gomock.Call +type MockTortoiseGetMissingActiveSetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseGetMissingActiveSetCall) Return(arg0 []types.ATXID) *TortoiseGetMissingActiveSetCall { +func (c *MockTortoiseGetMissingActiveSetCall) Return(arg0 []types.ATXID) *MockTortoiseGetMissingActiveSetCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseGetMissingActiveSetCall) Do(f func(types.EpochID, []types.ATXID) []types.ATXID) *TortoiseGetMissingActiveSetCall { +func (c *MockTortoiseGetMissingActiveSetCall) Do(f func(types.EpochID, []types.ATXID) []types.ATXID) *MockTortoiseGetMissingActiveSetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseGetMissingActiveSetCall) DoAndReturn(f func(types.EpochID, []types.ATXID) []types.ATXID) *TortoiseGetMissingActiveSetCall { +func (c *MockTortoiseGetMissingActiveSetCall) DoAndReturn(f func(types.EpochID, []types.ATXID) []types.ATXID) *MockTortoiseGetMissingActiveSetCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -87,31 +88,31 @@ func (m *MockTortoise) LatestComplete() types.LayerID { } // LatestComplete indicates an expected call of LatestComplete. -func (mr *MockTortoiseMockRecorder) LatestComplete() *TortoiseLatestCompleteCall { +func (mr *MockTortoiseMockRecorder) LatestComplete() *MockTortoiseLatestCompleteCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestComplete", reflect.TypeOf((*MockTortoise)(nil).LatestComplete)) - return &TortoiseLatestCompleteCall{Call: call} + return &MockTortoiseLatestCompleteCall{Call: call} } -// TortoiseLatestCompleteCall wrap *gomock.Call -type TortoiseLatestCompleteCall struct { +// MockTortoiseLatestCompleteCall wrap *gomock.Call +type MockTortoiseLatestCompleteCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseLatestCompleteCall) Return(arg0 types.LayerID) *TortoiseLatestCompleteCall { +func (c *MockTortoiseLatestCompleteCall) Return(arg0 types.LayerID) *MockTortoiseLatestCompleteCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseLatestCompleteCall) Do(f func() types.LayerID) *TortoiseLatestCompleteCall { +func (c *MockTortoiseLatestCompleteCall) Do(f func() types.LayerID) *MockTortoiseLatestCompleteCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseLatestCompleteCall) DoAndReturn(f func() types.LayerID) *TortoiseLatestCompleteCall { +func (c *MockTortoiseLatestCompleteCall) DoAndReturn(f func() types.LayerID) *MockTortoiseLatestCompleteCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -125,31 +126,31 @@ func (m *MockTortoise) OnApplied(arg0 types.LayerID, arg1 types.Hash32) bool { } // OnApplied indicates an expected call of OnApplied. -func (mr *MockTortoiseMockRecorder) OnApplied(arg0, arg1 any) *TortoiseOnAppliedCall { +func (mr *MockTortoiseMockRecorder) OnApplied(arg0, arg1 any) *MockTortoiseOnAppliedCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnApplied", reflect.TypeOf((*MockTortoise)(nil).OnApplied), arg0, arg1) - return &TortoiseOnAppliedCall{Call: call} + return &MockTortoiseOnAppliedCall{Call: call} } -// TortoiseOnAppliedCall wrap *gomock.Call -type TortoiseOnAppliedCall struct { +// MockTortoiseOnAppliedCall wrap *gomock.Call +type MockTortoiseOnAppliedCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseOnAppliedCall) Return(arg0 bool) *TortoiseOnAppliedCall { +func (c *MockTortoiseOnAppliedCall) Return(arg0 bool) *MockTortoiseOnAppliedCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseOnAppliedCall) Do(f func(types.LayerID, types.Hash32) bool) *TortoiseOnAppliedCall { +func (c *MockTortoiseOnAppliedCall) Do(f func(types.LayerID, types.Hash32) bool) *MockTortoiseOnAppliedCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseOnAppliedCall) DoAndReturn(f func(types.LayerID, types.Hash32) bool) *TortoiseOnAppliedCall { +func (c *MockTortoiseOnAppliedCall) DoAndReturn(f func(types.LayerID, types.Hash32) bool) *MockTortoiseOnAppliedCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -161,31 +162,31 @@ func (m *MockTortoise) OnAtx(arg0 *types.AtxTortoiseData) { } // OnAtx indicates an expected call of OnAtx. -func (mr *MockTortoiseMockRecorder) OnAtx(arg0 any) *TortoiseOnAtxCall { +func (mr *MockTortoiseMockRecorder) OnAtx(arg0 any) *MockTortoiseOnAtxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnAtx", reflect.TypeOf((*MockTortoise)(nil).OnAtx), arg0) - return &TortoiseOnAtxCall{Call: call} + return &MockTortoiseOnAtxCall{Call: call} } -// TortoiseOnAtxCall wrap *gomock.Call -type TortoiseOnAtxCall struct { +// MockTortoiseOnAtxCall wrap *gomock.Call +type MockTortoiseOnAtxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseOnAtxCall) Return() *TortoiseOnAtxCall { +func (c *MockTortoiseOnAtxCall) Return() *MockTortoiseOnAtxCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseOnAtxCall) Do(f func(*types.AtxTortoiseData)) *TortoiseOnAtxCall { +func (c *MockTortoiseOnAtxCall) Do(f func(*types.AtxTortoiseData)) *MockTortoiseOnAtxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseOnAtxCall) DoAndReturn(f func(*types.AtxTortoiseData)) *TortoiseOnAtxCall { +func (c *MockTortoiseOnAtxCall) DoAndReturn(f func(*types.AtxTortoiseData)) *MockTortoiseOnAtxCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -197,31 +198,31 @@ func (m *MockTortoise) OnBlock(arg0 types.BlockHeader) { } // OnBlock indicates an expected call of OnBlock. -func (mr *MockTortoiseMockRecorder) OnBlock(arg0 any) *TortoiseOnBlockCall { +func (mr *MockTortoiseMockRecorder) OnBlock(arg0 any) *MockTortoiseOnBlockCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnBlock", reflect.TypeOf((*MockTortoise)(nil).OnBlock), arg0) - return &TortoiseOnBlockCall{Call: call} + return &MockTortoiseOnBlockCall{Call: call} } -// TortoiseOnBlockCall wrap *gomock.Call -type TortoiseOnBlockCall struct { +// MockTortoiseOnBlockCall wrap *gomock.Call +type MockTortoiseOnBlockCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseOnBlockCall) Return() *TortoiseOnBlockCall { +func (c *MockTortoiseOnBlockCall) Return() *MockTortoiseOnBlockCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseOnBlockCall) Do(f func(types.BlockHeader)) *TortoiseOnBlockCall { +func (c *MockTortoiseOnBlockCall) Do(f func(types.BlockHeader)) *MockTortoiseOnBlockCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseOnBlockCall) DoAndReturn(f func(types.BlockHeader)) *TortoiseOnBlockCall { +func (c *MockTortoiseOnBlockCall) DoAndReturn(f func(types.BlockHeader)) *MockTortoiseOnBlockCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -233,31 +234,31 @@ func (m *MockTortoise) OnHareOutput(arg0 types.LayerID, arg1 types.BlockID) { } // OnHareOutput indicates an expected call of OnHareOutput. -func (mr *MockTortoiseMockRecorder) OnHareOutput(arg0, arg1 any) *TortoiseOnHareOutputCall { +func (mr *MockTortoiseMockRecorder) OnHareOutput(arg0, arg1 any) *MockTortoiseOnHareOutputCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnHareOutput", reflect.TypeOf((*MockTortoise)(nil).OnHareOutput), arg0, arg1) - return &TortoiseOnHareOutputCall{Call: call} + return &MockTortoiseOnHareOutputCall{Call: call} } -// TortoiseOnHareOutputCall wrap *gomock.Call -type TortoiseOnHareOutputCall struct { +// MockTortoiseOnHareOutputCall wrap *gomock.Call +type MockTortoiseOnHareOutputCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseOnHareOutputCall) Return() *TortoiseOnHareOutputCall { +func (c *MockTortoiseOnHareOutputCall) Return() *MockTortoiseOnHareOutputCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseOnHareOutputCall) Do(f func(types.LayerID, types.BlockID)) *TortoiseOnHareOutputCall { +func (c *MockTortoiseOnHareOutputCall) Do(f func(types.LayerID, types.BlockID)) *MockTortoiseOnHareOutputCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseOnHareOutputCall) DoAndReturn(f func(types.LayerID, types.BlockID)) *TortoiseOnHareOutputCall { +func (c *MockTortoiseOnHareOutputCall) DoAndReturn(f func(types.LayerID, types.BlockID)) *MockTortoiseOnHareOutputCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -269,31 +270,31 @@ func (m *MockTortoise) OnMalfeasance(arg0 types.NodeID) { } // OnMalfeasance indicates an expected call of OnMalfeasance. -func (mr *MockTortoiseMockRecorder) OnMalfeasance(arg0 any) *TortoiseOnMalfeasanceCall { +func (mr *MockTortoiseMockRecorder) OnMalfeasance(arg0 any) *MockTortoiseOnMalfeasanceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnMalfeasance", reflect.TypeOf((*MockTortoise)(nil).OnMalfeasance), arg0) - return &TortoiseOnMalfeasanceCall{Call: call} + return &MockTortoiseOnMalfeasanceCall{Call: call} } -// TortoiseOnMalfeasanceCall wrap *gomock.Call -type TortoiseOnMalfeasanceCall struct { +// MockTortoiseOnMalfeasanceCall wrap *gomock.Call +type MockTortoiseOnMalfeasanceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseOnMalfeasanceCall) Return() *TortoiseOnMalfeasanceCall { +func (c *MockTortoiseOnMalfeasanceCall) Return() *MockTortoiseOnMalfeasanceCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseOnMalfeasanceCall) Do(f func(types.NodeID)) *TortoiseOnMalfeasanceCall { +func (c *MockTortoiseOnMalfeasanceCall) Do(f func(types.NodeID)) *MockTortoiseOnMalfeasanceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseOnMalfeasanceCall) DoAndReturn(f func(types.NodeID)) *TortoiseOnMalfeasanceCall { +func (c *MockTortoiseOnMalfeasanceCall) DoAndReturn(f func(types.NodeID)) *MockTortoiseOnMalfeasanceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -305,31 +306,31 @@ func (m *MockTortoise) OnWeakCoin(arg0 types.LayerID, arg1 bool) { } // OnWeakCoin indicates an expected call of OnWeakCoin. -func (mr *MockTortoiseMockRecorder) OnWeakCoin(arg0, arg1 any) *TortoiseOnWeakCoinCall { +func (mr *MockTortoiseMockRecorder) OnWeakCoin(arg0, arg1 any) *MockTortoiseOnWeakCoinCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnWeakCoin", reflect.TypeOf((*MockTortoise)(nil).OnWeakCoin), arg0, arg1) - return &TortoiseOnWeakCoinCall{Call: call} + return &MockTortoiseOnWeakCoinCall{Call: call} } -// TortoiseOnWeakCoinCall wrap *gomock.Call -type TortoiseOnWeakCoinCall struct { +// MockTortoiseOnWeakCoinCall wrap *gomock.Call +type MockTortoiseOnWeakCoinCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseOnWeakCoinCall) Return() *TortoiseOnWeakCoinCall { +func (c *MockTortoiseOnWeakCoinCall) Return() *MockTortoiseOnWeakCoinCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseOnWeakCoinCall) Do(f func(types.LayerID, bool)) *TortoiseOnWeakCoinCall { +func (c *MockTortoiseOnWeakCoinCall) Do(f func(types.LayerID, bool)) *MockTortoiseOnWeakCoinCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseOnWeakCoinCall) DoAndReturn(f func(types.LayerID, bool)) *TortoiseOnWeakCoinCall { +func (c *MockTortoiseOnWeakCoinCall) DoAndReturn(f func(types.LayerID, bool)) *MockTortoiseOnWeakCoinCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -341,31 +342,31 @@ func (m *MockTortoise) TallyVotes(arg0 context.Context, arg1 types.LayerID) { } // TallyVotes indicates an expected call of TallyVotes. -func (mr *MockTortoiseMockRecorder) TallyVotes(arg0, arg1 any) *TortoiseTallyVotesCall { +func (mr *MockTortoiseMockRecorder) TallyVotes(arg0, arg1 any) *MockTortoiseTallyVotesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TallyVotes", reflect.TypeOf((*MockTortoise)(nil).TallyVotes), arg0, arg1) - return &TortoiseTallyVotesCall{Call: call} + return &MockTortoiseTallyVotesCall{Call: call} } -// TortoiseTallyVotesCall wrap *gomock.Call -type TortoiseTallyVotesCall struct { +// MockTortoiseTallyVotesCall wrap *gomock.Call +type MockTortoiseTallyVotesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseTallyVotesCall) Return() *TortoiseTallyVotesCall { +func (c *MockTortoiseTallyVotesCall) Return() *MockTortoiseTallyVotesCall { c.Call = c.Call.Return() return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseTallyVotesCall) Do(f func(context.Context, types.LayerID)) *TortoiseTallyVotesCall { +func (c *MockTortoiseTallyVotesCall) Do(f func(context.Context, types.LayerID)) *MockTortoiseTallyVotesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseTallyVotesCall) DoAndReturn(f func(context.Context, types.LayerID)) *TortoiseTallyVotesCall { +func (c *MockTortoiseTallyVotesCall) DoAndReturn(f func(context.Context, types.LayerID)) *MockTortoiseTallyVotesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -379,31 +380,31 @@ func (m *MockTortoise) Updates() []result.Layer { } // Updates indicates an expected call of Updates. -func (mr *MockTortoiseMockRecorder) Updates() *TortoiseUpdatesCall { +func (mr *MockTortoiseMockRecorder) Updates() *MockTortoiseUpdatesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Updates", reflect.TypeOf((*MockTortoise)(nil).Updates)) - return &TortoiseUpdatesCall{Call: call} + return &MockTortoiseUpdatesCall{Call: call} } -// TortoiseUpdatesCall wrap *gomock.Call -type TortoiseUpdatesCall struct { +// MockTortoiseUpdatesCall wrap *gomock.Call +type MockTortoiseUpdatesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TortoiseUpdatesCall) Return(arg0 []result.Layer) *TortoiseUpdatesCall { +func (c *MockTortoiseUpdatesCall) Return(arg0 []result.Layer) *MockTortoiseUpdatesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TortoiseUpdatesCall) Do(f func() []result.Layer) *TortoiseUpdatesCall { +func (c *MockTortoiseUpdatesCall) Do(f func() []result.Layer) *MockTortoiseUpdatesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TortoiseUpdatesCall) DoAndReturn(f func() []result.Layer) *TortoiseUpdatesCall { +func (c *MockTortoiseUpdatesCall) DoAndReturn(f func() []result.Layer) *MockTortoiseUpdatesCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/system/mocks/vm.go b/system/mocks/vm.go index 5fb300c8fd2..0813bbc9390 100644 --- a/system/mocks/vm.go +++ b/system/mocks/vm.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/vm.go -source=./vm.go // + // Package mocks is a generated GoMock package. package mocks @@ -48,31 +49,31 @@ func (m *MockValidationRequest) Parse() (*types.TxHeader, error) { } // Parse indicates an expected call of Parse. -func (mr *MockValidationRequestMockRecorder) Parse() *ValidationRequestParseCall { +func (mr *MockValidationRequestMockRecorder) Parse() *MockValidationRequestParseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parse", reflect.TypeOf((*MockValidationRequest)(nil).Parse)) - return &ValidationRequestParseCall{Call: call} + return &MockValidationRequestParseCall{Call: call} } -// ValidationRequestParseCall wrap *gomock.Call -type ValidationRequestParseCall struct { +// MockValidationRequestParseCall wrap *gomock.Call +type MockValidationRequestParseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ValidationRequestParseCall) Return(arg0 *types.TxHeader, arg1 error) *ValidationRequestParseCall { +func (c *MockValidationRequestParseCall) Return(arg0 *types.TxHeader, arg1 error) *MockValidationRequestParseCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ValidationRequestParseCall) Do(f func() (*types.TxHeader, error)) *ValidationRequestParseCall { +func (c *MockValidationRequestParseCall) Do(f func() (*types.TxHeader, error)) *MockValidationRequestParseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ValidationRequestParseCall) DoAndReturn(f func() (*types.TxHeader, error)) *ValidationRequestParseCall { +func (c *MockValidationRequestParseCall) DoAndReturn(f func() (*types.TxHeader, error)) *MockValidationRequestParseCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -86,31 +87,31 @@ func (m *MockValidationRequest) Verify() bool { } // Verify indicates an expected call of Verify. -func (mr *MockValidationRequestMockRecorder) Verify() *ValidationRequestVerifyCall { +func (mr *MockValidationRequestMockRecorder) Verify() *MockValidationRequestVerifyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockValidationRequest)(nil).Verify)) - return &ValidationRequestVerifyCall{Call: call} + return &MockValidationRequestVerifyCall{Call: call} } -// ValidationRequestVerifyCall wrap *gomock.Call -type ValidationRequestVerifyCall struct { +// MockValidationRequestVerifyCall wrap *gomock.Call +type MockValidationRequestVerifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ValidationRequestVerifyCall) Return(arg0 bool) *ValidationRequestVerifyCall { +func (c *MockValidationRequestVerifyCall) Return(arg0 bool) *MockValidationRequestVerifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ValidationRequestVerifyCall) Do(f func() bool) *ValidationRequestVerifyCall { +func (c *MockValidationRequestVerifyCall) Do(f func() bool) *MockValidationRequestVerifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ValidationRequestVerifyCall) DoAndReturn(f func() bool) *ValidationRequestVerifyCall { +func (c *MockValidationRequestVerifyCall) DoAndReturn(f func() bool) *MockValidationRequestVerifyCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/systest/tests/distributed_post_verification_test.go b/systest/tests/distributed_post_verification_test.go index 9805c976a8a..1518818609f 100644 --- a/systest/tests/distributed_post_verification_test.go +++ b/systest/tests/distributed_post_verification_test.go @@ -117,7 +117,6 @@ func TestPostMalfeasanceProof(t *testing.T) { // 1. Initialize postSetupMgr, err := activation.NewPostSetupManager( - signer.NodeID(), cfg.POST, logger.Named("post"), datastore.NewCachedDB(sql.InMemory(), log.NewNop()), @@ -135,7 +134,7 @@ func TestPostMalfeasanceProof(t *testing.T) { postSetupMgr, ) require.NoError(t, err) - require.NoError(t, postSupervisor.Start(cfg.SMESHING.Opts)) + require.NoError(t, postSupervisor.Start(cfg.SMESHING.Opts, signer.NodeID())) t.Cleanup(func() { assert.NoError(t, postSupervisor.Stop(false)) }) // 2. create ATX with invalid POST labels diff --git a/timesync/peersync/mocks/mocks.go b/timesync/peersync/mocks/mocks.go index 7d72caeeee4..87f4b9790c6 100644 --- a/timesync/peersync/mocks/mocks.go +++ b/timesync/peersync/mocks/mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./sync.go // + // Package mocks is a generated GoMock package. package mocks @@ -48,31 +49,31 @@ func (m *MockTime) Now() time.Time { } // Now indicates an expected call of Now. -func (mr *MockTimeMockRecorder) Now() *TimeNowCall { +func (mr *MockTimeMockRecorder) Now() *MockTimeNowCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockTime)(nil).Now)) - return &TimeNowCall{Call: call} + return &MockTimeNowCall{Call: call} } -// TimeNowCall wrap *gomock.Call -type TimeNowCall struct { +// MockTimeNowCall wrap *gomock.Call +type MockTimeNowCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TimeNowCall) Return(arg0 time.Time) *TimeNowCall { +func (c *MockTimeNowCall) Return(arg0 time.Time) *MockTimeNowCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TimeNowCall) Do(f func() time.Time) *TimeNowCall { +func (c *MockTimeNowCall) Do(f func() time.Time) *MockTimeNowCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TimeNowCall) DoAndReturn(f func() time.Time) *TimeNowCall { +func (c *MockTimeNowCall) DoAndReturn(f func() time.Time) *MockTimeNowCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -109,31 +110,31 @@ func (m *MockgetPeers) GetPeers() []p2p.Peer { } // GetPeers indicates an expected call of GetPeers. -func (mr *MockgetPeersMockRecorder) GetPeers() *getPeersGetPeersCall { +func (mr *MockgetPeersMockRecorder) GetPeers() *MockgetPeersGetPeersCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPeers", reflect.TypeOf((*MockgetPeers)(nil).GetPeers)) - return &getPeersGetPeersCall{Call: call} + return &MockgetPeersGetPeersCall{Call: call} } -// getPeersGetPeersCall wrap *gomock.Call -type getPeersGetPeersCall struct { +// MockgetPeersGetPeersCall wrap *gomock.Call +type MockgetPeersGetPeersCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *getPeersGetPeersCall) Return(arg0 []p2p.Peer) *getPeersGetPeersCall { +func (c *MockgetPeersGetPeersCall) Return(arg0 []p2p.Peer) *MockgetPeersGetPeersCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *getPeersGetPeersCall) Do(f func() []p2p.Peer) *getPeersGetPeersCall { +func (c *MockgetPeersGetPeersCall) Do(f func() []p2p.Peer) *MockgetPeersGetPeersCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *getPeersGetPeersCall) DoAndReturn(f func() []p2p.Peer) *getPeersGetPeersCall { +func (c *MockgetPeersGetPeersCall) DoAndReturn(f func() []p2p.Peer) *MockgetPeersGetPeersCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/txs/txs_mocks.go b/txs/txs_mocks.go index 02c7c61a510..a5d50b0eb5b 100644 --- a/txs/txs_mocks.go +++ b/txs/txs_mocks.go @@ -5,6 +5,7 @@ // // mockgen -typed -package=txs -destination=./txs_mocks.go -source=./interface.go // + // Package txs is a generated GoMock package. package txs @@ -51,31 +52,31 @@ func (m *MockconservativeState) AddToCache(arg0 context.Context, arg1 *types.Tra } // AddToCache indicates an expected call of AddToCache. -func (mr *MockconservativeStateMockRecorder) AddToCache(arg0, arg1, arg2 any) *conservativeStateAddToCacheCall { +func (mr *MockconservativeStateMockRecorder) AddToCache(arg0, arg1, arg2 any) *MockconservativeStateAddToCacheCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddToCache", reflect.TypeOf((*MockconservativeState)(nil).AddToCache), arg0, arg1, arg2) - return &conservativeStateAddToCacheCall{Call: call} + return &MockconservativeStateAddToCacheCall{Call: call} } -// conservativeStateAddToCacheCall wrap *gomock.Call -type conservativeStateAddToCacheCall struct { +// MockconservativeStateAddToCacheCall wrap *gomock.Call +type MockconservativeStateAddToCacheCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateAddToCacheCall) Return(arg0 error) *conservativeStateAddToCacheCall { +func (c *MockconservativeStateAddToCacheCall) Return(arg0 error) *MockconservativeStateAddToCacheCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateAddToCacheCall) Do(f func(context.Context, *types.Transaction, time.Time) error) *conservativeStateAddToCacheCall { +func (c *MockconservativeStateAddToCacheCall) Do(f func(context.Context, *types.Transaction, time.Time) error) *MockconservativeStateAddToCacheCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateAddToCacheCall) DoAndReturn(f func(context.Context, *types.Transaction, time.Time) error) *conservativeStateAddToCacheCall { +func (c *MockconservativeStateAddToCacheCall) DoAndReturn(f func(context.Context, *types.Transaction, time.Time) error) *MockconservativeStateAddToCacheCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -89,31 +90,31 @@ func (m *MockconservativeState) AddToDB(arg0 *types.Transaction) error { } // AddToDB indicates an expected call of AddToDB. -func (mr *MockconservativeStateMockRecorder) AddToDB(arg0 any) *conservativeStateAddToDBCall { +func (mr *MockconservativeStateMockRecorder) AddToDB(arg0 any) *MockconservativeStateAddToDBCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddToDB", reflect.TypeOf((*MockconservativeState)(nil).AddToDB), arg0) - return &conservativeStateAddToDBCall{Call: call} + return &MockconservativeStateAddToDBCall{Call: call} } -// conservativeStateAddToDBCall wrap *gomock.Call -type conservativeStateAddToDBCall struct { +// MockconservativeStateAddToDBCall wrap *gomock.Call +type MockconservativeStateAddToDBCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateAddToDBCall) Return(arg0 error) *conservativeStateAddToDBCall { +func (c *MockconservativeStateAddToDBCall) Return(arg0 error) *MockconservativeStateAddToDBCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateAddToDBCall) Do(f func(*types.Transaction) error) *conservativeStateAddToDBCall { +func (c *MockconservativeStateAddToDBCall) Do(f func(*types.Transaction) error) *MockconservativeStateAddToDBCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateAddToDBCall) DoAndReturn(f func(*types.Transaction) error) *conservativeStateAddToDBCall { +func (c *MockconservativeStateAddToDBCall) DoAndReturn(f func(*types.Transaction) error) *MockconservativeStateAddToDBCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -128,31 +129,31 @@ func (m *MockconservativeState) GetMeshTransaction(arg0 types.TransactionID) (*t } // GetMeshTransaction indicates an expected call of GetMeshTransaction. -func (mr *MockconservativeStateMockRecorder) GetMeshTransaction(arg0 any) *conservativeStateGetMeshTransactionCall { +func (mr *MockconservativeStateMockRecorder) GetMeshTransaction(arg0 any) *MockconservativeStateGetMeshTransactionCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMeshTransaction", reflect.TypeOf((*MockconservativeState)(nil).GetMeshTransaction), arg0) - return &conservativeStateGetMeshTransactionCall{Call: call} + return &MockconservativeStateGetMeshTransactionCall{Call: call} } -// conservativeStateGetMeshTransactionCall wrap *gomock.Call -type conservativeStateGetMeshTransactionCall struct { +// MockconservativeStateGetMeshTransactionCall wrap *gomock.Call +type MockconservativeStateGetMeshTransactionCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateGetMeshTransactionCall) Return(arg0 *types.MeshTransaction, arg1 error) *conservativeStateGetMeshTransactionCall { +func (c *MockconservativeStateGetMeshTransactionCall) Return(arg0 *types.MeshTransaction, arg1 error) *MockconservativeStateGetMeshTransactionCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateGetMeshTransactionCall) Do(f func(types.TransactionID) (*types.MeshTransaction, error)) *conservativeStateGetMeshTransactionCall { +func (c *MockconservativeStateGetMeshTransactionCall) Do(f func(types.TransactionID) (*types.MeshTransaction, error)) *MockconservativeStateGetMeshTransactionCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateGetMeshTransactionCall) DoAndReturn(f func(types.TransactionID) (*types.MeshTransaction, error)) *conservativeStateGetMeshTransactionCall { +func (c *MockconservativeStateGetMeshTransactionCall) DoAndReturn(f func(types.TransactionID) (*types.MeshTransaction, error)) *MockconservativeStateGetMeshTransactionCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -167,31 +168,31 @@ func (m *MockconservativeState) HasTx(arg0 types.TransactionID) (bool, error) { } // HasTx indicates an expected call of HasTx. -func (mr *MockconservativeStateMockRecorder) HasTx(arg0 any) *conservativeStateHasTxCall { +func (mr *MockconservativeStateMockRecorder) HasTx(arg0 any) *MockconservativeStateHasTxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasTx", reflect.TypeOf((*MockconservativeState)(nil).HasTx), arg0) - return &conservativeStateHasTxCall{Call: call} + return &MockconservativeStateHasTxCall{Call: call} } -// conservativeStateHasTxCall wrap *gomock.Call -type conservativeStateHasTxCall struct { +// MockconservativeStateHasTxCall wrap *gomock.Call +type MockconservativeStateHasTxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateHasTxCall) Return(arg0 bool, arg1 error) *conservativeStateHasTxCall { +func (c *MockconservativeStateHasTxCall) Return(arg0 bool, arg1 error) *MockconservativeStateHasTxCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateHasTxCall) Do(f func(types.TransactionID) (bool, error)) *conservativeStateHasTxCall { +func (c *MockconservativeStateHasTxCall) Do(f func(types.TransactionID) (bool, error)) *MockconservativeStateHasTxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateHasTxCall) DoAndReturn(f func(types.TransactionID) (bool, error)) *conservativeStateHasTxCall { +func (c *MockconservativeStateHasTxCall) DoAndReturn(f func(types.TransactionID) (bool, error)) *MockconservativeStateHasTxCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -205,31 +206,31 @@ func (m *MockconservativeState) Validation(arg0 types.RawTx) system.ValidationRe } // Validation indicates an expected call of Validation. -func (mr *MockconservativeStateMockRecorder) Validation(arg0 any) *conservativeStateValidationCall { +func (mr *MockconservativeStateMockRecorder) Validation(arg0 any) *MockconservativeStateValidationCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validation", reflect.TypeOf((*MockconservativeState)(nil).Validation), arg0) - return &conservativeStateValidationCall{Call: call} + return &MockconservativeStateValidationCall{Call: call} } -// conservativeStateValidationCall wrap *gomock.Call -type conservativeStateValidationCall struct { +// MockconservativeStateValidationCall wrap *gomock.Call +type MockconservativeStateValidationCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conservativeStateValidationCall) Return(arg0 system.ValidationRequest) *conservativeStateValidationCall { +func (c *MockconservativeStateValidationCall) Return(arg0 system.ValidationRequest) *MockconservativeStateValidationCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conservativeStateValidationCall) Do(f func(types.RawTx) system.ValidationRequest) *conservativeStateValidationCall { +func (c *MockconservativeStateValidationCall) Do(f func(types.RawTx) system.ValidationRequest) *MockconservativeStateValidationCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conservativeStateValidationCall) DoAndReturn(f func(types.RawTx) system.ValidationRequest) *conservativeStateValidationCall { +func (c *MockconservativeStateValidationCall) DoAndReturn(f func(types.RawTx) system.ValidationRequest) *MockconservativeStateValidationCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -267,31 +268,31 @@ func (m *MockvmState) GetAllAccounts() ([]*types.Account, error) { } // GetAllAccounts indicates an expected call of GetAllAccounts. -func (mr *MockvmStateMockRecorder) GetAllAccounts() *vmStateGetAllAccountsCall { +func (mr *MockvmStateMockRecorder) GetAllAccounts() *MockvmStateGetAllAccountsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllAccounts", reflect.TypeOf((*MockvmState)(nil).GetAllAccounts)) - return &vmStateGetAllAccountsCall{Call: call} + return &MockvmStateGetAllAccountsCall{Call: call} } -// vmStateGetAllAccountsCall wrap *gomock.Call -type vmStateGetAllAccountsCall struct { +// MockvmStateGetAllAccountsCall wrap *gomock.Call +type MockvmStateGetAllAccountsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateGetAllAccountsCall) Return(arg0 []*types.Account, arg1 error) *vmStateGetAllAccountsCall { +func (c *MockvmStateGetAllAccountsCall) Return(arg0 []*types.Account, arg1 error) *MockvmStateGetAllAccountsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateGetAllAccountsCall) Do(f func() ([]*types.Account, error)) *vmStateGetAllAccountsCall { +func (c *MockvmStateGetAllAccountsCall) Do(f func() ([]*types.Account, error)) *MockvmStateGetAllAccountsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateGetAllAccountsCall) DoAndReturn(f func() ([]*types.Account, error)) *vmStateGetAllAccountsCall { +func (c *MockvmStateGetAllAccountsCall) DoAndReturn(f func() ([]*types.Account, error)) *MockvmStateGetAllAccountsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -306,31 +307,31 @@ func (m *MockvmState) GetBalance(arg0 types.Address) (uint64, error) { } // GetBalance indicates an expected call of GetBalance. -func (mr *MockvmStateMockRecorder) GetBalance(arg0 any) *vmStateGetBalanceCall { +func (mr *MockvmStateMockRecorder) GetBalance(arg0 any) *MockvmStateGetBalanceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockvmState)(nil).GetBalance), arg0) - return &vmStateGetBalanceCall{Call: call} + return &MockvmStateGetBalanceCall{Call: call} } -// vmStateGetBalanceCall wrap *gomock.Call -type vmStateGetBalanceCall struct { +// MockvmStateGetBalanceCall wrap *gomock.Call +type MockvmStateGetBalanceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateGetBalanceCall) Return(arg0 uint64, arg1 error) *vmStateGetBalanceCall { +func (c *MockvmStateGetBalanceCall) Return(arg0 uint64, arg1 error) *MockvmStateGetBalanceCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateGetBalanceCall) Do(f func(types.Address) (uint64, error)) *vmStateGetBalanceCall { +func (c *MockvmStateGetBalanceCall) Do(f func(types.Address) (uint64, error)) *MockvmStateGetBalanceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateGetBalanceCall) DoAndReturn(f func(types.Address) (uint64, error)) *vmStateGetBalanceCall { +func (c *MockvmStateGetBalanceCall) DoAndReturn(f func(types.Address) (uint64, error)) *MockvmStateGetBalanceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -345,31 +346,31 @@ func (m *MockvmState) GetLayerApplied(arg0 types.TransactionID) (types.LayerID, } // GetLayerApplied indicates an expected call of GetLayerApplied. -func (mr *MockvmStateMockRecorder) GetLayerApplied(arg0 any) *vmStateGetLayerAppliedCall { +func (mr *MockvmStateMockRecorder) GetLayerApplied(arg0 any) *MockvmStateGetLayerAppliedCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerApplied", reflect.TypeOf((*MockvmState)(nil).GetLayerApplied), arg0) - return &vmStateGetLayerAppliedCall{Call: call} + return &MockvmStateGetLayerAppliedCall{Call: call} } -// vmStateGetLayerAppliedCall wrap *gomock.Call -type vmStateGetLayerAppliedCall struct { +// MockvmStateGetLayerAppliedCall wrap *gomock.Call +type MockvmStateGetLayerAppliedCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateGetLayerAppliedCall) Return(arg0 types.LayerID, arg1 error) *vmStateGetLayerAppliedCall { +func (c *MockvmStateGetLayerAppliedCall) Return(arg0 types.LayerID, arg1 error) *MockvmStateGetLayerAppliedCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateGetLayerAppliedCall) Do(f func(types.TransactionID) (types.LayerID, error)) *vmStateGetLayerAppliedCall { +func (c *MockvmStateGetLayerAppliedCall) Do(f func(types.TransactionID) (types.LayerID, error)) *MockvmStateGetLayerAppliedCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateGetLayerAppliedCall) DoAndReturn(f func(types.TransactionID) (types.LayerID, error)) *vmStateGetLayerAppliedCall { +func (c *MockvmStateGetLayerAppliedCall) DoAndReturn(f func(types.TransactionID) (types.LayerID, error)) *MockvmStateGetLayerAppliedCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -384,31 +385,31 @@ func (m *MockvmState) GetLayerStateRoot(arg0 types.LayerID) (types.Hash32, error } // GetLayerStateRoot indicates an expected call of GetLayerStateRoot. -func (mr *MockvmStateMockRecorder) GetLayerStateRoot(arg0 any) *vmStateGetLayerStateRootCall { +func (mr *MockvmStateMockRecorder) GetLayerStateRoot(arg0 any) *MockvmStateGetLayerStateRootCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerStateRoot", reflect.TypeOf((*MockvmState)(nil).GetLayerStateRoot), arg0) - return &vmStateGetLayerStateRootCall{Call: call} + return &MockvmStateGetLayerStateRootCall{Call: call} } -// vmStateGetLayerStateRootCall wrap *gomock.Call -type vmStateGetLayerStateRootCall struct { +// MockvmStateGetLayerStateRootCall wrap *gomock.Call +type MockvmStateGetLayerStateRootCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateGetLayerStateRootCall) Return(arg0 types.Hash32, arg1 error) *vmStateGetLayerStateRootCall { +func (c *MockvmStateGetLayerStateRootCall) Return(arg0 types.Hash32, arg1 error) *MockvmStateGetLayerStateRootCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateGetLayerStateRootCall) Do(f func(types.LayerID) (types.Hash32, error)) *vmStateGetLayerStateRootCall { +func (c *MockvmStateGetLayerStateRootCall) Do(f func(types.LayerID) (types.Hash32, error)) *MockvmStateGetLayerStateRootCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateGetLayerStateRootCall) DoAndReturn(f func(types.LayerID) (types.Hash32, error)) *vmStateGetLayerStateRootCall { +func (c *MockvmStateGetLayerStateRootCall) DoAndReturn(f func(types.LayerID) (types.Hash32, error)) *MockvmStateGetLayerStateRootCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -423,31 +424,31 @@ func (m *MockvmState) GetNonce(arg0 types.Address) (types.Nonce, error) { } // GetNonce indicates an expected call of GetNonce. -func (mr *MockvmStateMockRecorder) GetNonce(arg0 any) *vmStateGetNonceCall { +func (mr *MockvmStateMockRecorder) GetNonce(arg0 any) *MockvmStateGetNonceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNonce", reflect.TypeOf((*MockvmState)(nil).GetNonce), arg0) - return &vmStateGetNonceCall{Call: call} + return &MockvmStateGetNonceCall{Call: call} } -// vmStateGetNonceCall wrap *gomock.Call -type vmStateGetNonceCall struct { +// MockvmStateGetNonceCall wrap *gomock.Call +type MockvmStateGetNonceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateGetNonceCall) Return(arg0 types.Nonce, arg1 error) *vmStateGetNonceCall { +func (c *MockvmStateGetNonceCall) Return(arg0 types.Nonce, arg1 error) *MockvmStateGetNonceCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateGetNonceCall) Do(f func(types.Address) (types.Nonce, error)) *vmStateGetNonceCall { +func (c *MockvmStateGetNonceCall) Do(f func(types.Address) (types.Nonce, error)) *MockvmStateGetNonceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateGetNonceCall) DoAndReturn(f func(types.Address) (types.Nonce, error)) *vmStateGetNonceCall { +func (c *MockvmStateGetNonceCall) DoAndReturn(f func(types.Address) (types.Nonce, error)) *MockvmStateGetNonceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -462,31 +463,31 @@ func (m *MockvmState) GetStateRoot() (types.Hash32, error) { } // GetStateRoot indicates an expected call of GetStateRoot. -func (mr *MockvmStateMockRecorder) GetStateRoot() *vmStateGetStateRootCall { +func (mr *MockvmStateMockRecorder) GetStateRoot() *MockvmStateGetStateRootCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStateRoot", reflect.TypeOf((*MockvmState)(nil).GetStateRoot)) - return &vmStateGetStateRootCall{Call: call} + return &MockvmStateGetStateRootCall{Call: call} } -// vmStateGetStateRootCall wrap *gomock.Call -type vmStateGetStateRootCall struct { +// MockvmStateGetStateRootCall wrap *gomock.Call +type MockvmStateGetStateRootCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateGetStateRootCall) Return(arg0 types.Hash32, arg1 error) *vmStateGetStateRootCall { +func (c *MockvmStateGetStateRootCall) Return(arg0 types.Hash32, arg1 error) *MockvmStateGetStateRootCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateGetStateRootCall) Do(f func() (types.Hash32, error)) *vmStateGetStateRootCall { +func (c *MockvmStateGetStateRootCall) Do(f func() (types.Hash32, error)) *MockvmStateGetStateRootCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateGetStateRootCall) DoAndReturn(f func() (types.Hash32, error)) *vmStateGetStateRootCall { +func (c *MockvmStateGetStateRootCall) DoAndReturn(f func() (types.Hash32, error)) *MockvmStateGetStateRootCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -500,31 +501,31 @@ func (m *MockvmState) Validation(arg0 types.RawTx) system.ValidationRequest { } // Validation indicates an expected call of Validation. -func (mr *MockvmStateMockRecorder) Validation(arg0 any) *vmStateValidationCall { +func (mr *MockvmStateMockRecorder) Validation(arg0 any) *MockvmStateValidationCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validation", reflect.TypeOf((*MockvmState)(nil).Validation), arg0) - return &vmStateValidationCall{Call: call} + return &MockvmStateValidationCall{Call: call} } -// vmStateValidationCall wrap *gomock.Call -type vmStateValidationCall struct { +// MockvmStateValidationCall wrap *gomock.Call +type MockvmStateValidationCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *vmStateValidationCall) Return(arg0 system.ValidationRequest) *vmStateValidationCall { +func (c *MockvmStateValidationCall) Return(arg0 system.ValidationRequest) *MockvmStateValidationCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *vmStateValidationCall) Do(f func(types.RawTx) system.ValidationRequest) *vmStateValidationCall { +func (c *MockvmStateValidationCall) Do(f func(types.RawTx) system.ValidationRequest) *MockvmStateValidationCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *vmStateValidationCall) DoAndReturn(f func(types.RawTx) system.ValidationRequest) *vmStateValidationCall { +func (c *MockvmStateValidationCall) DoAndReturn(f func(types.RawTx) system.ValidationRequest) *MockvmStateValidationCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -561,31 +562,31 @@ func (m *MockconStateCache) GetMempool(arg0 log.Log) map[types.Address][]*NanoTX } // GetMempool indicates an expected call of GetMempool. -func (mr *MockconStateCacheMockRecorder) GetMempool(arg0 any) *conStateCacheGetMempoolCall { +func (mr *MockconStateCacheMockRecorder) GetMempool(arg0 any) *MockconStateCacheGetMempoolCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMempool", reflect.TypeOf((*MockconStateCache)(nil).GetMempool), arg0) - return &conStateCacheGetMempoolCall{Call: call} + return &MockconStateCacheGetMempoolCall{Call: call} } -// conStateCacheGetMempoolCall wrap *gomock.Call -type conStateCacheGetMempoolCall struct { +// MockconStateCacheGetMempoolCall wrap *gomock.Call +type MockconStateCacheGetMempoolCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *conStateCacheGetMempoolCall) Return(arg0 map[types.Address][]*NanoTX) *conStateCacheGetMempoolCall { +func (c *MockconStateCacheGetMempoolCall) Return(arg0 map[types.Address][]*NanoTX) *MockconStateCacheGetMempoolCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *conStateCacheGetMempoolCall) Do(f func(log.Log) map[types.Address][]*NanoTX) *conStateCacheGetMempoolCall { +func (c *MockconStateCacheGetMempoolCall) Do(f func(log.Log) map[types.Address][]*NanoTX) *MockconStateCacheGetMempoolCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *conStateCacheGetMempoolCall) DoAndReturn(f func(log.Log) map[types.Address][]*NanoTX) *conStateCacheGetMempoolCall { +func (c *MockconStateCacheGetMempoolCall) DoAndReturn(f func(log.Log) map[types.Address][]*NanoTX) *MockconStateCacheGetMempoolCall { c.Call = c.Call.DoAndReturn(f) return c } From 196c9bbc940db3951253f8882fa83babec7f3454 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Wed, 21 Feb 2024 23:50:00 +0000 Subject: [PATCH 3/6] Load multiple identities during startup --- malfeasance/handler.go | 9 +- malfeasance/handler_test.go | 24 ++-- node/node.go | 267 +++++++++++++++++++++++++++--------- node/node_test.go | 69 +++++----- node/test_network.go | 3 +- 5 files changed, 261 insertions(+), 111 deletions(-) diff --git a/malfeasance/handler.go b/malfeasance/handler.go index 08ac99820fc..99353b092f1 100644 --- a/malfeasance/handler.go +++ b/malfeasance/handler.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "slices" "time" "github.com/spacemeshos/post/shared" @@ -33,7 +34,7 @@ type Handler struct { logger log.Log cdb *datastore.CachedDB self p2p.Peer - nodeID types.NodeID + nodeIDs []types.NodeID edVerifier SigVerifier tortoise tortoise postVerifier postVerifier @@ -43,7 +44,7 @@ func NewHandler( cdb *datastore.CachedDB, lg log.Log, self p2p.Peer, - nodeID types.NodeID, + nodeID []types.NodeID, edVerifier SigVerifier, tortoise tortoise, postVerifier postVerifier, @@ -52,7 +53,7 @@ func NewHandler( logger: lg, cdb: cdb, self: self, - nodeID: nodeID, + nodeIDs: nodeID, edVerifier: edVerifier, tortoise: tortoise, postVerifier: postVerifier, @@ -62,7 +63,7 @@ func NewHandler( func (h *Handler) reportMalfeasance(smesher types.NodeID, mp *types.MalfeasanceProof) { h.tortoise.OnMalfeasance(smesher) events.ReportMalfeasance(smesher, mp) - if h.nodeID == smesher { + if slices.Contains(h.nodeIDs, smesher) { events.EmitOwnMalfeasanceProof(smesher, mp) } } diff --git a/malfeasance/handler_test.go b/malfeasance/handler_test.go index 392306fd4e8..522ce5bbc5a 100644 --- a/malfeasance/handler_test.go +++ b/malfeasance/handler_test.go @@ -56,7 +56,7 @@ func TestHandler_HandleMalfeasanceProof_multipleATXs(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -270,7 +270,7 @@ func TestHandler_HandleMalfeasanceProof_multipleBallots(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -491,7 +491,7 @@ func TestHandler_HandleMalfeasanceProof_hareEquivocation(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -727,7 +727,7 @@ func TestHandler_HandleMalfeasanceProof_validateHare(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -789,7 +789,7 @@ func TestHandler_CrossDomain(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -853,7 +853,7 @@ func TestHandler_HandleSyncedMalfeasanceProof_multipleATXs(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -916,7 +916,7 @@ func TestHandler_HandleSyncedMalfeasanceProof_multipleBallots(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -978,7 +978,7 @@ func TestHandler_HandleSyncedMalfeasanceProof_hareEquivocation(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -1043,7 +1043,7 @@ func TestHandler_HandleSyncedMalfeasanceProof_wrongHash(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -1125,7 +1125,7 @@ func TestHandler_HandleMalfeasanceProof_InvalidPostIndex(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -1162,7 +1162,7 @@ func TestHandler_HandleMalfeasanceProof_InvalidPostIndex(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, @@ -1198,7 +1198,7 @@ func TestHandler_HandleMalfeasanceProof_InvalidPostIndex(t *testing.T) { datastore.NewCachedDB(db, lg), lg, "self", - types.EmptyNodeID, + []types.NodeID{types.RandomNodeID()}, signing.NewEdVerifier(), trt, postVerifier, diff --git a/node/node.go b/node/node.go index ba97599be27..d7d725f0bbf 100644 --- a/node/node.go +++ b/node/node.go @@ -7,6 +7,8 @@ import ( "encoding/hex" "errors" "fmt" + "io" + "io/fs" "net" "net/http" "net/url" @@ -84,7 +86,10 @@ import ( ) const ( - edKeyFileName = "key.bin" + legacyKeyFileName = "key.bin" + keyDir = "identities" + defaultKeyFileName = "identity.key" + genesisFileName = "genesis.json" dbFile = "state.sql" localDbFile = "node_state.sql" @@ -178,10 +183,20 @@ func GetCommand() *cobra.Command { return fmt.Errorf("initializing app: %w", err) } - /* Create or load miner identity */ + // Migrate legacy identity to new location + if err := app.MigrateExistingIdentity(); err != nil { + return fmt.Errorf("migrating existing identity: %w", err) + } + var err error - if app.edSgn, err = app.LoadOrCreateEdSigner(); err != nil { - return fmt.Errorf("could not retrieve identity: %w", err) + if app.signers, err = app.TestIdentity(); err != nil { + return fmt.Errorf("testing identity: %w", err) + } + + if app.signers == nil { + if app.signers, err = app.LoadIdentities(); err != nil { + return err + } } // Don't print usage on error from this point forward @@ -353,7 +368,7 @@ func New(opts ...Option) *App { type App struct { *cobra.Command fileLock *flock.Flock - edSgn *signing.EdSigner + signers []*signing.EdSigner Config *config.Config db *sql.Database cachedDB *datastore.CachedDB @@ -420,9 +435,10 @@ func (app *App) LoadCheckpoint(ctx context.Context) (*checkpoint.PreservedData, DbFile: dbFile, LocalDbFile: localDbFile, PreserveOwnAtx: app.Config.Recovery.PreserveOwnAtx, - NodeID: app.edSgn.NodeID(), - Uri: checkpointFile, - Restore: restore, + // TODO(mafa): FIXXME! + // NodeID: app.edSgn.NodeID(), + Uri: checkpointFile, + Restore: restore, } app.log.WithContext(ctx).With().Info("recover from checkpoint", log.String("url", checkpointFile), @@ -588,12 +604,18 @@ func (app *App) initServices(ctx context.Context) error { poetDb := activation.NewPoetDb(app.db, app.addLogger(PoetDbLogger, lg)) + opts := []activation.PostVerifierOpt{ + activation.WithVerifyingOpts(app.Config.SMESHING.VerifyingOpts), + activation.WithAutoscaling(), + } + for _, sig := range app.signers { + opts = append(opts, activation.WithPrioritizedID(sig.NodeID())) + } + verifier, err := activation.NewPostVerifier( app.Config.POST, app.addLogger(NipostValidatorLogger, lg).Zap(), - activation.WithVerifyingOpts(app.Config.SMESHING.VerifyingOpts), - activation.WithPrioritizedID(app.edSgn.NodeID()), - activation.WithAutoscaling(), + opts..., ) if err != nil { return fmt.Errorf("creating post verifier: %w", err) @@ -659,7 +681,9 @@ func (app *App) initServices(ctx context.Context) error { beacon.WithConfig(app.Config.Beacon), beacon.WithLogger(app.addLogger(BeaconLogger, lg)), ) - beaconProtocol.Register(app.edSgn) + for _, sig := range app.signers { + beaconProtocol.Register(sig) + } trtlCfg := app.Config.Tortoise trtlCfg.LayerSize = layerSize @@ -732,7 +756,9 @@ func (app *App) initServices(ctx context.Context) error { trtl, app.addLogger(ATXHandlerLogger, lg), ) - atxHandler.Register(app.edSgn) + for _, sig := range app.signers { + atxHandler.Register(sig) + } // we can't have an epoch offset which is greater/equal than the number of layers in an epoch @@ -813,7 +839,9 @@ func (app *App) initServices(ctx context.Context) error { blocks.WithCertConfig(app.Config.Certificate), blocks.WithCertifierLogger(app.addLogger(BlockCertLogger, lg)), ) - app.certifier.Register(app.edSgn) + for _, sig := range app.signers { + app.certifier.Register(sig) + } flog := app.addLogger(Fetcher, lg) fetcher := fetch.NewFetch(app.cachedDB, app.host, @@ -858,7 +886,9 @@ func (app *App) initServices(ctx context.Context) error { hare3.WithLogger(logger), hare3.WithConfig(app.Config.HARE3), ) - app.hare3.Register(app.edSgn) + for _, sig := range app.signers { + app.hare3.Register(sig) + } app.hare3.Start() app.eg.Go(func() error { compat.ReportWeakcoin( @@ -906,7 +936,9 @@ func (app *App) initServices(ctx context.Context) error { miner.WithMinGoodAtxPercent(minerGoodAtxPct), miner.WithLogger(app.addLogger(ProposalBuilderLogger, lg)), ) - proposalBuilder.Register(app.edSgn) + for _, sig := range app.signers { + proposalBuilder.Register(sig) + } host, port, err := net.SplitHostPort(app.Config.API.PostListener) if err != nil { @@ -979,13 +1011,19 @@ func (app *App) initServices(ctx context.Context) error { activation.WithValidator(app.validator), activation.WithPostValidityDelay(app.Config.PostValidDelay), ) - atxBuilder.Register(app.edSgn) + for _, sig := range app.signers { + atxBuilder.Register(sig) + } + nodeIDs := make([]types.NodeID, 0, len(app.signers)) + for _, s := range app.signers { + nodeIDs = append(nodeIDs, s.NodeID()) + } malfeasanceHandler := malfeasance.NewHandler( app.cachedDB, app.addLogger(MalfeasanceLogger, lg), app.host.ID(), - app.edSgn.NodeID(), + nodeIDs, app.edVerifier, trtl, app.postVerifier, @@ -1275,7 +1313,10 @@ func (app *App) startServices(ctx context.Context) error { if app.Config.SMESHING.CoinbaseAccount == "" { return fmt.Errorf("smeshing enabled but no coinbase account provided") } - if err := app.postSupervisor.Start(app.Config.SMESHING.Opts, app.edSgn.NodeID()); err != nil { + if len(app.signers) > 1 { + return fmt.Errorf("supervised smeshing cannot be started in a multi-smeshing setup") + } + if err := app.postSupervisor.Start(app.Config.SMESHING.Opts, app.signers[0].NodeID()); err != nil { return fmt.Errorf("start post service: %w", err) } } else { @@ -1336,12 +1377,16 @@ func (app *App) grpcService(svc grpcserver.Service, lg log.Log) (grpcserver.Serv app.grpcServices[svc] = service return service, nil case grpcserver.Smesher: - nodeID := app.edSgn.NodeID() + var nodeID *types.NodeID + if len(app.signers) == 1 { + nodeID = new(types.NodeID) + *nodeID = app.signers[0].NodeID() + } service := grpcserver.NewSmesherService( app.atxBuilder, app.postSupervisor, app.Config.API.SmesherStreamInterval, - &nodeID, + nodeID, app.Config.SMESHING.Opts, ) app.grpcServices[svc] = service @@ -1620,62 +1665,160 @@ func (app *App) stopServices(ctx context.Context) { grpczap.SetGrpcLoggerV2(grpclog, log.NewNop().Zap()) } -// LoadOrCreateEdSigner either loads a previously created ed identity for the node or creates a new one if not exists. -func (app *App) LoadOrCreateEdSigner() (*signing.EdSigner, error) { - filename := filepath.Join(app.Config.SMESHING.Opts.DataDir, edKeyFileName) - app.log.Info("Looking for identity file at `%v`", filename) +// TestIdentity loads a pre-configured identity for testing purposes. +func (app *App) TestIdentity() ([]*signing.EdSigner, error) { + if len(app.Config.TestConfig.SmesherKey) == 0 { + return nil, nil + } + + app.log.With().Error("!!!TESTING!!! using pre-configured smesher key") + dst, err := hex.DecodeString(app.Config.TestConfig.SmesherKey) + if err != nil { + return nil, fmt.Errorf("decoding private key: %w", err) + } + if len(dst) != signing.PrivateKeySize { + return nil, fmt.Errorf("invalid key size %d/%d", dst, signing.PrivateKeySize) + } + signer, err := signing.NewEdSigner( + signing.WithPrivateKey(dst), + signing.WithPrefix(app.Config.Genesis.GenesisID().Bytes()), + ) + if err != nil { + return nil, fmt.Errorf("failed to construct identity from data file: %w", err) + } + + app.log.With().Info("Loaded testing identity", signer.PublicKey()) + return []*signing.EdSigner{signer}, nil +} + +// MigrateExistingIdentity migrates the legacy identity file to the new location. +// +// The legacy identity file is expected to be located at `app.Config.SMESHING.Opts.DataDir/key.bin`. +// +// TODO(mafa): this can be removed in a future version when the legacy identity file is no longer expected to exist. +func (app *App) MigrateExistingIdentity() error { + oldKey := filepath.Join(app.Config.SMESHING.Opts.DataDir, legacyKeyFileName) + app.log.Info("Looking for legacy identity file at `%v`", oldKey) - var data []byte - if len(app.Config.TestConfig.SmesherKey) > 0 { - app.log.With().Error("!!!TESTING!!! using pre-configured smesher key") - data = []byte(app.Config.TestConfig.SmesherKey) - } else { - var err error - data, err = os.ReadFile(filename) + src, err := os.Open(oldKey) + if err != nil { + if os.IsNotExist(err) { + app.log.Info("Legacy identity file not found.") + return nil + } + return fmt.Errorf("failed to read legacy identity file: %w", err) + } + defer src.Close() + + newKey := filepath.Join(app.Config.DataDir(), keyDir, defaultKeyFileName) + if err := os.MkdirAll(filepath.Dir(newKey), 0o700); err != nil { + return fmt.Errorf("failed to create directory for identity file: %w", err) + } + + dst, err := os.Create(newKey) + if err != nil { + return fmt.Errorf("failed to create new identity file: %w", err) + } + defer dst.Close() + + if _, err := io.Copy(dst, src); err != nil { + return fmt.Errorf("failed to copy identity file: %w", err) + } + + if err := src.Close(); err != nil { + return fmt.Errorf("failed to close legacy identity file: %w", err) + } + + if err := os.Rename(oldKey, oldKey+".bak"); err != nil { + return fmt.Errorf("failed to rename legacy identity file: %w", err) + } + + app.log.Info("Migrated legacy identity file to `%v`", newKey) + return nil +} + +// LoadIdentities loads all existing identities from the config directory. +func (app *App) LoadIdentities() ([]*signing.EdSigner, error) { + signers := make([]*signing.EdSigner, 0) + + dir := filepath.Join(app.Config.DataDir(), keyDir) + if err := os.MkdirAll(dir, 0o700); err != nil { + return nil, fmt.Errorf("failed to create directory for identity file: %w", err) + } + err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if err != nil { - if !os.IsNotExist(err) { - return nil, fmt.Errorf("failed to read identity file: %w", err) - } + return fmt.Errorf("failed to walk directory at %s: %w", path, err) + } - app.log.Info("Identity file not found. Creating new identity...") + // skip subdirectories and files in them + if d.IsDir() && path != dir { + return fs.SkipDir + } - edSgn, err := signing.NewEdSigner( - signing.WithPrefix(app.Config.Genesis.GenesisID().Bytes()), - ) - if err != nil { - return nil, fmt.Errorf("failed to create identity: %w", err) - } - if err := os.MkdirAll(filepath.Dir(filename), 0o700); err != nil { - return nil, fmt.Errorf("failed to create directory for identity file: %w", err) - } + // skip files that are not identity files + if filepath.Ext(path) != ".key" { + return nil + } - err = os.WriteFile(filename, []byte(hex.EncodeToString(edSgn.PrivateKey())), 0o600) - if err != nil { - return nil, fmt.Errorf("failed to write identity file: %w", err) - } + // read hex data from file + dst := make([]byte, signing.PrivateKeySize) + data, err := os.ReadFile(path) + if err != nil { + return fmt.Errorf("failed to read identity file at %s: %w", path, err) + } - app.log.With().Info("created new identity", edSgn.PublicKey()) - return edSgn, nil + n, err := hex.Decode(dst, data) + if err != nil { + return fmt.Errorf("decoding private key: %w", err) } - } - dst := make([]byte, signing.PrivateKeySize) - n, err := hex.Decode(dst, data) + if n != signing.PrivateKeySize { + return fmt.Errorf("invalid key size %d/%d", n, signing.PrivateKeySize) + } + + signer, err := signing.NewEdSigner( + signing.WithPrivateKey(dst), + signing.WithPrefix(app.Config.Genesis.GenesisID().Bytes()), + ) + if err != nil { + return fmt.Errorf("failed to construct identity from data file: %w", err) + } + + app.log.With().Info("Loaded existing identity", + log.String("filename", d.Name()), + signer.PublicKey(), + ) + signers = append(signers, signer) + return nil + }) if err != nil { - return nil, fmt.Errorf("decoding private key: %w", err) + return nil, err } - if n != signing.PrivateKeySize { - return nil, fmt.Errorf("invalid key size %d/%d", n, signing.PrivateKeySize) + + if len(signers) > 0 { + return signers, nil } - edSgn, err := signing.NewEdSigner( - signing.WithPrivateKey(dst), + + app.log.Info("Identity file not found. Creating new identity...") + signer, err := signing.NewEdSigner( signing.WithPrefix(app.Config.Genesis.GenesisID().Bytes()), ) if err != nil { - return nil, fmt.Errorf("failed to construct identity from data file: %w", err) + return nil, fmt.Errorf("failed to create identity: %w", err) + } + + keyFile := filepath.Join(dir, defaultKeyFileName) + dst := make([]byte, hex.EncodedLen(len(signer.PrivateKey()))) + hex.Encode(dst, signer.PrivateKey()) + err = os.WriteFile(keyFile, dst, 0o600) + if err != nil { + return nil, fmt.Errorf("failed to write identity file: %w", err) } - app.log.Info("Loaded existing identity; public key: %v", edSgn.PublicKey()) - return edSgn, nil + app.log.With().Info("Created new identity", + log.String("filename", defaultKeyFileName), + signer.PublicKey(), + ) + return []*signing.EdSigner{signer}, nil } func (app *App) setupDBs(ctx context.Context, lg log.Log) error { diff --git a/node/node_test.go b/node/node_test.go index 558bd60c4ed..a01189ae6f1 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -62,49 +62,56 @@ func TestMain(m *testing.M) { func TestSpacemeshApp_getEdIdentity(t *testing.T) { r := require.New(t) - tempdir := t.TempDir() + tempDir := t.TempDir() // setup spacemesh app app := New(WithLog(logtest.New(t))) - app.Config.SMESHING.Opts.DataDir = tempdir + app.Config.DataDirParent = tempDir app.log = logtest.New(t) // Create new identity. - signer1, err := app.LoadOrCreateEdSigner() + signers1, err := app.LoadIdentities() r.NoError(err) - infos, err := os.ReadDir(tempdir) + r.Len(signers1, 1) + + infos, err := os.ReadDir(tempDir) r.NoError(err) r.Len(infos, 1) // Load existing identity. - signer2, err := app.LoadOrCreateEdSigner() + signers2, err := app.LoadIdentities() r.NoError(err) - infos, err = os.ReadDir(tempdir) + r.Len(signers2, 1) + + infos, err = os.ReadDir(tempDir) r.NoError(err) r.Len(infos, 1) - r.Equal(signer1.PublicKey(), signer2.PublicKey()) + + r.Equal(signers1[0].PublicKey(), signers2[0].PublicKey()) // Invalidate the identity by changing its file name. - filename := filepath.Join(tempdir, infos[0].Name()) + filename := filepath.Join(tempDir, infos[0].Name()) err = os.Rename(filename, filename+"_") r.NoError(err) // Create new identity. - signer3, err := app.LoadOrCreateEdSigner() + signers3, err := app.LoadIdentities() r.NoError(err) - infos, err = os.ReadDir(tempdir) + r.Len(signers3, 1) + + infos, err = os.ReadDir(tempDir) r.NoError(err) r.Len(infos, 2) - r.NotEqual(signer1.PublicKey(), signer3.PublicKey()) + r.NotEqual(signers1[0].PublicKey(), signers3[0].PublicKey()) t.Run("bad length", func(t *testing.T) { - testLoadOrCreateEdSigner(t, + testLoadIdentities(t, bytes.Repeat([]byte("ab"), signing.PrivateKeySize-1), "invalid key size 63/64", ) }) t.Run("bad hex", func(t *testing.T) { - testLoadOrCreateEdSigner(t, + testLoadIdentities(t, bytes.Repeat([]byte("CV"), signing.PrivateKeySize), "decoding private key: encoding/hex: invalid byte", ) @@ -112,20 +119,20 @@ func TestSpacemeshApp_getEdIdentity(t *testing.T) { t.Run("good key", func(t *testing.T) { _, priv, err := ed25519.GenerateKey(nil) require.NoError(t, err) - testLoadOrCreateEdSigner(t, + testLoadIdentities(t, []byte(hex.EncodeToString(priv)), "", ) }) } -func testLoadOrCreateEdSigner(t *testing.T, data []byte, expect string) { - tempdir := t.TempDir() +func testLoadIdentities(t *testing.T, data []byte, expect string) { app := New(WithLog(logtest.New(t))) - app.Config.SMESHING.Opts.DataDir = tempdir - keyfile := filepath.Join(app.Config.SMESHING.Opts.DataDir, edKeyFileName) - require.NoError(t, os.WriteFile(keyfile, data, 0o600)) - signer, err := app.LoadOrCreateEdSigner() + app.Config.DataDirParent = t.TempDir() + keyFile := filepath.Join(app.Config.DataDirParent, keyDir, defaultKeyFileName) + require.NoError(t, os.MkdirAll(filepath.Dir(keyFile), 0o700)) + require.NoError(t, os.WriteFile(keyFile, data, 0o600)) + signer, err := app.LoadIdentities() if len(expect) > 0 { require.ErrorContains(t, err, expect) require.Nil(t, signer) @@ -280,9 +287,9 @@ func TestSpacemeshApp_GrpcService(t *testing.T) { r := require.New(t) app := New(WithLog(logtest.New(t))) - signer, err := app.LoadOrCreateEdSigner() + signer, err := app.LoadIdentities() require.NoError(t, err) - app.edSgn = signer // https://github.com/spacemeshos/go-spacemesh/issues/4653 + app.signers = signer // https://github.com/spacemeshos/go-spacemesh/issues/4653 run := func(c *cobra.Command, args []string) error { app.Config.API.PublicListener = listener @@ -335,9 +342,9 @@ func TestSpacemeshApp_JsonServiceNotRunning(t *testing.T) { r := require.New(t) app := New(WithLog(logtest.New(t))) - signer, err := app.LoadOrCreateEdSigner() + signers, err := app.LoadIdentities() require.NoError(t, err) - app.edSgn = signer // https://github.com/spacemeshos/go-spacemesh/issues/4653 + app.signers = signers // https://github.com/spacemeshos/go-spacemesh/issues/4653 // Make sure the service is not running by default run := func(c *cobra.Command, args []string) error { @@ -408,9 +415,9 @@ func TestSpacemeshApp_NodeService(t *testing.T) { app.Config.SMESHING.Opts.DataDir = t.TempDir() app.Config.SMESHING.Opts.Scrypt.N = 2 - edSgn, err := signing.NewEdSigner() + signer, err := signing.NewEdSigner() require.NoError(t, err) - app.edSgn = edSgn + app.signers = append(app.signers, signer) mesh, err := mocknet.WithNPeers(1) require.NoError(t, err) @@ -531,7 +538,7 @@ func TestSpacemeshApp_TransactionService(t *testing.T) { signer, err := signing.NewEdSigner() r.NoError(err) - app.edSgn = signer + app.signers = append(app.signers, signer) address := wallet.Address(signer.PublicKey().Bytes()) run := func(c *cobra.Command, args []string) error { @@ -1024,9 +1031,9 @@ func TestAdminEvents(t *testing.T) { logger := logtest.New(t, zapcore.DebugLevel) app := New(WithConfig(&cfg), WithLog(logger)) - signer, err := app.LoadOrCreateEdSigner() + signers, err := app.LoadIdentities() require.NoError(t, err) - app.edSgn = signer // https://github.com/spacemeshos/go-spacemesh/issues/4653 + app.signers = signers // https://github.com/spacemeshos/go-spacemesh/issues/4653 require.NoError(t, app.Initialize()) ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -1106,9 +1113,9 @@ func TestAdminEvents_UnspecifiedAddresses(t *testing.T) { logger := logtest.New(t, zapcore.DebugLevel) app := New(WithConfig(&cfg), WithLog(logger)) - signer, err := app.LoadOrCreateEdSigner() + signers, err := app.LoadIdentities() require.NoError(t, err) - app.edSgn = signer // https://github.com/spacemeshos/go-spacemesh/issues/4653 + app.signers = signers // https://github.com/spacemeshos/go-spacemesh/issues/4653 require.NoError(t, app.Initialize()) ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/node/test_network.go b/node/test_network.go index 352e0484002..b2f9e7eb9f1 100644 --- a/node/test_network.go +++ b/node/test_network.go @@ -114,8 +114,7 @@ func NewApp(t *testing.T, conf *config.Config, l log.Log) *App { err := app.Initialize() require.NoError(t, err) - /* Create or load miner identity */ - app.edSgn, err = app.LoadOrCreateEdSigner() + app.signers, err = app.LoadIdentities() require.NoError(t, err, "could not retrieve identity") return app From 80c17965d0cafa43b86f25d20007ac5d12dc3b8b Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:48:17 +0000 Subject: [PATCH 4/6] Update Recovery for multi-smesher --- checkpoint/recovery.go | 72 ++++++++++++++++++++++++------------- checkpoint/recovery_test.go | 19 +++++----- node/node.go | 16 ++++----- 3 files changed, 66 insertions(+), 41 deletions(-) diff --git a/checkpoint/recovery.go b/checkpoint/recovery.go index 3d4ee5e13d5..ca80a46d962 100644 --- a/checkpoint/recovery.go +++ b/checkpoint/recovery.go @@ -45,7 +45,7 @@ type RecoverConfig struct { DbFile string LocalDbFile string PreserveOwnAtx bool - NodeID types.NodeID + NodeIDs []types.NodeID Uri string Restore types.LayerID } @@ -176,15 +176,41 @@ func recoverFromLocalFile( log.Int("num accounts", len(data.accounts)), log.Int("num atxs", len(data.atxs)), ) - deps, proofs, err := collectOwnAtxDeps(logger, db, localDB, cfg, data) - if err != nil { - logger.With().Error("failed to collect deps for own atx", log.Err(err)) - // continue to recover from checkpoint despite failure to preserve own atx - } else if len(deps) > 0 { - logger.With().Info("collected own atx deps", - log.Context(ctx), - log.Int("own atx deps", len(deps)), - ) + allDeps := make([]*types.VerifiedActivationTx, 0) + allProofs := make([]*types.PoetProofMessage, 0) + if cfg.PreserveOwnAtx { + for _, nodeID := range cfg.NodeIDs { + deps, proofs, err := collectOwnAtxDeps(logger, db, localDB, nodeID, cfg.GoldenAtx, data) + if err != nil { + logger.With().Error("failed to collect deps for own atx", + nodeID, + log.Err(err), + ) + // continue to recover from checkpoint despite failure to preserve own atx + continue + } + + logger.With().Info("collected own atx deps", + log.Context(ctx), + nodeID, + log.Int("own atx deps", len(deps)), + ) + allDeps = append(allDeps, deps...) + allProofs = append(allProofs, proofs...) + + // // deduplicate allDeps and allProofs by sorting and compacting + // // TODO: for some reason this causes existing tests to fail - need to investigate + // slices.SortFunc(allDeps, func(i, j *types.VerifiedActivationTx) int { + // return bytes.Compare(i.ID().Bytes(), j.ID().Bytes()) + // }) + // allDeps = slices.Compact(allDeps) + // slices.SortFunc(allProofs, func(i, j *types.PoetProofMessage) int { + // iRef, _ := i.Ref() + // jRef, _ := j.Ref() + // return bytes.Compare(iRef[:], jRef[:]) + // }) + // allProofs = slices.Compact(allProofs) + } } if err := db.Close(); err != nil { return nil, fmt.Errorf("close old db: %w", err) @@ -248,8 +274,8 @@ func recoverFromLocalFile( types.GetEffectiveGenesis(), ) var preserve *PreservedData - if len(deps) > 0 { - preserve = &PreservedData{Deps: deps, Proofs: proofs} + if len(allDeps) > 0 { + preserve = &PreservedData{Deps: allDeps, Proofs: allProofs} } return preserve, nil } @@ -311,13 +337,11 @@ func collectOwnAtxDeps( logger log.Log, db *sql.Database, localDB *localsql.Database, - cfg *RecoverConfig, + nodeID types.NodeID, + goldenATX types.ATXID, data *recoverydata, ) ([]*types.VerifiedActivationTx, []*types.PoetProofMessage, error) { - if !cfg.PreserveOwnAtx { - return nil, nil, nil - } - atxid, err := atxs.GetLastIDByNodeID(db, cfg.NodeID) + atxid, err := atxs.GetLastIDByNodeID(db, nodeID) if err != nil && !errors.Is(err, sql.ErrNotFound) { return nil, nil, fmt.Errorf("query own last atx id: %w", err) } @@ -329,8 +353,8 @@ func collectOwnAtxDeps( own = true } - // check for if miner is building any atx - nipostCh, _ := nipost.Challenge(localDB, cfg.NodeID) + // check for if smesher is building any atx + nipostCh, _ := nipost.Challenge(localDB, nodeID) if ref == types.EmptyATXID { if nipostCh == nil { return nil, nil, nil @@ -340,7 +364,7 @@ func collectOwnAtxDeps( } } - all := map[types.ATXID]struct{}{cfg.GoldenAtx: {}, types.EmptyATXID: {}} + all := map[types.ATXID]struct{}{goldenATX: {}, types.EmptyATXID: {}} for _, catx := range data.atxs { all[catx.ID] = struct{}{} } @@ -353,18 +377,16 @@ func collectOwnAtxDeps( ref, log.Bool("own", own), ) - deps, proofs, err = collectDeps(db, cfg.GoldenAtx, ref, all) + deps, proofs, err = collectDeps(db, goldenATX, ref, all) if err != nil { return nil, nil, err } } if nipostCh != nil { - logger.With().Info("collecting pending atx and deps", - log.Object("nipost", nipostCh), - ) + logger.With().Info("collecting pending atx and deps", log.Object("nipost", nipostCh)) // any previous atx in nipost should already be captured earlier // we only care about positioning atx here - deps2, proofs2, err := collectDeps(db, cfg.GoldenAtx, nipostCh.PositioningATX, all) + deps2, proofs2, err := collectDeps(db, goldenATX, nipostCh.PositioningATX, all) if err != nil { return nil, nil, fmt.Errorf("deps from nipost positioning atx (%v): %w", nipostCh.PositioningATX, err) } diff --git a/checkpoint/recovery_test.go b/checkpoint/recovery_test.go index f2b73dd2013..500357afe9d 100644 --- a/checkpoint/recovery_test.go +++ b/checkpoint/recovery_test.go @@ -157,7 +157,7 @@ func TestRecover(t *testing.T) { DbFile: "test.sql", LocalDbFile: "local.sql", PreserveOwnAtx: true, - NodeID: types.NodeID{2, 3, 4}, + NodeIDs: []types.NodeID{types.RandomNodeID()}, Uri: tc.uri, Restore: types.LayerID(recoverLayer), } @@ -204,7 +204,7 @@ func TestRecover_SameRecoveryInfo(t *testing.T) { DataDir: t.TempDir(), DbFile: "test.sql", PreserveOwnAtx: true, - NodeID: types.NodeID{2, 3, 4}, + NodeIDs: []types.NodeID{types.RandomNodeID()}, Uri: fmt.Sprintf("%s/snapshot-15", ts.URL), Restore: types.LayerID(recoverLayer), } @@ -254,6 +254,9 @@ func validateAndPreserveData( lg, ) mfetch.EXPECT().GetAtxs(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() + for _, vatx := range deps { + fmt.Println("deps", vatx.ID()) + } for i, vatx := range deps { encoded, err := codec.Encode(vatx) require.NoError(tb, err) @@ -435,7 +438,7 @@ func TestRecover_OwnAtxNotInCheckpoint_Preserve(t *testing.T) { DbFile: "test.sql", LocalDbFile: "local.sql", PreserveOwnAtx: true, - NodeID: sig.NodeID(), + NodeIDs: []types.NodeID{sig.NodeID()}, Uri: fmt.Sprintf("%s/snapshot-15", ts.URL), Restore: types.LayerID(recoverLayer), } @@ -507,7 +510,7 @@ func TestRecover_OwnAtxNotInCheckpoint_Preserve_IncludePending(t *testing.T) { DbFile: "test.sql", LocalDbFile: "local.sql", PreserveOwnAtx: true, - NodeID: sig.NodeID(), + NodeIDs: []types.NodeID{sig.NodeID()}, Uri: fmt.Sprintf("%s/snapshot-15", ts.URL), Restore: types.LayerID(recoverLayer), } @@ -596,7 +599,7 @@ func TestRecover_OwnAtxNotInCheckpoint_Preserve_Still_Initializing(t *testing.T) DbFile: "test.sql", LocalDbFile: "local.sql", PreserveOwnAtx: true, - NodeID: sig.NodeID(), + NodeIDs: []types.NodeID{sig.NodeID()}, Uri: fmt.Sprintf("%s/snapshot-15", ts.URL), Restore: types.LayerID(recoverLayer), } @@ -682,7 +685,7 @@ func TestRecover_OwnAtxNotInCheckpoint_Preserve_DepIsGolden(t *testing.T) { DbFile: "test.sql", LocalDbFile: "local.sql", PreserveOwnAtx: true, - NodeID: sig.NodeID(), + NodeIDs: []types.NodeID{sig.NodeID()}, Uri: fmt.Sprintf("%s/snapshot-15", ts.URL), Restore: types.LayerID(recoverLayer), } @@ -764,7 +767,7 @@ func TestRecover_OwnAtxNotInCheckpoint_DontPreserve(t *testing.T) { DbFile: "test.sql", LocalDbFile: "local.sql", PreserveOwnAtx: false, - NodeID: sig.NodeID(), + NodeIDs: []types.NodeID{sig.NodeID()}, Uri: fmt.Sprintf("%s/snapshot-15", ts.URL), Restore: types.LayerID(recoverLayer), } @@ -834,7 +837,7 @@ func TestRecover_OwnAtxInCheckpoint(t *testing.T) { DbFile: "test.sql", LocalDbFile: "local.sql", PreserveOwnAtx: true, - NodeID: nid, + NodeIDs: []types.NodeID{nid}, Uri: fmt.Sprintf("%s/snapshot-15", ts.URL), Restore: types.LayerID(recoverLayer), } diff --git a/node/node.go b/node/node.go index d7d725f0bbf..7793210a503 100644 --- a/node/node.go +++ b/node/node.go @@ -429,16 +429,16 @@ func (app *App) LoadCheckpoint(ctx context.Context) (*checkpoint.PreservedData, if restore == 0 { return nil, fmt.Errorf("restore layer not set") } + nodeIDs := make([]types.NodeID, 0, len(app.signers)) cfg := &checkpoint.RecoverConfig{ GoldenAtx: types.ATXID(app.Config.Genesis.GoldenATX()), DataDir: app.Config.DataDir(), DbFile: dbFile, LocalDbFile: localDbFile, PreserveOwnAtx: app.Config.Recovery.PreserveOwnAtx, - // TODO(mafa): FIXXME! - // NodeID: app.edSgn.NodeID(), - Uri: checkpointFile, - Restore: restore, + NodeIDs: nodeIDs, + Uri: checkpointFile, + Restore: restore, } app.log.WithContext(ctx).With().Info("recover from checkpoint", log.String("url", checkpointFile), @@ -453,11 +453,11 @@ func (app *App) Started() <-chan struct{} { // Lock locks the app for exclusive use. It returns an error if the app is already locked. func (app *App) Lock() error { - lockdir := filepath.Dir(app.Config.FileLock) - if _, err := os.Stat(lockdir); errors.Is(err, os.ErrNotExist) { - err := os.Mkdir(lockdir, os.ModePerm) + lockDir := filepath.Dir(app.Config.FileLock) + if _, err := os.Stat(lockDir); errors.Is(err, os.ErrNotExist) { + err := os.Mkdir(lockDir, os.ModePerm) if err != nil { - return fmt.Errorf("creating dir %s for lock %s: %w", lockdir, app.Config.FileLock, err) + return fmt.Errorf("creating dir %s for lock %s: %w", lockDir, app.Config.FileLock, err) } } fl := flock.New(app.Config.FileLock) From 456359f7c201ee991432fdf2c0923b2e8107d409 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Thu, 22 Feb 2024 18:02:06 +0000 Subject: [PATCH 5/6] Fix recovery for multi-smeshing --- checkpoint/recovery.go | 35 +++++++++++++++--------- checkpoint/recovery_test.go | 53 ++++++++++++++++++++++--------------- 2 files changed, 55 insertions(+), 33 deletions(-) diff --git a/checkpoint/recovery.go b/checkpoint/recovery.go index ca80a46d962..e3b61c09e51 100644 --- a/checkpoint/recovery.go +++ b/checkpoint/recovery.go @@ -1,12 +1,14 @@ package checkpoint import ( + "bytes" "context" "encoding/json" "errors" "fmt" "net/url" "path/filepath" + "slices" "github.com/spf13/afero" @@ -198,18 +200,27 @@ func recoverFromLocalFile( allDeps = append(allDeps, deps...) allProofs = append(allProofs, proofs...) - // // deduplicate allDeps and allProofs by sorting and compacting - // // TODO: for some reason this causes existing tests to fail - need to investigate - // slices.SortFunc(allDeps, func(i, j *types.VerifiedActivationTx) int { - // return bytes.Compare(i.ID().Bytes(), j.ID().Bytes()) - // }) - // allDeps = slices.Compact(allDeps) - // slices.SortFunc(allProofs, func(i, j *types.PoetProofMessage) int { - // iRef, _ := i.Ref() - // jRef, _ := j.Ref() - // return bytes.Compare(iRef[:], jRef[:]) - // }) - // allProofs = slices.Compact(allProofs) + // deduplicate allDeps and allProofs by sorting and compacting + // then sort them by publishEpoch + slices.SortFunc(allDeps, func(i, j *types.VerifiedActivationTx) int { + return bytes.Compare(i.ID().Bytes(), j.ID().Bytes()) + }) + allDeps = slices.CompactFunc(allDeps, func(i, j *types.VerifiedActivationTx) bool { + return i.ID() == j.ID() + }) + slices.SortFunc(allDeps, func(i, j *types.VerifiedActivationTx) int { + return int(i.PublishEpoch) - int(j.PublishEpoch) + }) + slices.SortFunc(allProofs, func(i, j *types.PoetProofMessage) int { + iRef, _ := i.Ref() + jRef, _ := j.Ref() + return bytes.Compare(iRef[:], jRef[:]) + }) + allProofs = slices.CompactFunc(allProofs, func(i, j *types.PoetProofMessage) bool { + iRef, _ := i.Ref() + jRef, _ := j.Ref() + return iRef == jRef + }) } } if err := db.Close(); err != nil { diff --git a/checkpoint/recovery_test.go b/checkpoint/recovery_test.go index 500357afe9d..c844dc5c27d 100644 --- a/checkpoint/recovery_test.go +++ b/checkpoint/recovery_test.go @@ -254,9 +254,6 @@ func validateAndPreserveData( lg, ) mfetch.EXPECT().GetAtxs(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() - for _, vatx := range deps { - fmt.Println("deps", vatx.ID()) - } for i, vatx := range deps { encoded, err := codec.Encode(vatx) require.NoError(tb, err) @@ -281,9 +278,14 @@ func validateAndPreserveData( mvalidator.EXPECT().IsVerifyingFullPost().AnyTimes().Return(true) mreceiver.EXPECT().OnAtx(gomock.Any()) mtrtl.EXPECT().OnAtx(gomock.Any()) - require.NoError(tb, atxHandler.HandleSyncedAtx(context.Background(), vatx.ID().Hash32(), "self", encoded)) + + err = atxHandler.HandleSyncedAtx(context.Background(), vatx.ID().Hash32(), "self", encoded) + require.NoError(tb, err) + err = poetDb.ValidateAndStore(context.Background(), proofs[i]) - require.ErrorContains(tb, err, "failed to validate poet proof for poetID 706f65745f round 1337") + require.ErrorContains(tb, err, fmt.Sprintf("failed to validate poet proof for poetID %s round 1337", + hex.EncodeToString(proofs[i].PoetServiceID[:5])), + ) } } @@ -368,13 +370,13 @@ func createAtxChain(tb testing.TB, sig *signing.EdSigner) ([]*types.VerifiedActi proofMessage := &types.PoetProofMessage{ PoetProof: types.PoetProof{ MerkleProof: shared.MerkleProof{ - Root: []byte{1, 2, 3}, + Root: types.RandomBytes(32), ProvenLeaves: [][]byte{{1}, {2}}, ProofNodes: [][]byte{{1}, {2}}, }, LeafCount: 1234, }, - PoetServiceID: []byte("poet_id_123456"), + PoetServiceID: types.RandomBytes(32), RoundID: "1337", } proofs = append(proofs, proofMessage) @@ -419,6 +421,15 @@ func atxIDs(atxs []*types.VerifiedActivationTx) []types.ATXID { return ids } +func proofRefs(proofs []*types.PoetProofMessage) []types.PoetProofRef { + refs := make([]types.PoetProofRef, 0, len(proofs)) + for _, proof := range proofs { + ref, _ := proof.Ref() + refs = append(refs, ref) + } + return refs +} + func TestRecover_OwnAtxNotInCheckpoint_Preserve(t *testing.T) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { require.Equal(t, http.MethodGet, r.Method) @@ -443,35 +454,35 @@ func TestRecover_OwnAtxNotInCheckpoint_Preserve(t *testing.T) { Restore: types.LayerID(recoverLayer), } - olddb, err := sql.Open("file:" + filepath.Join(cfg.DataDir, cfg.DbFile)) + oldDB, err := sql.Open("file:" + filepath.Join(cfg.DataDir, cfg.DbFile)) require.NoError(t, err) - require.NotNil(t, olddb) + require.NotNil(t, oldDB) vatxs, proofs := createAtxChain(t, sig) - validateAndPreserveData(t, olddb, vatxs, proofs) + validateAndPreserveData(t, oldDB, vatxs, proofs) // the proofs are not valid, but save them anyway for the purpose of testing for i, vatx := range vatxs { encoded, err := codec.Encode(proofs[i]) require.NoError(t, err) - require.NoError( - t, - poets.Add( - olddb, - types.PoetProofRef(vatx.GetPoetProofRef()), - encoded, - proofs[i].PoetServiceID, - proofs[i].RoundID, - ), + + err = poets.Add( + oldDB, + types.PoetProofRef(vatx.GetPoetProofRef()), + encoded, + proofs[i].PoetServiceID, + proofs[i].RoundID, ) + require.NoError(t, err) } - require.NoError(t, olddb.Close()) + require.NoError(t, oldDB.Close()) preserve, err := checkpoint.Recover(ctx, logtest.New(t), afero.NewOsFs(), cfg) require.NoError(t, err) require.NotNil(t, preserve) + // the two set of atxs have different received time. just compare IDs require.ElementsMatch(t, atxIDs(vatxs[:len(vatxs)-1]), atxIDs(preserve.Deps)) - require.ElementsMatch(t, proofs[:len(proofs)-1], preserve.Proofs) + require.ElementsMatch(t, proofRefs(proofs[:len(vatxs)-1]), proofRefs(preserve.Proofs)) newdb, err := sql.Open("file:" + filepath.Join(cfg.DataDir, cfg.DbFile)) require.NoError(t, err) From 82fcacf1c619080f669731af28020f5cd2100854 Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Thu, 22 Feb 2024 19:02:04 +0000 Subject: [PATCH 6/6] Add tests --- api/grpcserver/grpcserver_test.go | 19 ++++++++++++ api/grpcserver/smesher_service_test.go | 40 +++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/api/grpcserver/grpcserver_test.go b/api/grpcserver/grpcserver_test.go index 1a33b5b6604..f7a1f41aee1 100644 --- a/api/grpcserver/grpcserver_test.go +++ b/api/grpcserver/grpcserver_test.go @@ -627,6 +627,25 @@ func TestSmesherService(t *testing.T) { require.Equal(t, int32(code.Code_OK), res.Status.Code) }) + t.Run("StartSmeshingMultiSetup", func(t *testing.T) { + t.Parallel() + opts := &pb.PostSetupOpts{} + opts.DataDir = t.TempDir() + opts.NumUnits = 1 + opts.MaxFileSize = 1024 + + coinbase := &pb.AccountId{Address: addr1.String()} + + c, ctx := setupSmesherService(t, nil) // in multi smeshing setup the node id is nil and start smeshing should fail + res, err := c.StartSmeshing(ctx, &pb.StartSmeshingRequest{ + Opts: opts, + Coinbase: coinbase, + }) + require.Equal(t, codes.FailedPrecondition, status.Code(err)) + require.ErrorContains(t, err, "node is not configured for supervised smeshing") + require.Nil(t, res) + }) + t.Run("StopSmeshing", func(t *testing.T) { t.Parallel() c, ctx := setupSmesherService(t, nil) diff --git a/api/grpcserver/smesher_service_test.go b/api/grpcserver/smesher_service_test.go index 958ea36422d..6bb9d8752e4 100644 --- a/api/grpcserver/smesher_service_test.go +++ b/api/grpcserver/smesher_service_test.go @@ -54,7 +54,7 @@ func TestStartSmeshingPassesCorrectSmeshingOpts(t *testing.T) { ctrl := gomock.NewController(t) smeshingProvider := activation.NewMockSmeshingProvider(ctrl) postSupervisor := grpcserver.NewMockpostSupervisor(ctrl) - nodeID := types.RandomNodeID() // TODO (mafa): add test where nodeID is not available + nodeID := types.RandomNodeID() svc := grpcserver.NewSmesherService( smeshingProvider, postSupervisor, @@ -92,6 +92,44 @@ func TestStartSmeshingPassesCorrectSmeshingOpts(t *testing.T) { require.NoError(t, err) } +func TestStartSmeshingFailsMultiSmeshing(t *testing.T) { + ctrl := gomock.NewController(t) + smeshingProvider := activation.NewMockSmeshingProvider(ctrl) + postSupervisor := grpcserver.NewMockpostSupervisor(ctrl) + svc := grpcserver.NewSmesherService( + smeshingProvider, + postSupervisor, + time.Second, + nil, // no nodeID in multi smesher setup + activation.DefaultPostSetupOpts(), + ) + + types.SetNetworkHRP("stest") + providerID := uint32(7) + opts := activation.PostSetupOpts{ + DataDir: "data-dir", + NumUnits: 1, + MaxFileSize: 1024, + Throttle: true, + Scrypt: config.DefaultLabelParams(), + ComputeBatchSize: config.DefaultComputeBatchSize, + } + opts.ProviderID.SetUint32(providerID) + + _, err := svc.StartSmeshing(context.Background(), &pb.StartSmeshingRequest{ + Coinbase: &pb.AccountId{Address: "stest1qqqqqqrs60l66w5uksxzmaznwq6xnhqfv56c28qlkm4a5"}, + Opts: &pb.PostSetupOpts{ + DataDir: "data-dir", + NumUnits: 1, + MaxFileSize: 1024, + ProviderId: &providerID, + Throttle: true, + }, + }) + require.Equal(t, codes.FailedPrecondition, status.Code(err)) + require.ErrorContains(t, err, "node is not configured for supervised smeshing") +} + func TestSmesherService_PostSetupProviders(t *testing.T) { ctrl := gomock.NewController(t) smeshingProvider := activation.NewMockSmeshingProvider(ctrl)