diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index e8789c1bc8..8d77c50c42 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -439,12 +439,13 @@ func (_m *Client) Wait() { _m.Called() } -// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewClient(t interface { +type mockConstructorTestingTNewClient interface { mock.TestingT Cleanup(func()) -}) *Client { +} + +// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewClient(t mockConstructorTestingTNewClient) *Client { mock := &Client{} mock.Mock.Test(t) diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index 980f15febb..be32ed8e17 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -352,12 +352,13 @@ func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.Reque return r0, r1 } -// NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewApplication(t interface { +type mockConstructorTestingTNewApplication interface { mock.TestingT Cleanup(func()) -}) *Application { +} + +// NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewApplication(t mockConstructorTestingTNewApplication) *Application { mock := &Application{} mock.Mock.Test(t) diff --git a/internal/consensus/mocks/gossiper.go b/internal/consensus/mocks/gossiper.go index b61f289f0e..f9c69f9752 100644 --- a/internal/consensus/mocks/gossiper.go +++ b/internal/consensus/mocks/gossiper.go @@ -44,12 +44,13 @@ func (_m *Gossiper) GossipVoteSetMaj23(ctx context.Context, rs types.RoundState, _m.Called(ctx, rs, prs) } -// NewGossiper creates a new instance of Gossiper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewGossiper(t interface { +type mockConstructorTestingTNewGossiper interface { mock.TestingT Cleanup(func()) -}) *Gossiper { +} + +// NewGossiper creates a new instance of Gossiper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewGossiper(t mockConstructorTestingTNewGossiper) *Gossiper { mock := &Gossiper{} mock.Mock.Test(t) diff --git a/internal/evidence/mocks/block_store.go b/internal/evidence/mocks/block_store.go index bb8d8e1a4c..e61c4e0aeb 100644 --- a/internal/evidence/mocks/block_store.go +++ b/internal/evidence/mocks/block_store.go @@ -58,12 +58,13 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { return r0 } -// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBlockStore(t interface { +type mockConstructorTestingTNewBlockStore interface { mock.TestingT Cleanup(func()) -}) *BlockStore { +} + +// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewBlockStore(t mockConstructorTestingTNewBlockStore) *BlockStore { mock := &BlockStore{} mock.Mock.Test(t) diff --git a/internal/mempool/mocks/mempool.go b/internal/mempool/mocks/mempool.go index e069c07c28..e244c765de 100644 --- a/internal/mempool/mocks/mempool.go +++ b/internal/mempool/mocks/mempool.go @@ -171,12 +171,13 @@ func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types return r0 } -// NewMempool creates a new instance of Mempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMempool(t interface { +type mockConstructorTestingTNewMempool interface { mock.TestingT Cleanup(func()) -}) *Mempool { +} + +// NewMempool creates a new instance of Mempool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMempool(t mockConstructorTestingTNewMempool) *Mempool { mock := &Mempool{} mock.Mock.Test(t) diff --git a/internal/p2p/client/mocks/block_client.go b/internal/p2p/client/mocks/block_client.go index 2960e66e1f..cd428e08b6 100644 --- a/internal/p2p/client/mocks/block_client.go +++ b/internal/p2p/client/mocks/block_client.go @@ -73,12 +73,13 @@ func (_m *BlockClient) Send(ctx context.Context, msg interface{}) error { return r0 } -// NewBlockClient creates a new instance of BlockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBlockClient(t interface { +type mockConstructorTestingTNewBlockClient interface { mock.TestingT Cleanup(func()) -}) *BlockClient { +} + +// NewBlockClient creates a new instance of BlockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewBlockClient(t mockConstructorTestingTNewBlockClient) *BlockClient { mock := &BlockClient{} mock.Mock.Test(t) diff --git a/internal/p2p/client/mocks/snapshot_client.go b/internal/p2p/client/mocks/snapshot_client.go index af0b42fc34..d8f8ee4f67 100644 --- a/internal/p2p/client/mocks/snapshot_client.go +++ b/internal/p2p/client/mocks/snapshot_client.go @@ -110,12 +110,13 @@ func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) return r0 } -// NewSnapshotClient creates a new instance of SnapshotClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSnapshotClient(t interface { +type mockConstructorTestingTNewSnapshotClient interface { mock.TestingT Cleanup(func()) -}) *SnapshotClient { +} + +// NewSnapshotClient creates a new instance of SnapshotClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSnapshotClient(t mockConstructorTestingTNewSnapshotClient) *SnapshotClient { mock := &SnapshotClient{} mock.Mock.Test(t) diff --git a/internal/p2p/mocks/channel.go b/internal/p2p/mocks/channel.go index ca8c03b052..9890baac6c 100644 --- a/internal/p2p/mocks/channel.go +++ b/internal/p2p/mocks/channel.go @@ -86,12 +86,13 @@ func (_m *Channel) String() string { return r0 } -// NewChannel creates a new instance of Channel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewChannel(t interface { +type mockConstructorTestingTNewChannel interface { mock.TestingT Cleanup(func()) -}) *Channel { +} + +// NewChannel creates a new instance of Channel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewChannel(t mockConstructorTestingTNewChannel) *Channel { mock := &Channel{} mock.Mock.Test(t) diff --git a/internal/p2p/mocks/connection.go b/internal/p2p/mocks/connection.go index 82430b2f7a..520c7e6894 100644 --- a/internal/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -159,12 +159,13 @@ func (_m *Connection) String() string { return r0 } -// NewConnection creates a new instance of Connection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewConnection(t interface { +type mockConstructorTestingTNewConnection interface { mock.TestingT Cleanup(func()) -}) *Connection { +} + +// NewConnection creates a new instance of Connection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewConnection(t mockConstructorTestingTNewConnection) *Connection { mock := &Connection{} mock.Mock.Test(t) diff --git a/internal/p2p/mocks/transport.go b/internal/p2p/mocks/transport.go index 3398b21c69..7135a7ce4f 100644 --- a/internal/p2p/mocks/transport.go +++ b/internal/p2p/mocks/transport.go @@ -158,12 +158,13 @@ func (_m *Transport) String() string { return r0 } -// NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTransport(t interface { +type mockConstructorTestingTNewTransport interface { mock.TestingT Cleanup(func()) -}) *Transport { +} + +// NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewTransport(t mockConstructorTestingTNewTransport) *Transport { mock := &Transport{} mock.Mock.Test(t) diff --git a/internal/peer/mocks/store.go b/internal/peer/mocks/store.go index 51f391b91d..9aca3ae127 100644 --- a/internal/peer/mocks/store.go +++ b/internal/peer/mocks/store.go @@ -115,12 +115,13 @@ func (_m *Store[T]) Update(peerID types.NodeID, updates ...peer.UpdateFunc[T]) { _m.Called(_ca...) } -// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStore[T interface{}](t interface { +type mockConstructorTestingTNewStore interface { mock.TestingT Cleanup(func()) -}) *Store[T] { +} + +// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStore[T interface{}](t mockConstructorTestingTNewStore) *Store[T] { mock := &Store[T]{} mock.Mock.Test(t) diff --git a/internal/state/indexer/mocks/event_sink.go b/internal/state/indexer/mocks/event_sink.go index 86a5b31432..c62ad7ee7d 100644 --- a/internal/state/indexer/mocks/event_sink.go +++ b/internal/state/indexer/mocks/event_sink.go @@ -178,12 +178,13 @@ func (_m *EventSink) Type() indexer.EventSinkType { return r0 } -// NewEventSink creates a new instance of EventSink. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEventSink(t interface { +type mockConstructorTestingTNewEventSink interface { mock.TestingT Cleanup(func()) -}) *EventSink { +} + +// NewEventSink creates a new instance of EventSink. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEventSink(t mockConstructorTestingTNewEventSink) *EventSink { mock := &EventSink{} mock.Mock.Test(t) diff --git a/internal/state/mocks/block_store.go b/internal/state/mocks/block_store.go index 6dc0ce7d06..e4e2bb4aed 100644 --- a/internal/state/mocks/block_store.go +++ b/internal/state/mocks/block_store.go @@ -242,12 +242,13 @@ func (_m *BlockStore) Size() int64 { return r0 } -// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBlockStore(t interface { +type mockConstructorTestingTNewBlockStore interface { mock.TestingT Cleanup(func()) -}) *BlockStore { +} + +// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewBlockStore(t mockConstructorTestingTNewBlockStore) *BlockStore { mock := &BlockStore{} mock.Mock.Test(t) diff --git a/internal/state/mocks/evidence_pool.go b/internal/state/mocks/evidence_pool.go index c7cc9dcca6..4d90d986a5 100644 --- a/internal/state/mocks/evidence_pool.go +++ b/internal/state/mocks/evidence_pool.go @@ -75,12 +75,13 @@ func (_m *EvidencePool) Update(_a0 context.Context, _a1 state.State, _a2 types.E _m.Called(_a0, _a1, _a2) } -// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEvidencePool(t interface { +type mockConstructorTestingTNewEvidencePool interface { mock.TestingT Cleanup(func()) -}) *EvidencePool { +} + +// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEvidencePool(t mockConstructorTestingTNewEvidencePool) *EvidencePool { mock := &EvidencePool{} mock.Mock.Test(t) diff --git a/internal/state/mocks/executor.go b/internal/state/mocks/executor.go index b102fb36e1..0539d96753 100644 --- a/internal/state/mocks/executor.go +++ b/internal/state/mocks/executor.go @@ -168,12 +168,13 @@ func (_m *Executor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) e return r0 } -// NewExecutor creates a new instance of Executor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewExecutor(t interface { +type mockConstructorTestingTNewExecutor interface { mock.TestingT Cleanup(func()) -}) *Executor { +} + +// NewExecutor creates a new instance of Executor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewExecutor(t mockConstructorTestingTNewExecutor) *Executor { mock := &Executor{} mock.Mock.Test(t) diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go index 6d51274f9a..086b3f06bf 100644 --- a/internal/state/mocks/store.go +++ b/internal/state/mocks/store.go @@ -199,12 +199,13 @@ func (_m *Store) SaveValidatorSets(_a0 int64, _a1 int64, _a2 *types.ValidatorSet return r0 } -// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStore(t interface { +type mockConstructorTestingTNewStore interface { mock.TestingT Cleanup(func()) -}) *Store { +} + +// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStore(t mockConstructorTestingTNewStore) *Store { mock := &Store{} mock.Mock.Test(t) diff --git a/internal/statesync/mocks/state_provider.go b/internal/statesync/mocks/state_provider.go index acd99f42cf..108ae499bc 100644 --- a/internal/statesync/mocks/state_provider.go +++ b/internal/statesync/mocks/state_provider.go @@ -95,12 +95,13 @@ func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, return r0, r1 } -// NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStateProvider(t interface { +type mockConstructorTestingTNewStateProvider interface { mock.TestingT Cleanup(func()) -}) *StateProvider { +} + +// NewStateProvider creates a new instance of StateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStateProvider(t mockConstructorTestingTNewStateProvider) *StateProvider { mock := &StateProvider{} mock.Mock.Test(t) diff --git a/light/provider/mocks/provider.go b/light/provider/mocks/provider.go index 3a71108e40..dd6a7487a7 100644 --- a/light/provider/mocks/provider.go +++ b/light/provider/mocks/provider.go @@ -69,12 +69,13 @@ func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) erro return r0 } -// NewProvider creates a new instance of Provider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewProvider(t interface { +type mockConstructorTestingTNewProvider interface { mock.TestingT Cleanup(func()) -}) *Provider { +} + +// NewProvider creates a new instance of Provider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewProvider(t mockConstructorTestingTNewProvider) *Provider { mock := &Provider{} mock.Mock.Test(t) diff --git a/light/rpc/mocks/light_client.go b/light/rpc/mocks/light_client.go index 0212394edd..117df9f2bf 100644 --- a/light/rpc/mocks/light_client.go +++ b/light/rpc/mocks/light_client.go @@ -125,12 +125,13 @@ func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int6 return r0, r1 } -// NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewLightClient(t interface { +type mockConstructorTestingTNewLightClient interface { mock.TestingT Cleanup(func()) -}) *LightClient { +} + +// NewLightClient creates a new instance of LightClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewLightClient(t mockConstructorTestingTNewLightClient) *LightClient { mock := &LightClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/abci_client.go b/rpc/client/mocks/abci_client.go index 743a093ef5..504c4efd87 100644 --- a/rpc/client/mocks/abci_client.go +++ b/rpc/client/mocks/abci_client.go @@ -202,12 +202,13 @@ func (_m *ABCIClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coret return r0, r1 } -// NewABCIClient creates a new instance of ABCIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewABCIClient(t interface { +type mockConstructorTestingTNewABCIClient interface { mock.TestingT Cleanup(func()) -}) *ABCIClient { +} + +// NewABCIClient creates a new instance of ABCIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewABCIClient(t mockConstructorTestingTNewABCIClient) *ABCIClient { mock := &ABCIClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/client.go b/rpc/client/mocks/client.go index c76739cd79..daf2207c8b 100644 --- a/rpc/client/mocks/client.go +++ b/rpc/client/mocks/client.go @@ -915,12 +915,13 @@ func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perP return r0, r1 } -// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewClient(t interface { +type mockConstructorTestingTNewClient interface { mock.TestingT Cleanup(func()) -}) *Client { +} + +// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewClient(t mockConstructorTestingTNewClient) *Client { mock := &Client{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/events_client.go b/rpc/client/mocks/events_client.go index 35ac0a8bca..0e158f9cd2 100644 --- a/rpc/client/mocks/events_client.go +++ b/rpc/client/mocks/events_client.go @@ -40,12 +40,13 @@ func (_m *EventsClient) Events(ctx context.Context, req *coretypes.RequestEvents return r0, r1 } -// NewEventsClient creates a new instance of EventsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEventsClient(t interface { +type mockConstructorTestingTNewEventsClient interface { mock.TestingT Cleanup(func()) -}) *EventsClient { +} + +// NewEventsClient creates a new instance of EventsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEventsClient(t mockConstructorTestingTNewEventsClient) *EventsClient { mock := &EventsClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/evidence_client.go b/rpc/client/mocks/evidence_client.go index 88905be0ca..9c95244d2d 100644 --- a/rpc/client/mocks/evidence_client.go +++ b/rpc/client/mocks/evidence_client.go @@ -42,12 +42,13 @@ func (_m *EvidenceClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evide return r0, r1 } -// NewEvidenceClient creates a new instance of EvidenceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewEvidenceClient(t interface { +type mockConstructorTestingTNewEvidenceClient interface { mock.TestingT Cleanup(func()) -}) *EvidenceClient { +} + +// NewEvidenceClient creates a new instance of EvidenceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEvidenceClient(t mockConstructorTestingTNewEvidenceClient) *EvidenceClient { mock := &EvidenceClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/history_client.go b/rpc/client/mocks/history_client.go index 5d6fb88b5f..3e7d6f0541 100644 --- a/rpc/client/mocks/history_client.go +++ b/rpc/client/mocks/history_client.go @@ -92,12 +92,13 @@ func (_m *HistoryClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretyp return r0, r1 } -// NewHistoryClient creates a new instance of HistoryClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewHistoryClient(t interface { +type mockConstructorTestingTNewHistoryClient interface { mock.TestingT Cleanup(func()) -}) *HistoryClient { +} + +// NewHistoryClient creates a new instance of HistoryClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewHistoryClient(t mockConstructorTestingTNewHistoryClient) *HistoryClient { mock := &HistoryClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/mempool_client.go b/rpc/client/mocks/mempool_client.go index 718acedf21..3ac15fc2eb 100644 --- a/rpc/client/mocks/mempool_client.go +++ b/rpc/client/mocks/mempool_client.go @@ -108,12 +108,13 @@ func (_m *MempoolClient) UnconfirmedTxs(ctx context.Context, page *int, perPage return r0, r1 } -// NewMempoolClient creates a new instance of MempoolClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMempoolClient(t interface { +type mockConstructorTestingTNewMempoolClient interface { mock.TestingT Cleanup(func()) -}) *MempoolClient { +} + +// NewMempoolClient creates a new instance of MempoolClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMempoolClient(t mockConstructorTestingTNewMempoolClient) *MempoolClient { mock := &MempoolClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/network_client.go b/rpc/client/mocks/network_client.go index 8fc8564a58..d09b3c8dcf 100644 --- a/rpc/client/mocks/network_client.go +++ b/rpc/client/mocks/network_client.go @@ -144,12 +144,13 @@ func (_m *NetworkClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, return r0, r1 } -// NewNetworkClient creates a new instance of NetworkClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewNetworkClient(t interface { +type mockConstructorTestingTNewNetworkClient interface { mock.TestingT Cleanup(func()) -}) *NetworkClient { +} + +// NewNetworkClient creates a new instance of NetworkClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewNetworkClient(t mockConstructorTestingTNewNetworkClient) *NetworkClient { mock := &NetworkClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/remote_client.go b/rpc/client/mocks/remote_client.go index 1df630e0db..ddb932981c 100644 --- a/rpc/client/mocks/remote_client.go +++ b/rpc/client/mocks/remote_client.go @@ -929,12 +929,13 @@ func (_m *RemoteClient) Validators(ctx context.Context, height *int64, page *int return r0, r1 } -// NewRemoteClient creates a new instance of RemoteClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewRemoteClient(t interface { +type mockConstructorTestingTNewRemoteClient interface { mock.TestingT Cleanup(func()) -}) *RemoteClient { +} + +// NewRemoteClient creates a new instance of RemoteClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewRemoteClient(t mockConstructorTestingTNewRemoteClient) *RemoteClient { mock := &RemoteClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/sign_client.go b/rpc/client/mocks/sign_client.go index fbbe98632e..aa192a75c3 100644 --- a/rpc/client/mocks/sign_client.go +++ b/rpc/client/mocks/sign_client.go @@ -277,12 +277,13 @@ func (_m *SignClient) Validators(ctx context.Context, height *int64, page *int, return r0, r1 } -// NewSignClient creates a new instance of SignClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSignClient(t interface { +type mockConstructorTestingTNewSignClient interface { mock.TestingT Cleanup(func()) -}) *SignClient { +} + +// NewSignClient creates a new instance of SignClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSignClient(t mockConstructorTestingTNewSignClient) *SignClient { mock := &SignClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/status_client.go b/rpc/client/mocks/status_client.go index 0c476a1897..801bd3112c 100644 --- a/rpc/client/mocks/status_client.go +++ b/rpc/client/mocks/status_client.go @@ -40,12 +40,13 @@ func (_m *StatusClient) Status(_a0 context.Context) (*coretypes.ResultStatus, er return r0, r1 } -// NewStatusClient creates a new instance of StatusClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStatusClient(t interface { +type mockConstructorTestingTNewStatusClient interface { mock.TestingT Cleanup(func()) -}) *StatusClient { +} + +// NewStatusClient creates a new instance of StatusClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewStatusClient(t mockConstructorTestingTNewStatusClient) *StatusClient { mock := &StatusClient{} mock.Mock.Test(t) diff --git a/rpc/client/mocks/subscription_client.go b/rpc/client/mocks/subscription_client.go index 2ce0795a04..580809a8e1 100644 --- a/rpc/client/mocks/subscription_client.go +++ b/rpc/client/mocks/subscription_client.go @@ -75,12 +75,13 @@ func (_m *SubscriptionClient) UnsubscribeAll(ctx context.Context, subscriber str return r0 } -// NewSubscriptionClient creates a new instance of SubscriptionClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSubscriptionClient(t interface { +type mockConstructorTestingTNewSubscriptionClient interface { mock.TestingT Cleanup(func()) -}) *SubscriptionClient { +} + +// NewSubscriptionClient creates a new instance of SubscriptionClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewSubscriptionClient(t mockConstructorTestingTNewSubscriptionClient) *SubscriptionClient { mock := &SubscriptionClient{} mock.Mock.Test(t) diff --git a/types/mocks/block_event_publisher.go b/types/mocks/block_event_publisher.go index b9c4bcdc01..b77fd67527 100644 --- a/types/mocks/block_event_publisher.go +++ b/types/mocks/block_event_publisher.go @@ -82,12 +82,13 @@ func (_m *BlockEventPublisher) PublishEventValidatorSetUpdates(_a0 types.EventDa return r0 } -// NewBlockEventPublisher creates a new instance of BlockEventPublisher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBlockEventPublisher(t interface { +type mockConstructorTestingTNewBlockEventPublisher interface { mock.TestingT Cleanup(func()) -}) *BlockEventPublisher { +} + +// NewBlockEventPublisher creates a new instance of BlockEventPublisher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewBlockEventPublisher(t mockConstructorTestingTNewBlockEventPublisher) *BlockEventPublisher { mock := &BlockEventPublisher{} mock.Mock.Test(t) diff --git a/types/mocks/priv_validator.go b/types/mocks/priv_validator.go index d1cfd55ff7..194fb36dba 100644 --- a/types/mocks/priv_validator.go +++ b/types/mocks/priv_validator.go @@ -239,12 +239,13 @@ func (_m *PrivValidator) UpdatePrivateKey(ctx context.Context, privateKey crypto _m.Called(ctx, privateKey, quorumHash, thresholdPublicKey, height) } -// NewPrivValidator creates a new instance of PrivValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPrivValidator(t interface { +type mockConstructorTestingTNewPrivValidator interface { mock.TestingT Cleanup(func()) -}) *PrivValidator { +} + +// NewPrivValidator creates a new instance of PrivValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPrivValidator(t mockConstructorTestingTNewPrivValidator) *PrivValidator { mock := &PrivValidator{} mock.Mock.Test(t)