From 1fd3b182e32fa44de0d40f7a8045144554114a09 Mon Sep 17 00:00:00 2001 From: lklimek <842586+lklimek@users.noreply.github.com> Date: Thu, 29 Feb 2024 11:36:40 +0100 Subject: [PATCH] chore: regenerate mocks (#744) --- abci/client/mocks/client.go | 72 +++++++++ abci/types/mocks/application.go | 52 +++++++ dash/core/mocks/client.go | 32 ++++ internal/evidence/mocks/block_store.go | 12 ++ internal/mempool/mocks/mempool.go | 36 +++++ internal/p2p/client/mocks/block_client.go | 12 ++ internal/p2p/client/mocks/snapshot_client.go | 16 ++ internal/p2p/mocks/channel.go | 20 +++ internal/p2p/mocks/connection.go | 28 ++++ internal/p2p/mocks/transport.go | 28 ++++ internal/state/indexer/mocks/event_sink.go | 32 ++++ internal/state/mocks/block_store.go | 56 +++++++ internal/state/mocks/evidence_pool.go | 12 ++ internal/state/mocks/executor.go | 28 ++++ internal/state/mocks/store.go | 40 +++++ internal/statesync/mocks/state_provider.go | 12 ++ libs/store/mocks/store.go | 24 +++ light/provider/mocks/provider.go | 12 ++ light/rpc/mocks/light_client.go | 20 +++ rpc/client/mocks/abci_client.go | 28 ++++ rpc/client/mocks/client.go | 144 ++++++++++++++++++ rpc/client/mocks/events_client.go | 4 + rpc/client/mocks/evidence_client.go | 4 + rpc/client/mocks/history_client.go | 12 ++ rpc/client/mocks/mempool_client.go | 16 ++ rpc/client/mocks/network_client.go | 20 +++ rpc/client/mocks/remote_client.go | 148 +++++++++++++++++++ rpc/client/mocks/sign_client.go | 40 +++++ rpc/client/mocks/status_client.go | 4 + rpc/client/mocks/subscription_client.go | 12 ++ types/mocks/block_event_publisher.go | 20 +++ types/mocks/priv_validator.go | 36 +++++ 32 files changed, 1032 insertions(+) diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 984e97ef7e..433a0cb60d 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -18,6 +18,10 @@ type Client struct { func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ApplySnapshotChunk") + } + var r0 *types.ResponseApplySnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)); ok { @@ -44,6 +48,10 @@ func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestAppl func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *types.ResponseCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { @@ -70,6 +78,10 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*type func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Echo") + } + var r0 *types.ResponseEcho var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*types.ResponseEcho, error)); ok { @@ -96,6 +108,10 @@ func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, er func (_m *Client) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -110,6 +126,10 @@ func (_m *Client) Error() error { func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExtendVote") + } + var r0 *types.ResponseExtendVote var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)); ok { @@ -136,6 +156,10 @@ func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 *types.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)); ok { @@ -162,6 +186,10 @@ func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeB func (_m *Client) Flush(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Flush") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -176,6 +204,10 @@ func (_m *Client) Flush(_a0 context.Context) error { func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Info") + } + var r0 *types.ResponseInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)); ok { @@ -202,6 +234,10 @@ func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.Resp func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for InitChain") + } + var r0 *types.ResponseInitChain var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)); ok { @@ -228,6 +264,10 @@ func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (* func (_m *Client) IsRunning() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsRunning") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -242,6 +282,10 @@ func (_m *Client) IsRunning() bool { func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListSnapshots") + } + var r0 *types.ResponseListSnapshots var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)); ok { @@ -268,6 +312,10 @@ func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnaps func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadSnapshotChunk") + } + var r0 *types.ResponseLoadSnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)); ok { @@ -294,6 +342,10 @@ func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadS func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OfferSnapshot") + } + var r0 *types.ResponseOfferSnapshot var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)); ok { @@ -320,6 +372,10 @@ func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnap func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PrepareProposal") + } + var r0 *types.ResponsePrepareProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)); ok { @@ -346,6 +402,10 @@ func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepare func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 *types.ResponseProcessProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)); ok { @@ -372,6 +432,10 @@ func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcess func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *types.ResponseQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)); ok { @@ -398,6 +462,10 @@ func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.Re func (_m *Client) Start(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -412,6 +480,10 @@ func (_m *Client) Start(_a0 context.Context) error { func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 *types.ResponseVerifyVoteExtension var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)); ok { diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index e7767821d9..04ca3c5777 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -18,6 +18,10 @@ type Application struct { func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ApplySnapshotChunk") + } + var r0 *types.ResponseApplySnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)); ok { @@ -44,6 +48,10 @@ func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.Reques func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *types.ResponseCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) (*types.ResponseCheckTx, error)); ok { @@ -70,6 +78,10 @@ func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) ( func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ExtendVote") + } + var r0 *types.ResponseExtendVote var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) (*types.ResponseExtendVote, error)); ok { @@ -96,6 +108,10 @@ func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendV func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 *types.ResponseFinalizeBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error)); ok { @@ -122,6 +138,10 @@ func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFina func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Info") + } + var r0 *types.ResponseInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) (*types.ResponseInfo, error)); ok { @@ -148,6 +168,10 @@ func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for InitChain") + } + var r0 *types.ResponseInitChain var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) (*types.ResponseInitChain, error)); ok { @@ -174,6 +198,10 @@ func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChai func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ListSnapshots") + } + var r0 *types.ResponseListSnapshots var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)); ok { @@ -200,6 +228,10 @@ func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestList func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for LoadSnapshotChunk") + } + var r0 *types.ResponseLoadSnapshotChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)); ok { @@ -226,6 +258,10 @@ func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.Request func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for OfferSnapshot") + } + var r0 *types.ResponseOfferSnapshot var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)); ok { @@ -252,6 +288,10 @@ func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOffe func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PrepareProposal") + } + var r0 *types.ResponsePrepareProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error)); ok { @@ -278,6 +318,10 @@ func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPr func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 *types.ResponseProcessProposal var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) (*types.ResponseProcessProposal, error)); ok { @@ -304,6 +348,10 @@ func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestPr func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 *types.ResponseQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) (*types.ResponseQuery, error)); ok { @@ -330,6 +378,10 @@ func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*typ func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 *types.ResponseVerifyVoteExtension var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error)); ok { diff --git a/dash/core/mocks/client.go b/dash/core/mocks/client.go index 8f5b8e7ba6..19511f16ac 100644 --- a/dash/core/mocks/client.go +++ b/dash/core/mocks/client.go @@ -18,6 +18,10 @@ type Client struct { func (_m *Client) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Client) Close() error { func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetNetworkInfo") + } + var r0 *btcjson.GetNetworkInfoResult var r1 error if rf, ok := ret.Get(0).(func() (*btcjson.GetNetworkInfoResult, error)); ok { @@ -58,6 +66,10 @@ func (_m *Client) GetNetworkInfo() (*btcjson.GetNetworkInfoResult, error) { func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.MasternodelistResultJSON, error) { ret := _m.Called(filter) + if len(ret) == 0 { + panic("no return value specified for MasternodeListJSON") + } + var r0 map[string]btcjson.MasternodelistResultJSON var r1 error if rf, ok := ret.Get(0).(func(string) (map[string]btcjson.MasternodelistResultJSON, error)); ok { @@ -84,6 +96,10 @@ func (_m *Client) MasternodeListJSON(filter string) (map[string]btcjson.Masterno func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MasternodeStatus") + } + var r0 *btcjson.MasternodeStatusResult var r1 error if rf, ok := ret.Get(0).(func() (*btcjson.MasternodeStatusResult, error)); ok { @@ -110,6 +126,10 @@ func (_m *Client) MasternodeStatus() (*btcjson.MasternodeStatusResult, error) { func (_m *Client) Ping() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -124,6 +144,10 @@ func (_m *Client) Ping() error { func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBytes) (*btcjson.QuorumInfoResult, error) { ret := _m.Called(quorumType, quorumHash) + if len(ret) == 0 { + panic("no return value specified for QuorumInfo") + } + var r0 *btcjson.QuorumInfoResult var r1 error if rf, ok := ret.Get(0).(func(btcjson.LLMQType, bytes.HexBytes) (*btcjson.QuorumInfoResult, error)); ok { @@ -150,6 +174,10 @@ func (_m *Client) QuorumInfo(quorumType btcjson.LLMQType, quorumHash bytes.HexBy func (_m *Client) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, quorumHash bytes.HexBytes) (*btcjson.QuorumSignResult, error) { ret := _m.Called(quorumType, requestID, messageHash, quorumHash) + if len(ret) == 0 { + panic("no return value specified for QuorumSign") + } + var r0 *btcjson.QuorumSignResult var r1 error if rf, ok := ret.Get(0).(func(btcjson.LLMQType, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes) (*btcjson.QuorumSignResult, error)); ok { @@ -176,6 +204,10 @@ func (_m *Client) QuorumSign(quorumType btcjson.LLMQType, requestID bytes.HexByt func (_m *Client) QuorumVerify(quorumType btcjson.LLMQType, requestID bytes.HexBytes, messageHash bytes.HexBytes, signature bytes.HexBytes, quorumHash bytes.HexBytes) (bool, error) { ret := _m.Called(quorumType, requestID, messageHash, signature, quorumHash) + if len(ret) == 0 { + panic("no return value specified for QuorumVerify") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(btcjson.LLMQType, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes, bytes.HexBytes) (bool, error)); ok { diff --git a/internal/evidence/mocks/block_store.go b/internal/evidence/mocks/block_store.go index 344c2f7992..41fff57cde 100644 --- a/internal/evidence/mocks/block_store.go +++ b/internal/evidence/mocks/block_store.go @@ -16,6 +16,10 @@ type BlockStore struct { func (_m *BlockStore) Height() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Height") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -30,6 +34,10 @@ func (_m *BlockStore) Height() int64 { func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -46,6 +54,10 @@ func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { r0 = rf(height) diff --git a/internal/mempool/mocks/mempool.go b/internal/mempool/mocks/mempool.go index 890e3d7b41..6f4996f400 100644 --- a/internal/mempool/mocks/mempool.go +++ b/internal/mempool/mocks/mempool.go @@ -23,6 +23,10 @@ type Mempool struct { func (_m *Mempool) CheckTx(ctx context.Context, tx types.Tx, cb func(*abcitypes.ResponseCheckTx), txInfo mempool.TxInfo) error { ret := _m.Called(ctx, tx, cb, txInfo) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx, func(*abcitypes.ResponseCheckTx), mempool.TxInfo) error); ok { r0 = rf(ctx, tx, cb, txInfo) @@ -47,6 +51,10 @@ func (_m *Mempool) Flush() { func (_m *Mempool) FlushAppConn(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for FlushAppConn") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -66,6 +74,10 @@ func (_m *Mempool) Lock() { func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { ret := _m.Called(maxBytes, maxGas) + if len(ret) == 0 { + panic("no return value specified for ReapMaxBytesMaxGas") + } + var r0 types.Txs if rf, ok := ret.Get(0).(func(int64, int64) types.Txs); ok { r0 = rf(maxBytes, maxGas) @@ -82,6 +94,10 @@ func (_m *Mempool) ReapMaxBytesMaxGas(maxBytes int64, maxGas int64) types.Txs { func (_m *Mempool) ReapMaxTxs(max int) types.Txs { ret := _m.Called(max) + if len(ret) == 0 { + panic("no return value specified for ReapMaxTxs") + } + var r0 types.Txs if rf, ok := ret.Get(0).(func(int) types.Txs); ok { r0 = rf(max) @@ -98,6 +114,10 @@ func (_m *Mempool) ReapMaxTxs(max int) types.Txs { func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { ret := _m.Called(txKey) + if len(ret) == 0 { + panic("no return value specified for RemoveTxByKey") + } + var r0 error if rf, ok := ret.Get(0).(func(types.TxKey) error); ok { r0 = rf(txKey) @@ -112,6 +132,10 @@ func (_m *Mempool) RemoveTxByKey(txKey types.TxKey) error { func (_m *Mempool) Size() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -126,6 +150,10 @@ func (_m *Mempool) Size() int { func (_m *Mempool) SizeBytes() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SizeBytes") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -140,6 +168,10 @@ func (_m *Mempool) SizeBytes() int64 { func (_m *Mempool) TxsAvailable() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxsAvailable") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -161,6 +193,10 @@ func (_m *Mempool) Unlock() { func (_m *Mempool) Update(ctx context.Context, blockHeight int64, blockTxs types.Txs, txResults []*abcitypes.ExecTxResult, newPreFn mempool.PreCheckFunc, newPostFn mempool.PostCheckFunc, recheck bool) error { ret := _m.Called(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, int64, types.Txs, []*abcitypes.ExecTxResult, mempool.PreCheckFunc, mempool.PostCheckFunc, bool) error); ok { r0 = rf(ctx, blockHeight, blockTxs, txResults, newPreFn, newPostFn, recheck) diff --git a/internal/p2p/client/mocks/block_client.go b/internal/p2p/client/mocks/block_client.go index b094d38ccb..5d1e5a90ce 100644 --- a/internal/p2p/client/mocks/block_client.go +++ b/internal/p2p/client/mocks/block_client.go @@ -23,6 +23,10 @@ type BlockClient struct { func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error) { ret := _m.Called(ctx, height, peerID) + if len(ret) == 0 { + panic("no return value specified for GetBlock") + } + var r0 *promise.Promise[*blocksync.BlockResponse] var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)); ok { @@ -49,6 +53,10 @@ func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types. func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetSyncStatus") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -63,6 +71,10 @@ func (_m *BlockClient) GetSyncStatus(ctx context.Context) error { func (_m *BlockClient) Send(ctx context.Context, msg interface{}) error { ret := _m.Called(ctx, msg) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { r0 = rf(ctx, msg) diff --git a/internal/p2p/client/mocks/snapshot_client.go b/internal/p2p/client/mocks/snapshot_client.go index e2eb8d643d..a88f2e269b 100644 --- a/internal/p2p/client/mocks/snapshot_client.go +++ b/internal/p2p/client/mocks/snapshot_client.go @@ -22,6 +22,10 @@ type SnapshotClient struct { func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32) (*promise.Promise[*statesync.ChunkResponse], error) { ret := _m.Called(ctx, peerID, height, format, index) + if len(ret) == 0 { + panic("no return value specified for GetChunk") + } + var r0 *promise.Promise[*statesync.ChunkResponse] var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64, uint32, uint32) (*promise.Promise[*statesync.ChunkResponse], error)); ok { @@ -48,6 +52,10 @@ func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, hei func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.LightBlockResponse], error) { ret := _m.Called(ctx, peerID, height) + if len(ret) == 0 { + panic("no return value specified for GetLightBlock") + } + var r0 *promise.Promise[*statesync.LightBlockResponse] var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.LightBlockResponse], error)); ok { @@ -74,6 +82,10 @@ func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.ParamsResponse], error) { ret := _m.Called(ctx, peerID, height) + if len(ret) == 0 { + panic("no return value specified for GetParams") + } + var r0 *promise.Promise[*statesync.ParamsResponse] var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.NodeID, uint64) (*promise.Promise[*statesync.ParamsResponse], error)); ok { @@ -100,6 +112,10 @@ func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, he func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) error { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for GetSnapshots") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.NodeID) error); ok { r0 = rf(ctx, peerID) diff --git a/internal/p2p/mocks/channel.go b/internal/p2p/mocks/channel.go index ebee0c7670..b24f2d48a7 100644 --- a/internal/p2p/mocks/channel.go +++ b/internal/p2p/mocks/channel.go @@ -18,6 +18,10 @@ type Channel struct { func (_m *Channel) Err() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Err") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -32,6 +36,10 @@ func (_m *Channel) Err() error { func (_m *Channel) Receive(_a0 context.Context) *p2p.ChannelIterator { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Receive") + } + var r0 *p2p.ChannelIterator if rf, ok := ret.Get(0).(func(context.Context) *p2p.ChannelIterator); ok { r0 = rf(_a0) @@ -48,6 +56,10 @@ func (_m *Channel) Receive(_a0 context.Context) *p2p.ChannelIterator { func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, p2p.Envelope) error); ok { r0 = rf(_a0, _a1) @@ -62,6 +74,10 @@ func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error { func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SendError") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, p2p.PeerError) error); ok { r0 = rf(_a0, _a1) @@ -76,6 +92,10 @@ func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error { func (_m *Channel) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() diff --git a/internal/p2p/mocks/connection.go b/internal/p2p/mocks/connection.go index 447bb925ab..879950b6a1 100644 --- a/internal/p2p/mocks/connection.go +++ b/internal/p2p/mocks/connection.go @@ -27,6 +27,10 @@ type Connection struct { func (_m *Connection) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -41,6 +45,10 @@ func (_m *Connection) Close() error { func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 types.NodeInfo, _a3 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error) { ret := _m.Called(_a0, _a1, _a2, _a3) + if len(ret) == 0 { + panic("no return value specified for Handshake") + } + var r0 types.NodeInfo var r1 crypto.PubKey var r2 error @@ -74,6 +82,10 @@ func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 type func (_m *Connection) LocalEndpoint() p2p.Endpoint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LocalEndpoint") + } + var r0 p2p.Endpoint if rf, ok := ret.Get(0).(func() p2p.Endpoint); ok { r0 = rf() @@ -88,6 +100,10 @@ func (_m *Connection) LocalEndpoint() p2p.Endpoint { func (_m *Connection) ReceiveMessage(_a0 context.Context) (conn.ChannelID, []byte, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ReceiveMessage") + } + var r0 conn.ChannelID var r1 []byte var r2 error @@ -121,6 +137,10 @@ func (_m *Connection) ReceiveMessage(_a0 context.Context) (conn.ChannelID, []byt func (_m *Connection) RemoteEndpoint() p2p.Endpoint { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemoteEndpoint") + } + var r0 p2p.Endpoint if rf, ok := ret.Get(0).(func() p2p.Endpoint); ok { r0 = rf() @@ -135,6 +155,10 @@ func (_m *Connection) RemoteEndpoint() p2p.Endpoint { func (_m *Connection) SendMessage(_a0 context.Context, _a1 conn.ChannelID, _a2 []byte) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for SendMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, conn.ChannelID, []byte) error); ok { r0 = rf(_a0, _a1, _a2) @@ -149,6 +173,10 @@ func (_m *Connection) SendMessage(_a0 context.Context, _a1 conn.ChannelID, _a2 [ func (_m *Connection) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() diff --git a/internal/p2p/mocks/transport.go b/internal/p2p/mocks/transport.go index 0901d27c84..6fbaccacaa 100644 --- a/internal/p2p/mocks/transport.go +++ b/internal/p2p/mocks/transport.go @@ -21,6 +21,10 @@ type Transport struct { func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Accept") + } + var r0 p2p.Connection var r1 error if rf, ok := ret.Get(0).(func(context.Context) (p2p.Connection, error)); ok { @@ -52,6 +56,10 @@ func (_m *Transport) AddChannelDescriptors(_a0 []*conn.ChannelDescriptor) { func (_m *Transport) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -66,6 +74,10 @@ func (_m *Transport) Close() error { func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connection, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Dial") + } + var r0 p2p.Connection var r1 error if rf, ok := ret.Get(0).(func(context.Context, *p2p.Endpoint) (p2p.Connection, error)); ok { @@ -92,6 +104,10 @@ func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connectio func (_m *Transport) Endpoint() (*p2p.Endpoint, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Endpoint") + } + var r0 *p2p.Endpoint var r1 error if rf, ok := ret.Get(0).(func() (*p2p.Endpoint, error)); ok { @@ -118,6 +134,10 @@ func (_m *Transport) Endpoint() (*p2p.Endpoint, error) { func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Listen") + } + var r0 error if rf, ok := ret.Get(0).(func(*p2p.Endpoint) error); ok { r0 = rf(_a0) @@ -132,6 +152,10 @@ func (_m *Transport) Listen(_a0 *p2p.Endpoint) error { func (_m *Transport) Protocols() []p2p.Protocol { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Protocols") + } + var r0 []p2p.Protocol if rf, ok := ret.Get(0).(func() []p2p.Protocol); ok { r0 = rf() @@ -148,6 +172,10 @@ func (_m *Transport) Protocols() []p2p.Protocol { func (_m *Transport) String() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for String") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() diff --git a/internal/state/indexer/mocks/event_sink.go b/internal/state/indexer/mocks/event_sink.go index 45d3f22c8a..8288781bc0 100644 --- a/internal/state/indexer/mocks/event_sink.go +++ b/internal/state/indexer/mocks/event_sink.go @@ -24,6 +24,10 @@ type EventSink struct { func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetTxByHash") + } + var r0 *types.TxResult var r1 error if rf, ok := ret.Get(0).(func([]byte) (*types.TxResult, error)); ok { @@ -50,6 +54,10 @@ func (_m *EventSink) GetTxByHash(_a0 []byte) (*types.TxResult, error) { func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for HasBlock") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(int64) (bool, error)); ok { @@ -74,6 +82,10 @@ func (_m *EventSink) HasBlock(_a0 int64) (bool, error) { func (_m *EventSink) IndexBlockEvents(_a0 tenderdashtypes.EventDataNewBlockHeader) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for IndexBlockEvents") + } + var r0 error if rf, ok := ret.Get(0).(func(tenderdashtypes.EventDataNewBlockHeader) error); ok { r0 = rf(_a0) @@ -88,6 +100,10 @@ func (_m *EventSink) IndexBlockEvents(_a0 tenderdashtypes.EventDataNewBlockHeade func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for IndexTxEvents") + } + var r0 error if rf, ok := ret.Get(0).(func([]*types.TxResult) error); ok { r0 = rf(_a0) @@ -102,6 +118,10 @@ func (_m *EventSink) IndexTxEvents(_a0 []*types.TxResult) error { func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([]int64, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SearchBlockEvents") + } + var r0 []int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]int64, error)); ok { @@ -128,6 +148,10 @@ func (_m *EventSink) SearchBlockEvents(_a0 context.Context, _a1 *query.Query) ([ func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*types.TxResult, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SearchTxEvents") + } + var r0 []*types.TxResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]*types.TxResult, error)); ok { @@ -154,6 +178,10 @@ func (_m *EventSink) SearchTxEvents(_a0 context.Context, _a1 *query.Query) ([]*t func (_m *EventSink) Stop() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -168,6 +196,10 @@ func (_m *EventSink) Stop() error { func (_m *EventSink) Type() indexer.EventSinkType { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Type") + } + var r0 indexer.EventSinkType if rf, ok := ret.Get(0).(func() indexer.EventSinkType); ok { r0 = rf() diff --git a/internal/state/mocks/block_store.go b/internal/state/mocks/block_store.go index f4a0636d78..63873d194a 100644 --- a/internal/state/mocks/block_store.go +++ b/internal/state/mocks/block_store.go @@ -17,6 +17,10 @@ type BlockStore struct { func (_m *BlockStore) Base() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Base") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -31,6 +35,10 @@ func (_m *BlockStore) Base() int64 { func (_m *BlockStore) CoreChainLockedHeight() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for CoreChainLockedHeight") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -45,6 +53,10 @@ func (_m *BlockStore) CoreChainLockedHeight() uint32 { func (_m *BlockStore) Height() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Height") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -59,6 +71,10 @@ func (_m *BlockStore) Height() int64 { func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LoadBaseMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func() *types.BlockMeta); ok { r0 = rf() @@ -75,6 +91,10 @@ func (_m *BlockStore) LoadBaseMeta() *types.BlockMeta { func (_m *BlockStore) LoadBlock(height int64) *types.Block { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlock") + } + var r0 *types.Block if rf, ok := ret.Get(0).(func(int64) *types.Block); ok { r0 = rf(height) @@ -91,6 +111,10 @@ func (_m *BlockStore) LoadBlock(height int64) *types.Block { func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for LoadBlockByHash") + } + var r0 *types.Block if rf, ok := ret.Get(0).(func([]byte) *types.Block); ok { r0 = rf(hash) @@ -107,6 +131,10 @@ func (_m *BlockStore) LoadBlockByHash(hash []byte) *types.Block { func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -123,6 +151,10 @@ func (_m *BlockStore) LoadBlockCommit(height int64) *types.Commit { func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMeta") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func(int64) *types.BlockMeta); ok { r0 = rf(height) @@ -139,6 +171,10 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta { func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for LoadBlockMetaByHash") + } + var r0 *types.BlockMeta if rf, ok := ret.Get(0).(func([]byte) *types.BlockMeta); ok { r0 = rf(hash) @@ -155,6 +191,10 @@ func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta { func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { ret := _m.Called(height, index) + if len(ret) == 0 { + panic("no return value specified for LoadBlockPart") + } + var r0 *types.Part if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok { r0 = rf(height, index) @@ -171,6 +211,10 @@ func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part { func (_m *BlockStore) LoadSeenCommit() *types.Commit { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LoadSeenCommit") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func() *types.Commit); ok { r0 = rf() @@ -187,6 +231,10 @@ func (_m *BlockStore) LoadSeenCommit() *types.Commit { func (_m *BlockStore) LoadSeenCommitAt(height int64) *types.Commit { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for LoadSeenCommitAt") + } + var r0 *types.Commit if rf, ok := ret.Get(0).(func(int64) *types.Commit); ok { r0 = rf(height) @@ -203,6 +251,10 @@ func (_m *BlockStore) LoadSeenCommitAt(height int64) *types.Commit { func (_m *BlockStore) PruneBlocks(height int64) (uint64, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for PruneBlocks") + } + var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(int64) (uint64, error)); ok { @@ -232,6 +284,10 @@ func (_m *BlockStore) SaveBlock(block *types.Block, blockParts *types.PartSet, s func (_m *BlockStore) Size() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Size") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() diff --git a/internal/state/mocks/evidence_pool.go b/internal/state/mocks/evidence_pool.go index 162d1035d3..ff16885fbd 100644 --- a/internal/state/mocks/evidence_pool.go +++ b/internal/state/mocks/evidence_pool.go @@ -20,6 +20,10 @@ type EvidencePool struct { func (_m *EvidencePool) AddEvidence(_a0 context.Context, _a1 types.Evidence) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for AddEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) error); ok { r0 = rf(_a0, _a1) @@ -34,6 +38,10 @@ func (_m *EvidencePool) AddEvidence(_a0 context.Context, _a1 types.Evidence) err func (_m *EvidencePool) CheckEvidence(_a0 context.Context, _a1 types.EvidenceList) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.EvidenceList) error); ok { r0 = rf(_a0, _a1) @@ -48,6 +56,10 @@ func (_m *EvidencePool) CheckEvidence(_a0 context.Context, _a1 types.EvidenceLis func (_m *EvidencePool) PendingEvidence(maxBytes int64) ([]types.Evidence, int64) { ret := _m.Called(maxBytes) + if len(ret) == 0 { + panic("no return value specified for PendingEvidence") + } + var r0 []types.Evidence var r1 int64 if rf, ok := ret.Get(0).(func(int64) ([]types.Evidence, int64)); ok { diff --git a/internal/state/mocks/executor.go b/internal/state/mocks/executor.go index daa92ee0dc..e287c60cc0 100644 --- a/internal/state/mocks/executor.go +++ b/internal/state/mocks/executor.go @@ -20,6 +20,10 @@ type Executor struct { func (_m *Executor) ApplyBlock(ctx context.Context, _a1 state.State, blockID types.BlockID, block *types.Block, commit *types.Commit) (state.State, error) { ret := _m.Called(ctx, _a1, blockID, block, commit) + if len(ret) == 0 { + panic("no return value specified for ApplyBlock") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(context.Context, state.State, types.BlockID, *types.Block, *types.Commit) (state.State, error)); ok { @@ -44,6 +48,10 @@ func (_m *Executor) ApplyBlock(ctx context.Context, _a1 state.State, blockID typ func (_m *Executor) CreateProposalBlock(ctx context.Context, height int64, round int32, _a3 state.State, commit *types.Commit, proposerProTxHash []byte, proposedAppVersion uint64) (*types.Block, state.CurrentRoundState, error) { ret := _m.Called(ctx, height, round, _a3, commit, proposerProTxHash, proposedAppVersion) + if len(ret) == 0 { + panic("no return value specified for CreateProposalBlock") + } + var r0 *types.Block var r1 state.CurrentRoundState var r2 error @@ -82,6 +90,10 @@ func (_m *Executor) ExtendVote(ctx context.Context, vote *types.Vote) { func (_m *Executor) FinalizeBlock(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, blockID types.BlockID, block *types.Block, commit *types.Commit) (state.State, error) { ret := _m.Called(ctx, _a1, uncommittedState, blockID, block, commit) + if len(ret) == 0 { + panic("no return value specified for FinalizeBlock") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(context.Context, state.State, state.CurrentRoundState, types.BlockID, *types.Block, *types.Commit) (state.State, error)); ok { @@ -106,6 +118,10 @@ func (_m *Executor) FinalizeBlock(ctx context.Context, _a1 state.State, uncommit func (_m *Executor) ProcessProposal(ctx context.Context, block *types.Block, round int32, _a3 state.State, verify bool) (state.CurrentRoundState, error) { ret := _m.Called(ctx, block, round, _a3, verify) + if len(ret) == 0 { + panic("no return value specified for ProcessProposal") + } + var r0 state.CurrentRoundState var r1 error if rf, ok := ret.Get(0).(func(context.Context, *types.Block, int32, state.State, bool) (state.CurrentRoundState, error)); ok { @@ -130,6 +146,10 @@ func (_m *Executor) ProcessProposal(ctx context.Context, block *types.Block, rou func (_m *Executor) ValidateBlock(ctx context.Context, _a1 state.State, block *types.Block) error { ret := _m.Called(ctx, _a1, block) + if len(ret) == 0 { + panic("no return value specified for ValidateBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, state.State, *types.Block) error); ok { r0 = rf(ctx, _a1, block) @@ -144,6 +164,10 @@ func (_m *Executor) ValidateBlock(ctx context.Context, _a1 state.State, block *t func (_m *Executor) ValidateBlockWithRoundState(ctx context.Context, _a1 state.State, uncommittedState state.CurrentRoundState, block *types.Block) error { ret := _m.Called(ctx, _a1, uncommittedState, block) + if len(ret) == 0 { + panic("no return value specified for ValidateBlockWithRoundState") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, state.State, state.CurrentRoundState, *types.Block) error); ok { r0 = rf(ctx, _a1, uncommittedState, block) @@ -158,6 +182,10 @@ func (_m *Executor) ValidateBlockWithRoundState(ctx context.Context, _a1 state.S func (_m *Executor) VerifyVoteExtension(ctx context.Context, vote *types.Vote) error { ret := _m.Called(ctx, vote) + if len(ret) == 0 { + panic("no return value specified for VerifyVoteExtension") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *types.Vote) error); ok { r0 = rf(ctx, vote) diff --git a/internal/state/mocks/store.go b/internal/state/mocks/store.go index 8f8fc65857..4a7fa92190 100644 --- a/internal/state/mocks/store.go +++ b/internal/state/mocks/store.go @@ -20,6 +20,10 @@ type Store struct { func (_m *Store) Bootstrap(_a0 state.State) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Bootstrap") + } + var r0 error if rf, ok := ret.Get(0).(func(state.State) error); ok { r0 = rf(_a0) @@ -34,6 +38,10 @@ func (_m *Store) Bootstrap(_a0 state.State) error { func (_m *Store) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -48,6 +56,10 @@ func (_m *Store) Close() error { func (_m *Store) Load() (state.State, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Load") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func() (state.State, error)); ok { @@ -72,6 +84,10 @@ func (_m *Store) Load() (state.State, error) { func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadABCIResponses") + } + var r0 *tendermintstate.ABCIResponses var r1 error if rf, ok := ret.Get(0).(func(int64) (*tendermintstate.ABCIResponses, error)); ok { @@ -98,6 +114,10 @@ func (_m *Store) LoadABCIResponses(_a0 int64) (*tendermintstate.ABCIResponses, e func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadConsensusParams") + } + var r0 types.ConsensusParams var r1 error if rf, ok := ret.Get(0).(func(int64) (types.ConsensusParams, error)); ok { @@ -122,6 +142,10 @@ func (_m *Store) LoadConsensusParams(_a0 int64) (types.ConsensusParams, error) { func (_m *Store) LoadValidators(_a0 int64) (*types.ValidatorSet, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for LoadValidators") + } + var r0 *types.ValidatorSet var r1 error if rf, ok := ret.Get(0).(func(int64) (*types.ValidatorSet, error)); ok { @@ -148,6 +172,10 @@ func (_m *Store) LoadValidators(_a0 int64) (*types.ValidatorSet, error) { func (_m *Store) PruneStates(_a0 int64) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PruneStates") + } + var r0 error if rf, ok := ret.Get(0).(func(int64) error); ok { r0 = rf(_a0) @@ -162,6 +190,10 @@ func (_m *Store) PruneStates(_a0 int64) error { func (_m *Store) Save(_a0 state.State) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Save") + } + var r0 error if rf, ok := ret.Get(0).(func(state.State) error); ok { r0 = rf(_a0) @@ -176,6 +208,10 @@ func (_m *Store) Save(_a0 state.State) error { func (_m *Store) SaveABCIResponses(_a0 int64, _a1 tendermintstate.ABCIResponses) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SaveABCIResponses") + } + var r0 error if rf, ok := ret.Get(0).(func(int64, tendermintstate.ABCIResponses) error); ok { r0 = rf(_a0, _a1) @@ -190,6 +226,10 @@ func (_m *Store) SaveABCIResponses(_a0 int64, _a1 tendermintstate.ABCIResponses) func (_m *Store) SaveValidatorSets(_a0 int64, _a1 int64, _a2 *types.ValidatorSet) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for SaveValidatorSets") + } + var r0 error if rf, ok := ret.Get(0).(func(int64, int64, *types.ValidatorSet) error); ok { r0 = rf(_a0, _a1, _a2) diff --git a/internal/statesync/mocks/state_provider.go b/internal/statesync/mocks/state_provider.go index b4301dffcb..73b6b7b372 100644 --- a/internal/statesync/mocks/state_provider.go +++ b/internal/statesync/mocks/state_provider.go @@ -23,6 +23,10 @@ type StateProvider struct { func (_m *StateProvider) AppHash(ctx context.Context, height uint64) (bytes.HexBytes, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for AppHash") + } + var r0 bytes.HexBytes var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (bytes.HexBytes, error)); ok { @@ -49,6 +53,10 @@ func (_m *StateProvider) AppHash(ctx context.Context, height uint64) (bytes.HexB func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Commit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *types.Commit var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (*types.Commit, error)); ok { @@ -75,6 +83,10 @@ func (_m *StateProvider) Commit(ctx context.Context, height uint64) (*types.Comm func (_m *StateProvider) State(ctx context.Context, height uint64) (state.State, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for State") + } + var r0 state.State var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint64) (state.State, error)); ok { diff --git a/libs/store/mocks/store.go b/libs/store/mocks/store.go index aa0d3779b8..f8d1989f64 100644 --- a/libs/store/mocks/store.go +++ b/libs/store/mocks/store.go @@ -16,6 +16,10 @@ type Store[K comparable, V interface{}] struct { func (_m *Store[K, V]) All() []V { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 []V if rf, ok := ret.Get(0).(func() []V); ok { r0 = rf() @@ -37,6 +41,10 @@ func (_m *Store[K, V]) Delete(key K) { func (_m *Store[K, V]) Get(key K) (V, bool) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 V var r1 bool if rf, ok := ret.Get(0).(func(K) (V, bool)); ok { @@ -61,6 +69,10 @@ func (_m *Store[K, V]) Get(key K) (V, bool) { func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for GetAndDelete") + } + var r0 V var r1 bool if rf, ok := ret.Get(0).(func(K) (V, bool)); ok { @@ -85,6 +97,10 @@ func (_m *Store[K, V]) GetAndDelete(key K) (V, bool) { func (_m *Store[K, V]) IsZero() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsZero") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -99,6 +115,10 @@ func (_m *Store[K, V]) IsZero() bool { func (_m *Store[K, V]) Len() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Len") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -118,6 +138,10 @@ func (_m *Store[K, V]) Put(key K, data V) { func (_m *Store[K, V]) Query(spec store.QueryFunc[K, V], limit int) []V { ret := _m.Called(spec, limit) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 []V if rf, ok := ret.Get(0).(func(store.QueryFunc[K, V], int) []V); ok { r0 = rf(spec, limit) diff --git a/light/provider/mocks/provider.go b/light/provider/mocks/provider.go index 93042ab3dc..24cd675bf9 100644 --- a/light/provider/mocks/provider.go +++ b/light/provider/mocks/provider.go @@ -19,6 +19,10 @@ type Provider struct { func (_m *Provider) ID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -33,6 +37,10 @@ func (_m *Provider) ID() string { func (_m *Provider) LightBlock(ctx context.Context, height int64) (*types.LightBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for LightBlock") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64) (*types.LightBlock, error)); ok { @@ -59,6 +67,10 @@ func (_m *Provider) LightBlock(ctx context.Context, height int64) (*types.LightB func (_m *Provider) ReportEvidence(_a0 context.Context, _a1 types.Evidence) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ReportEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) error); ok { r0 = rf(_a0, _a1) diff --git a/light/rpc/mocks/light_client.go b/light/rpc/mocks/light_client.go index deb22f7d2a..8d53cd4f91 100644 --- a/light/rpc/mocks/light_client.go +++ b/light/rpc/mocks/light_client.go @@ -21,6 +21,10 @@ type LightClient struct { func (_m *LightClient) ChainID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ChainID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -35,6 +39,10 @@ func (_m *LightClient) ChainID() string { func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *types.LightClientInfo if rf, ok := ret.Get(0).(func(context.Context) *types.LightClientInfo); ok { r0 = rf(ctx) @@ -51,6 +59,10 @@ func (_m *LightClient) Status(ctx context.Context) *types.LightClientInfo { func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error) { ret := _m.Called(height) + if len(ret) == 0 { + panic("no return value specified for TrustedLightBlock") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(int64) (*types.LightBlock, error)); ok { @@ -77,6 +89,10 @@ func (_m *LightClient) TrustedLightBlock(height int64) (*types.LightBlock, error func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightBlock, error) { ret := _m.Called(ctx, now) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, time.Time) (*types.LightBlock, error)); ok { @@ -103,6 +119,10 @@ func (_m *LightClient) Update(ctx context.Context, now time.Time) (*types.LightB func (_m *LightClient) VerifyLightBlockAtHeight(ctx context.Context, height int64, now time.Time) (*types.LightBlock, error) { ret := _m.Called(ctx, height, now) + if len(ret) == 0 { + panic("no return value specified for VerifyLightBlockAtHeight") + } + var r0 *types.LightBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, time.Time) (*types.LightBlock, error)); ok { diff --git a/rpc/client/mocks/abci_client.go b/rpc/client/mocks/abci_client.go index fc06ed551d..3d0cc35ca5 100644 --- a/rpc/client/mocks/abci_client.go +++ b/rpc/client/mocks/abci_client.go @@ -24,6 +24,10 @@ type ABCIClient struct { func (_m *ABCIClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ABCIInfo") + } + var r0 *coretypes.ResultABCIInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { @@ -50,6 +54,10 @@ func (_m *ABCIClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, func (_m *ABCIClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) + if len(ret) == 0 { + panic("no return value specified for ABCIQuery") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { @@ -76,6 +84,10 @@ func (_m *ABCIClient) ABCIQuery(ctx context.Context, path string, data bytes.Hex func (_m *ABCIClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) + if len(ret) == 0 { + panic("no return value specified for ABCIQueryWithOptions") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { @@ -102,6 +114,10 @@ func (_m *ABCIClient) ABCIQueryWithOptions(ctx context.Context, path string, dat func (_m *ABCIClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTx") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -128,6 +144,10 @@ func (_m *ABCIClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes func (_m *ABCIClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxAsync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -154,6 +174,10 @@ func (_m *ABCIClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*core func (_m *ABCIClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxCommit") + } + var r0 *coretypes.ResultBroadcastTxCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { @@ -180,6 +204,10 @@ func (_m *ABCIClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*cor func (_m *ABCIClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { diff --git a/rpc/client/mocks/client.go b/rpc/client/mocks/client.go index 22533b3666..c62a3347a0 100644 --- a/rpc/client/mocks/client.go +++ b/rpc/client/mocks/client.go @@ -24,6 +24,10 @@ type Client struct { func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ABCIInfo") + } + var r0 *coretypes.ResultABCIInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { @@ -50,6 +54,10 @@ func (_m *Client) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, erro func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) + if len(ret) == 0 { + panic("no return value specified for ABCIQuery") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { @@ -76,6 +84,10 @@ func (_m *Client) ABCIQuery(ctx context.Context, path string, data bytes.HexByte func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) + if len(ret) == 0 { + panic("no return value specified for ABCIQueryWithOptions") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { @@ -102,6 +114,10 @@ func (_m *Client) ABCIQueryWithOptions(ctx context.Context, path string, data by func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { @@ -128,6 +144,10 @@ func (_m *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBl func (_m *Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for BlockByHash") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { @@ -154,6 +174,10 @@ func (_m *Client) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*corety func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for BlockResults") + } + var r0 *coretypes.ResultBlockResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { @@ -180,6 +204,10 @@ func (_m *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.R func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for BlockSearch") + } + var r0 *coretypes.ResultBlockSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { @@ -206,6 +234,10 @@ func (_m *Client) BlockSearch(ctx context.Context, query string, page *int, perP func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) + if len(ret) == 0 { + panic("no return value specified for BlockchainInfo") + } + var r0 *coretypes.ResultBlockchainInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { @@ -232,6 +264,10 @@ func (_m *Client) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastEvidence") + } + var r0 *coretypes.ResultBroadcastEvidence var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { @@ -258,6 +294,10 @@ func (_m *Client) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*c func (_m *Client) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTx") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -284,6 +324,10 @@ func (_m *Client) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.Res func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxAsync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -310,6 +354,10 @@ func (_m *Client) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretype func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxCommit") + } + var r0 *coretypes.ResultBroadcastTxCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { @@ -336,6 +384,10 @@ func (_m *Client) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretyp func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -362,6 +414,10 @@ func (_m *Client) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *coretypes.ResultCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { @@ -388,6 +444,10 @@ func (_m *Client) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultC func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *coretypes.ResultCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { @@ -414,6 +474,10 @@ func (_m *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultC func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for ConsensusParams") + } + var r0 *coretypes.ResultConsensusParams var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { @@ -440,6 +504,10 @@ func (_m *Client) ConsensusParams(ctx context.Context, height *int64) (*coretype func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ConsensusState") + } + var r0 *coretypes.ResultConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { @@ -466,6 +534,10 @@ func (_m *Client) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensu func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DumpConsensusState") + } + var r0 *coretypes.ResultDumpConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { @@ -492,6 +564,10 @@ func (_m *Client) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDump func (_m *Client) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 *coretypes.ResultEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { @@ -518,6 +594,10 @@ func (_m *Client) Events(ctx context.Context, req *coretypes.RequestEvents) (*co func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Genesis") + } + var r0 *coretypes.ResultGenesis var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { @@ -544,6 +624,10 @@ func (_m *Client) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GenesisChunked") + } + var r0 *coretypes.ResultGenesisChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { @@ -570,6 +654,10 @@ func (_m *Client) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.Resu func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { @@ -596,6 +684,10 @@ func (_m *Client) Header(ctx context.Context, height *int64) (*coretypes.ResultH func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for HeaderByHash") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { @@ -622,6 +714,10 @@ func (_m *Client) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coret func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Health") + } + var r0 *coretypes.ResultHealth var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { @@ -648,6 +744,10 @@ func (_m *Client) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NetInfo") + } + var r0 *coretypes.ResultNetInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { @@ -674,6 +774,10 @@ func (_m *Client) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NumUnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -700,6 +804,10 @@ func (_m *Client) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUncon func (_m *Client) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RemoveTx") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { r0 = rf(_a0, _a1) @@ -714,6 +822,10 @@ func (_m *Client) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { func (_m *Client) Start(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -728,6 +840,10 @@ func (_m *Client) Start(_a0 context.Context) error { func (_m *Client) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *coretypes.ResultStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { @@ -761,6 +877,10 @@ func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 <-chan coretypes.ResultEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { @@ -787,6 +907,10 @@ func (_m *Client) Subscribe(ctx context.Context, subscriber string, query string func (_m *Client) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) + if len(ret) == 0 { + panic("no return value specified for Tx") + } + var r0 *coretypes.ResultTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { @@ -813,6 +937,10 @@ func (_m *Client) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*cor func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for TxSearch") + } + var r0 *coretypes.ResultTxSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { @@ -839,6 +967,10 @@ func (_m *Client) TxSearch(ctx context.Context, query string, prove bool, page * func (_m *Client) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) + if len(ret) == 0 { + panic("no return value specified for UnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -865,6 +997,10 @@ func (_m *Client) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) ( func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, subscriber, query) @@ -879,6 +1015,10 @@ func (_m *Client) Unsubscribe(ctx context.Context, subscriber string, query stri func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) + if len(ret) == 0 { + panic("no return value specified for UnsubscribeAll") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, subscriber) @@ -893,6 +1033,10 @@ func (_m *Client) UnsubscribeAll(ctx context.Context, subscriber string) error { func (_m *Client) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) + if len(ret) == 0 { + panic("no return value specified for Validators") + } + var r0 *coretypes.ResultValidators var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { diff --git a/rpc/client/mocks/events_client.go b/rpc/client/mocks/events_client.go index 092e7b15e6..469ce79ada 100644 --- a/rpc/client/mocks/events_client.go +++ b/rpc/client/mocks/events_client.go @@ -18,6 +18,10 @@ type EventsClient struct { func (_m *EventsClient) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 *coretypes.ResultEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { diff --git a/rpc/client/mocks/evidence_client.go b/rpc/client/mocks/evidence_client.go index 1b7817a0f1..fbd8316844 100644 --- a/rpc/client/mocks/evidence_client.go +++ b/rpc/client/mocks/evidence_client.go @@ -20,6 +20,10 @@ type EvidenceClient struct { func (_m *EvidenceClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastEvidence") + } + var r0 *coretypes.ResultBroadcastEvidence var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { diff --git a/rpc/client/mocks/history_client.go b/rpc/client/mocks/history_client.go index 280e1738a1..f4ae961c72 100644 --- a/rpc/client/mocks/history_client.go +++ b/rpc/client/mocks/history_client.go @@ -18,6 +18,10 @@ type HistoryClient struct { func (_m *HistoryClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) + if len(ret) == 0 { + panic("no return value specified for BlockchainInfo") + } + var r0 *coretypes.ResultBlockchainInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { @@ -44,6 +48,10 @@ func (_m *HistoryClient) BlockchainInfo(ctx context.Context, minHeight int64, ma func (_m *HistoryClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Genesis") + } + var r0 *coretypes.ResultGenesis var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { @@ -70,6 +78,10 @@ func (_m *HistoryClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, func (_m *HistoryClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GenesisChunked") + } + var r0 *coretypes.ResultGenesisChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { diff --git a/rpc/client/mocks/mempool_client.go b/rpc/client/mocks/mempool_client.go index 66c296e1fd..f294b23de2 100644 --- a/rpc/client/mocks/mempool_client.go +++ b/rpc/client/mocks/mempool_client.go @@ -20,6 +20,10 @@ type MempoolClient struct { func (_m *MempoolClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *coretypes.ResultCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { @@ -46,6 +50,10 @@ func (_m *MempoolClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes. func (_m *MempoolClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NumUnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -72,6 +80,10 @@ func (_m *MempoolClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.Resu func (_m *MempoolClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RemoveTx") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { r0 = rf(_a0, _a1) @@ -86,6 +98,10 @@ func (_m *MempoolClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { func (_m *MempoolClient) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) + if len(ret) == 0 { + panic("no return value specified for UnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { diff --git a/rpc/client/mocks/network_client.go b/rpc/client/mocks/network_client.go index f365a8a4c3..f9ae2ea916 100644 --- a/rpc/client/mocks/network_client.go +++ b/rpc/client/mocks/network_client.go @@ -18,6 +18,10 @@ type NetworkClient struct { func (_m *NetworkClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for ConsensusParams") + } + var r0 *coretypes.ResultConsensusParams var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { @@ -44,6 +48,10 @@ func (_m *NetworkClient) ConsensusParams(ctx context.Context, height *int64) (*c func (_m *NetworkClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ConsensusState") + } + var r0 *coretypes.ResultConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { @@ -70,6 +78,10 @@ func (_m *NetworkClient) ConsensusState(_a0 context.Context) (*coretypes.ResultC func (_m *NetworkClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DumpConsensusState") + } + var r0 *coretypes.ResultDumpConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { @@ -96,6 +108,10 @@ func (_m *NetworkClient) DumpConsensusState(_a0 context.Context) (*coretypes.Res func (_m *NetworkClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Health") + } + var r0 *coretypes.ResultHealth var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { @@ -122,6 +138,10 @@ func (_m *NetworkClient) Health(_a0 context.Context) (*coretypes.ResultHealth, e func (_m *NetworkClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NetInfo") + } + var r0 *coretypes.ResultNetInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { diff --git a/rpc/client/mocks/remote_client.go b/rpc/client/mocks/remote_client.go index a09c863c8f..1708786162 100644 --- a/rpc/client/mocks/remote_client.go +++ b/rpc/client/mocks/remote_client.go @@ -24,6 +24,10 @@ type RemoteClient struct { func (_m *RemoteClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ABCIInfo") + } + var r0 *coretypes.ResultABCIInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultABCIInfo, error)); ok { @@ -50,6 +54,10 @@ func (_m *RemoteClient) ABCIInfo(_a0 context.Context) (*coretypes.ResultABCIInfo func (_m *RemoteClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data) + if len(ret) == 0 { + panic("no return value specified for ABCIQuery") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes) (*coretypes.ResultABCIQuery, error)); ok { @@ -76,6 +84,10 @@ func (_m *RemoteClient) ABCIQuery(ctx context.Context, path string, data bytes.H func (_m *RemoteClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) { ret := _m.Called(ctx, path, data, opts) + if len(ret) == 0 { + panic("no return value specified for ABCIQueryWithOptions") + } + var r0 *coretypes.ResultABCIQuery var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bytes.HexBytes, client.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)); ok { @@ -102,6 +114,10 @@ func (_m *RemoteClient) ABCIQueryWithOptions(ctx context.Context, path string, d func (_m *RemoteClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { @@ -128,6 +144,10 @@ func (_m *RemoteClient) Block(ctx context.Context, height *int64) (*coretypes.Re func (_m *RemoteClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for BlockByHash") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { @@ -154,6 +174,10 @@ func (_m *RemoteClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (* func (_m *RemoteClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for BlockResults") + } + var r0 *coretypes.ResultBlockResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { @@ -180,6 +204,10 @@ func (_m *RemoteClient) BlockResults(ctx context.Context, height *int64) (*coret func (_m *RemoteClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for BlockSearch") + } + var r0 *coretypes.ResultBlockSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { @@ -206,6 +234,10 @@ func (_m *RemoteClient) BlockSearch(ctx context.Context, query string, page *int func (_m *RemoteClient) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) { ret := _m.Called(ctx, minHeight, maxHeight) + if len(ret) == 0 { + panic("no return value specified for BlockchainInfo") + } + var r0 *coretypes.ResultBlockchainInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64) (*coretypes.ResultBlockchainInfo, error)); ok { @@ -232,6 +264,10 @@ func (_m *RemoteClient) BlockchainInfo(ctx context.Context, minHeight int64, max func (_m *RemoteClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidence) (*coretypes.ResultBroadcastEvidence, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastEvidence") + } + var r0 *coretypes.ResultBroadcastEvidence var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Evidence) (*coretypes.ResultBroadcastEvidence, error)); ok { @@ -258,6 +294,10 @@ func (_m *RemoteClient) BroadcastEvidence(_a0 context.Context, _a1 types.Evidenc func (_m *RemoteClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTx") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -284,6 +324,10 @@ func (_m *RemoteClient) BroadcastTx(_a0 context.Context, _a1 types.Tx) (*coretyp func (_m *RemoteClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxAsync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -310,6 +354,10 @@ func (_m *RemoteClient) BroadcastTxAsync(_a0 context.Context, _a1 types.Tx) (*co func (_m *RemoteClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTxCommit, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxCommit") + } + var r0 *coretypes.ResultBroadcastTxCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTxCommit, error)); ok { @@ -336,6 +384,10 @@ func (_m *RemoteClient) BroadcastTxCommit(_a0 context.Context, _a1 types.Tx) (*c func (_m *RemoteClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultBroadcastTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } + var r0 *coretypes.ResultBroadcastTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)); ok { @@ -362,6 +414,10 @@ func (_m *RemoteClient) BroadcastTxSync(_a0 context.Context, _a1 types.Tx) (*cor func (_m *RemoteClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.ResultCheckTx, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CheckTx") + } + var r0 *coretypes.ResultCheckTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)); ok { @@ -388,6 +444,10 @@ func (_m *RemoteClient) CheckTx(_a0 context.Context, _a1 types.Tx) (*coretypes.R func (_m *RemoteClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *coretypes.ResultCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { @@ -414,6 +474,10 @@ func (_m *RemoteClient) Commit(ctx context.Context, height *int64) (*coretypes.R func (_m *RemoteClient) ConsensusParams(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for ConsensusParams") + } + var r0 *coretypes.ResultConsensusParams var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultConsensusParams, error)); ok { @@ -440,6 +504,10 @@ func (_m *RemoteClient) ConsensusParams(ctx context.Context, height *int64) (*co func (_m *RemoteClient) ConsensusState(_a0 context.Context) (*coretypes.ResultConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for ConsensusState") + } + var r0 *coretypes.ResultConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultConsensusState, error)); ok { @@ -466,6 +534,10 @@ func (_m *RemoteClient) ConsensusState(_a0 context.Context) (*coretypes.ResultCo func (_m *RemoteClient) DumpConsensusState(_a0 context.Context) (*coretypes.ResultDumpConsensusState, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for DumpConsensusState") + } + var r0 *coretypes.ResultDumpConsensusState var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultDumpConsensusState, error)); ok { @@ -492,6 +564,10 @@ func (_m *RemoteClient) DumpConsensusState(_a0 context.Context) (*coretypes.Resu func (_m *RemoteClient) Events(ctx context.Context, req *coretypes.RequestEvents) (*coretypes.ResultEvents, error) { ret := _m.Called(ctx, req) + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 *coretypes.ResultEvents var r1 error if rf, ok := ret.Get(0).(func(context.Context, *coretypes.RequestEvents) (*coretypes.ResultEvents, error)); ok { @@ -518,6 +594,10 @@ func (_m *RemoteClient) Events(ctx context.Context, req *coretypes.RequestEvents func (_m *RemoteClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Genesis") + } + var r0 *coretypes.ResultGenesis var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultGenesis, error)); ok { @@ -544,6 +624,10 @@ func (_m *RemoteClient) Genesis(_a0 context.Context) (*coretypes.ResultGenesis, func (_m *RemoteClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretypes.ResultGenesisChunk, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GenesisChunked") + } + var r0 *coretypes.ResultGenesisChunk var r1 error if rf, ok := ret.Get(0).(func(context.Context, uint) (*coretypes.ResultGenesisChunk, error)); ok { @@ -570,6 +654,10 @@ func (_m *RemoteClient) GenesisChunked(_a0 context.Context, _a1 uint) (*coretype func (_m *RemoteClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { @@ -596,6 +684,10 @@ func (_m *RemoteClient) Header(ctx context.Context, height *int64) (*coretypes.R func (_m *RemoteClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for HeaderByHash") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { @@ -622,6 +714,10 @@ func (_m *RemoteClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) ( func (_m *RemoteClient) Health(_a0 context.Context) (*coretypes.ResultHealth, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Health") + } + var r0 *coretypes.ResultHealth var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultHealth, error)); ok { @@ -648,6 +744,10 @@ func (_m *RemoteClient) Health(_a0 context.Context) (*coretypes.ResultHealth, er func (_m *RemoteClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NetInfo") + } + var r0 *coretypes.ResultNetInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultNetInfo, error)); ok { @@ -674,6 +774,10 @@ func (_m *RemoteClient) NetInfo(_a0 context.Context) (*coretypes.ResultNetInfo, func (_m *RemoteClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for NumUnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -700,6 +804,10 @@ func (_m *RemoteClient) NumUnconfirmedTxs(_a0 context.Context) (*coretypes.Resul func (_m *RemoteClient) Remote() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Remote") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -714,6 +822,10 @@ func (_m *RemoteClient) Remote() string { func (_m *RemoteClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for RemoveTx") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, types.TxKey) error); ok { r0 = rf(_a0, _a1) @@ -728,6 +840,10 @@ func (_m *RemoteClient) RemoveTx(_a0 context.Context, _a1 types.TxKey) error { func (_m *RemoteClient) Start(_a0 context.Context) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(_a0) @@ -742,6 +858,10 @@ func (_m *RemoteClient) Start(_a0 context.Context) error { func (_m *RemoteClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *coretypes.ResultStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { @@ -775,6 +895,10 @@ func (_m *RemoteClient) Subscribe(ctx context.Context, subscriber string, query _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 <-chan coretypes.ResultEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { @@ -801,6 +925,10 @@ func (_m *RemoteClient) Subscribe(ctx context.Context, subscriber string, query func (_m *RemoteClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) + if len(ret) == 0 { + panic("no return value specified for Tx") + } + var r0 *coretypes.ResultTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { @@ -827,6 +955,10 @@ func (_m *RemoteClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) func (_m *RemoteClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for TxSearch") + } + var r0 *coretypes.ResultTxSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { @@ -853,6 +985,10 @@ func (_m *RemoteClient) TxSearch(ctx context.Context, query string, prove bool, func (_m *RemoteClient) UnconfirmedTxs(ctx context.Context, page *int, perPage *int) (*coretypes.ResultUnconfirmedTxs, error) { ret := _m.Called(ctx, page, perPage) + if len(ret) == 0 { + panic("no return value specified for UnconfirmedTxs") + } + var r0 *coretypes.ResultUnconfirmedTxs var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int, *int) (*coretypes.ResultUnconfirmedTxs, error)); ok { @@ -879,6 +1015,10 @@ func (_m *RemoteClient) UnconfirmedTxs(ctx context.Context, page *int, perPage * func (_m *RemoteClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, subscriber, query) @@ -893,6 +1033,10 @@ func (_m *RemoteClient) Unsubscribe(ctx context.Context, subscriber string, quer func (_m *RemoteClient) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) + if len(ret) == 0 { + panic("no return value specified for UnsubscribeAll") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, subscriber) @@ -907,6 +1051,10 @@ func (_m *RemoteClient) UnsubscribeAll(ctx context.Context, subscriber string) e func (_m *RemoteClient) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) + if len(ret) == 0 { + panic("no return value specified for Validators") + } + var r0 *coretypes.ResultValidators var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { diff --git a/rpc/client/mocks/sign_client.go b/rpc/client/mocks/sign_client.go index 9d312d993d..dea02efa1d 100644 --- a/rpc/client/mocks/sign_client.go +++ b/rpc/client/mocks/sign_client.go @@ -21,6 +21,10 @@ type SignClient struct { func (_m *SignClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Block") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlock, error)); ok { @@ -47,6 +51,10 @@ func (_m *SignClient) Block(ctx context.Context, height *int64) (*coretypes.Resu func (_m *SignClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultBlock, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for BlockByHash") + } + var r0 *coretypes.ResultBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultBlock, error)); ok { @@ -73,6 +81,10 @@ func (_m *SignClient) BlockByHash(ctx context.Context, hash bytes.HexBytes) (*co func (_m *SignClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for BlockResults") + } + var r0 *coretypes.ResultBlockResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultBlockResults, error)); ok { @@ -99,6 +111,10 @@ func (_m *SignClient) BlockResults(ctx context.Context, height *int64) (*coretyp func (_m *SignClient) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) { ret := _m.Called(ctx, query, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for BlockSearch") + } + var r0 *coretypes.ResultBlockSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *int, *int, string) (*coretypes.ResultBlockSearch, error)); ok { @@ -125,6 +141,10 @@ func (_m *SignClient) BlockSearch(ctx context.Context, query string, page *int, func (_m *SignClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 *coretypes.ResultCommit var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultCommit, error)); ok { @@ -151,6 +171,10 @@ func (_m *SignClient) Commit(ctx context.Context, height *int64) (*coretypes.Res func (_m *SignClient) Header(ctx context.Context, height *int64) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for Header") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64) (*coretypes.ResultHeader, error)); ok { @@ -177,6 +201,10 @@ func (_m *SignClient) Header(ctx context.Context, height *int64) (*coretypes.Res func (_m *SignClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*coretypes.ResultHeader, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for HeaderByHash") + } + var r0 *coretypes.ResultHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (*coretypes.ResultHeader, error)); ok { @@ -203,6 +231,10 @@ func (_m *SignClient) HeaderByHash(ctx context.Context, hash bytes.HexBytes) (*c func (_m *SignClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) (*coretypes.ResultTx, error) { ret := _m.Called(ctx, hash, prove) + if len(ret) == 0 { + panic("no return value specified for Tx") + } + var r0 *coretypes.ResultTx var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes, bool) (*coretypes.ResultTx, error)); ok { @@ -229,6 +261,10 @@ func (_m *SignClient) Tx(ctx context.Context, hash bytes.HexBytes, prove bool) ( func (_m *SignClient) TxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) { ret := _m.Called(ctx, query, prove, page, perPage, orderBy) + if len(ret) == 0 { + panic("no return value specified for TxSearch") + } + var r0 *coretypes.ResultTxSearch var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool, *int, *int, string) (*coretypes.ResultTxSearch, error)); ok { @@ -255,6 +291,10 @@ func (_m *SignClient) TxSearch(ctx context.Context, query string, prove bool, pa func (_m *SignClient) Validators(ctx context.Context, height *int64, page *int, perPage *int, requestQuorumInfo *bool) (*coretypes.ResultValidators, error) { ret := _m.Called(ctx, height, page, perPage, requestQuorumInfo) + if len(ret) == 0 { + panic("no return value specified for Validators") + } + var r0 *coretypes.ResultValidators var r1 error if rf, ok := ret.Get(0).(func(context.Context, *int64, *int, *int, *bool) (*coretypes.ResultValidators, error)); ok { diff --git a/rpc/client/mocks/status_client.go b/rpc/client/mocks/status_client.go index 7094efff07..71f5a6f6a5 100644 --- a/rpc/client/mocks/status_client.go +++ b/rpc/client/mocks/status_client.go @@ -18,6 +18,10 @@ type StatusClient struct { func (_m *StatusClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *coretypes.ResultStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*coretypes.ResultStatus, error)); ok { diff --git a/rpc/client/mocks/subscription_client.go b/rpc/client/mocks/subscription_client.go index 512da36df5..84095a2b03 100644 --- a/rpc/client/mocks/subscription_client.go +++ b/rpc/client/mocks/subscription_client.go @@ -25,6 +25,10 @@ func (_m *SubscriptionClient) Subscribe(ctx context.Context, subscriber string, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Subscribe") + } + var r0 <-chan coretypes.ResultEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, ...int) (<-chan coretypes.ResultEvent, error)); ok { @@ -51,6 +55,10 @@ func (_m *SubscriptionClient) Subscribe(ctx context.Context, subscriber string, func (_m *SubscriptionClient) Unsubscribe(ctx context.Context, subscriber string, query string) error { ret := _m.Called(ctx, subscriber, query) + if len(ret) == 0 { + panic("no return value specified for Unsubscribe") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { r0 = rf(ctx, subscriber, query) @@ -65,6 +73,10 @@ func (_m *SubscriptionClient) Unsubscribe(ctx context.Context, subscriber string func (_m *SubscriptionClient) UnsubscribeAll(ctx context.Context, subscriber string) error { ret := _m.Called(ctx, subscriber) + if len(ret) == 0 { + panic("no return value specified for UnsubscribeAll") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, subscriber) diff --git a/types/mocks/block_event_publisher.go b/types/mocks/block_event_publisher.go index 8cd1f3d266..8f5c17f637 100644 --- a/types/mocks/block_event_publisher.go +++ b/types/mocks/block_event_publisher.go @@ -16,6 +16,10 @@ type BlockEventPublisher struct { func (_m *BlockEventPublisher) PublishEventNewBlock(_a0 types.EventDataNewBlock) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventNewBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataNewBlock) error); ok { r0 = rf(_a0) @@ -30,6 +34,10 @@ func (_m *BlockEventPublisher) PublishEventNewBlock(_a0 types.EventDataNewBlock) func (_m *BlockEventPublisher) PublishEventNewBlockHeader(_a0 types.EventDataNewBlockHeader) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventNewBlockHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataNewBlockHeader) error); ok { r0 = rf(_a0) @@ -44,6 +52,10 @@ func (_m *BlockEventPublisher) PublishEventNewBlockHeader(_a0 types.EventDataNew func (_m *BlockEventPublisher) PublishEventNewEvidence(_a0 types.EventDataNewEvidence) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventNewEvidence") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataNewEvidence) error); ok { r0 = rf(_a0) @@ -58,6 +70,10 @@ func (_m *BlockEventPublisher) PublishEventNewEvidence(_a0 types.EventDataNewEvi func (_m *BlockEventPublisher) PublishEventTx(_a0 types.EventDataTx) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventTx") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataTx) error); ok { r0 = rf(_a0) @@ -72,6 +88,10 @@ func (_m *BlockEventPublisher) PublishEventTx(_a0 types.EventDataTx) error { func (_m *BlockEventPublisher) PublishEventValidatorSetUpdates(_a0 types.EventDataValidatorSetUpdate) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for PublishEventValidatorSetUpdates") + } + var r0 error if rf, ok := ret.Get(0).(func(types.EventDataValidatorSetUpdate) error); ok { r0 = rf(_a0) diff --git a/types/mocks/priv_validator.go b/types/mocks/priv_validator.go index 9f75bf3771..4fff072e51 100644 --- a/types/mocks/priv_validator.go +++ b/types/mocks/priv_validator.go @@ -28,6 +28,10 @@ type PrivValidator struct { func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash bytes.HexBytes) *types.Validator { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for ExtractIntoValidator") + } + var r0 *types.Validator if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) *types.Validator); ok { r0 = rf(ctx, quorumHash) @@ -44,6 +48,10 @@ func (_m *PrivValidator) ExtractIntoValidator(ctx context.Context, quorumHash by func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetFirstQuorumHash") + } + var r0 bytes.HexBytes var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { @@ -70,6 +78,10 @@ func (_m *PrivValidator) GetFirstQuorumHash(_a0 context.Context) (bytes.HexBytes func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexBytes) (int64, error) { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for GetHeight") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (int64, error)); ok { @@ -94,6 +106,10 @@ func (_m *PrivValidator) GetHeight(ctx context.Context, quorumHash bytes.HexByte func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PrivKey, error) { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for GetPrivateKey") + } + var r0 crypto.PrivKey var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PrivKey, error)); ok { @@ -120,6 +136,10 @@ func (_m *PrivValidator) GetPrivateKey(ctx context.Context, quorumHash bytes.Hex func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetProTxHash") + } + var r0 bytes.HexBytes var r1 error if rf, ok := ret.Get(0).(func(context.Context) (bytes.HexBytes, error)); ok { @@ -146,6 +166,10 @@ func (_m *PrivValidator) GetProTxHash(_a0 context.Context) (bytes.HexBytes, erro func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for GetPubKey") + } + var r0 crypto.PubKey var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { @@ -172,6 +196,10 @@ func (_m *PrivValidator) GetPubKey(ctx context.Context, quorumHash bytes.HexByte func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash bytes.HexBytes) (crypto.PubKey, error) { ret := _m.Called(ctx, quorumHash) + if len(ret) == 0 { + panic("no return value specified for GetThresholdPublicKey") + } + var r0 crypto.PubKey var r1 error if rf, ok := ret.Get(0).(func(context.Context, bytes.HexBytes) (crypto.PubKey, error)); ok { @@ -198,6 +226,10 @@ func (_m *PrivValidator) GetThresholdPublicKey(ctx context.Context, quorumHash b func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, proposal *tenderminttypes.Proposal) (bytes.HexBytes, error) { ret := _m.Called(ctx, chainID, quorumType, quorumHash, proposal) + if len(ret) == 0 { + panic("no return value specified for SignProposal") + } + var r0 bytes.HexBytes var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Proposal) (bytes.HexBytes, error)); ok { @@ -224,6 +256,10 @@ func (_m *PrivValidator) SignProposal(ctx context.Context, chainID string, quoru func (_m *PrivValidator) SignVote(ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash bytes.HexBytes, vote *tenderminttypes.Vote, logger log.Logger) error { ret := _m.Called(ctx, chainID, quorumType, quorumHash, vote, logger) + if len(ret) == 0 { + panic("no return value specified for SignVote") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, btcjson.LLMQType, bytes.HexBytes, *tenderminttypes.Vote, log.Logger) error); ok { r0 = rf(ctx, chainID, quorumType, quorumHash, vote, logger)