make the rest of the code compile

This commit is contained in:
Callum Waters
2021-08-24 13:26:01 +02:00
parent dcf91478f8
commit 68c54f0676
283 changed files with 3874 additions and 3906 deletions

View File

@@ -4,7 +4,7 @@ import (
"context"
abcicli "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/pkg/abci"
)
//go:generate ../scripts/mockery_generate.sh AppConnConsensus|AppConnMempool|AppConnQuery|AppConnSnapshot
@@ -16,20 +16,20 @@ type AppConnConsensus interface {
SetResponseCallback(abcicli.Callback)
Error() error
InitChainSync(context.Context, types.RequestInitChain) (*types.ResponseInitChain, error)
InitChainSync(context.Context, abci.RequestInitChain) (*abci.ResponseInitChain, error)
BeginBlockSync(context.Context, types.RequestBeginBlock) (*types.ResponseBeginBlock, error)
DeliverTxAsync(context.Context, types.RequestDeliverTx) (*abcicli.ReqRes, error)
EndBlockSync(context.Context, types.RequestEndBlock) (*types.ResponseEndBlock, error)
CommitSync(context.Context) (*types.ResponseCommit, error)
BeginBlockSync(context.Context, abci.RequestBeginBlock) (*abci.ResponseBeginBlock, error)
DeliverTxAsync(context.Context, abci.RequestDeliverTx) (*abcicli.ReqRes, error)
EndBlockSync(context.Context, abci.RequestEndBlock) (*abci.ResponseEndBlock, error)
CommitSync(context.Context) (*abci.ResponseCommit, error)
}
type AppConnMempool interface {
SetResponseCallback(abcicli.Callback)
Error() error
CheckTxAsync(context.Context, types.RequestCheckTx) (*abcicli.ReqRes, error)
CheckTxSync(context.Context, types.RequestCheckTx) (*types.ResponseCheckTx, error)
CheckTxAsync(context.Context, abci.RequestCheckTx) (*abcicli.ReqRes, error)
CheckTxSync(context.Context, abci.RequestCheckTx) (*abci.ResponseCheckTx, error)
FlushAsync(context.Context) (*abcicli.ReqRes, error)
FlushSync(context.Context) error
@@ -38,18 +38,18 @@ type AppConnMempool interface {
type AppConnQuery interface {
Error() error
EchoSync(context.Context, string) (*types.ResponseEcho, error)
InfoSync(context.Context, types.RequestInfo) (*types.ResponseInfo, error)
QuerySync(context.Context, types.RequestQuery) (*types.ResponseQuery, error)
EchoSync(context.Context, string) (*abci.ResponseEcho, error)
InfoSync(context.Context, abci.RequestInfo) (*abci.ResponseInfo, error)
QuerySync(context.Context, abci.RequestQuery) (*abci.ResponseQuery, error)
}
type AppConnSnapshot interface {
Error() error
ListSnapshotsSync(context.Context, types.RequestListSnapshots) (*types.ResponseListSnapshots, error)
OfferSnapshotSync(context.Context, types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)
LoadSnapshotChunkSync(context.Context, types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)
ApplySnapshotChunkSync(context.Context, types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)
ListSnapshotsSync(context.Context, abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error)
OfferSnapshotSync(context.Context, abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error)
LoadSnapshotChunkSync(context.Context, abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error)
ApplySnapshotChunkSync(context.Context, abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error)
}
//-----------------------------------------------------------------------------------------
@@ -75,30 +75,30 @@ func (app *appConnConsensus) Error() error {
func (app *appConnConsensus) InitChainSync(
ctx context.Context,
req types.RequestInitChain,
) (*types.ResponseInitChain, error) {
req abci.RequestInitChain,
) (*abci.ResponseInitChain, error) {
return app.appConn.InitChainSync(ctx, req)
}
func (app *appConnConsensus) BeginBlockSync(
ctx context.Context,
req types.RequestBeginBlock,
) (*types.ResponseBeginBlock, error) {
req abci.RequestBeginBlock,
) (*abci.ResponseBeginBlock, error) {
return app.appConn.BeginBlockSync(ctx, req)
}
func (app *appConnConsensus) DeliverTxAsync(ctx context.Context, req types.RequestDeliverTx) (*abcicli.ReqRes, error) {
func (app *appConnConsensus) DeliverTxAsync(ctx context.Context, req abci.RequestDeliverTx) (*abcicli.ReqRes, error) {
return app.appConn.DeliverTxAsync(ctx, req)
}
func (app *appConnConsensus) EndBlockSync(
ctx context.Context,
req types.RequestEndBlock,
) (*types.ResponseEndBlock, error) {
req abci.RequestEndBlock,
) (*abci.ResponseEndBlock, error) {
return app.appConn.EndBlockSync(ctx, req)
}
func (app *appConnConsensus) CommitSync(ctx context.Context) (*types.ResponseCommit, error) {
func (app *appConnConsensus) CommitSync(ctx context.Context) (*abci.ResponseCommit, error) {
return app.appConn.CommitSync(ctx)
}
@@ -131,11 +131,11 @@ func (app *appConnMempool) FlushSync(ctx context.Context) error {
return app.appConn.FlushSync(ctx)
}
func (app *appConnMempool) CheckTxAsync(ctx context.Context, req types.RequestCheckTx) (*abcicli.ReqRes, error) {
func (app *appConnMempool) CheckTxAsync(ctx context.Context, req abci.RequestCheckTx) (*abcicli.ReqRes, error) {
return app.appConn.CheckTxAsync(ctx, req)
}
func (app *appConnMempool) CheckTxSync(ctx context.Context, req types.RequestCheckTx) (*types.ResponseCheckTx, error) {
func (app *appConnMempool) CheckTxSync(ctx context.Context, req abci.RequestCheckTx) (*abci.ResponseCheckTx, error) {
return app.appConn.CheckTxSync(ctx, req)
}
@@ -156,15 +156,15 @@ func (app *appConnQuery) Error() error {
return app.appConn.Error()
}
func (app *appConnQuery) EchoSync(ctx context.Context, msg string) (*types.ResponseEcho, error) {
func (app *appConnQuery) EchoSync(ctx context.Context, msg string) (*abci.ResponseEcho, error) {
return app.appConn.EchoSync(ctx, msg)
}
func (app *appConnQuery) InfoSync(ctx context.Context, req types.RequestInfo) (*types.ResponseInfo, error) {
func (app *appConnQuery) InfoSync(ctx context.Context, req abci.RequestInfo) (*abci.ResponseInfo, error) {
return app.appConn.InfoSync(ctx, req)
}
func (app *appConnQuery) QuerySync(ctx context.Context, reqQuery types.RequestQuery) (*types.ResponseQuery, error) {
func (app *appConnQuery) QuerySync(ctx context.Context, reqQuery abci.RequestQuery) (*abci.ResponseQuery, error) {
return app.appConn.QuerySync(ctx, reqQuery)
}
@@ -187,26 +187,26 @@ func (app *appConnSnapshot) Error() error {
func (app *appConnSnapshot) ListSnapshotsSync(
ctx context.Context,
req types.RequestListSnapshots,
) (*types.ResponseListSnapshots, error) {
req abci.RequestListSnapshots,
) (*abci.ResponseListSnapshots, error) {
return app.appConn.ListSnapshotsSync(ctx, req)
}
func (app *appConnSnapshot) OfferSnapshotSync(
ctx context.Context,
req types.RequestOfferSnapshot,
) (*types.ResponseOfferSnapshot, error) {
req abci.RequestOfferSnapshot,
) (*abci.ResponseOfferSnapshot, error) {
return app.appConn.OfferSnapshotSync(ctx, req)
}
func (app *appConnSnapshot) LoadSnapshotChunkSync(
ctx context.Context,
req types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
req abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error) {
return app.appConn.LoadSnapshotChunkSync(ctx, req)
}
func (app *appConnSnapshot) ApplySnapshotChunkSync(
ctx context.Context,
req types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
req abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error) {
return app.appConn.ApplySnapshotChunkSync(ctx, req)
}

View File

@@ -9,9 +9,9 @@ import (
abcicli "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/example/kvstore"
"github.com/tendermint/tendermint/abci/server"
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tmrand "github.com/tendermint/tendermint/libs/rand"
"github.com/tendermint/tendermint/pkg/abci"
)
//----------------------------------------
@@ -19,7 +19,7 @@ import (
type appConnTestI interface {
EchoAsync(ctx context.Context, msg string) (*abcicli.ReqRes, error)
FlushSync(context.Context) error
InfoSync(context.Context, types.RequestInfo) (*types.ResponseInfo, error)
InfoSync(context.Context, abci.RequestInfo) (*abci.ResponseInfo, error)
}
type appConnTest struct {
@@ -38,7 +38,7 @@ func (app *appConnTest) FlushSync(ctx context.Context) error {
return app.appConn.FlushSync(ctx)
}
func (app *appConnTest) InfoSync(ctx context.Context, req types.RequestInfo) (*types.ResponseInfo, error) {
func (app *appConnTest) InfoSync(ctx context.Context, req abci.RequestInfo) (*abci.ResponseInfo, error) {
return app.appConn.InfoSync(ctx, req)
}
@@ -143,7 +143,7 @@ func BenchmarkEcho(b *testing.B) {
}
b.StopTimer()
// info := proxy.InfoSync(types.RequestInfo{""})
// info := proxy.InfoSync(abci.RequestInfo{""})
// b.Log("N: ", b.N, info)
}

View File

@@ -6,8 +6,8 @@ import (
abcicli "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/example/kvstore"
"github.com/tendermint/tendermint/abci/types"
tmsync "github.com/tendermint/tendermint/internal/libs/sync"
"github.com/tendermint/tendermint/pkg/abci"
)
//go:generate ../scripts/mockery_generate.sh ClientCreator
@@ -23,12 +23,12 @@ type ClientCreator interface {
type localClientCreator struct {
mtx *tmsync.RWMutex
app types.Application
app abci.Application
}
// NewLocalClientCreator returns a ClientCreator for the given app,
// which will be running locally.
func NewLocalClientCreator(app types.Application) ClientCreator {
func NewLocalClientCreator(app abci.Application) ClientCreator {
return &localClientCreator{
mtx: new(tmsync.RWMutex),
app: app,
@@ -82,7 +82,7 @@ func DefaultClientCreator(addr, transport, dbDir string) (ClientCreator, io.Clos
app := kvstore.NewPersistentKVStoreApplication(dbDir)
return NewLocalClientCreator(app), app
case "noop":
return NewLocalClientCreator(types.NewBaseApplication()), noopCloser{}
return NewLocalClientCreator(abci.NewBaseApplication()), noopCloser{}
default:
mustConnect := false // loop retrying
return NewRemoteClientCreator(addr, transport, mustConnect), noopCloser{}

View File

@@ -3,13 +3,12 @@
package mocks
import (
abcicli "github.com/tendermint/tendermint/abci/client"
abci "github.com/tendermint/tendermint/pkg/abci"
context "context"
abcicli "github.com/tendermint/tendermint/abci/client"
mock "github.com/stretchr/testify/mock"
types "github.com/tendermint/tendermint/abci/types"
)
// AppConnConsensus is an autogenerated mock type for the AppConnConsensus type
@@ -18,20 +17,20 @@ type AppConnConsensus struct {
}
// BeginBlockSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnConsensus) BeginBlockSync(_a0 context.Context, _a1 types.RequestBeginBlock) (*types.ResponseBeginBlock, error) {
func (_m *AppConnConsensus) BeginBlockSync(_a0 context.Context, _a1 abci.RequestBeginBlock) (*abci.ResponseBeginBlock, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseBeginBlock
if rf, ok := ret.Get(0).(func(context.Context, types.RequestBeginBlock) *types.ResponseBeginBlock); ok {
var r0 *abci.ResponseBeginBlock
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestBeginBlock) *abci.ResponseBeginBlock); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseBeginBlock)
r0 = ret.Get(0).(*abci.ResponseBeginBlock)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestBeginBlock) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestBeginBlock) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -41,15 +40,15 @@ func (_m *AppConnConsensus) BeginBlockSync(_a0 context.Context, _a1 types.Reques
}
// CommitSync provides a mock function with given fields: _a0
func (_m *AppConnConsensus) CommitSync(_a0 context.Context) (*types.ResponseCommit, error) {
func (_m *AppConnConsensus) CommitSync(_a0 context.Context) (*abci.ResponseCommit, error) {
ret := _m.Called(_a0)
var r0 *types.ResponseCommit
if rf, ok := ret.Get(0).(func(context.Context) *types.ResponseCommit); ok {
var r0 *abci.ResponseCommit
if rf, ok := ret.Get(0).(func(context.Context) *abci.ResponseCommit); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseCommit)
r0 = ret.Get(0).(*abci.ResponseCommit)
}
}
@@ -64,11 +63,11 @@ func (_m *AppConnConsensus) CommitSync(_a0 context.Context) (*types.ResponseComm
}
// DeliverTxAsync provides a mock function with given fields: _a0, _a1
func (_m *AppConnConsensus) DeliverTxAsync(_a0 context.Context, _a1 types.RequestDeliverTx) (*abcicli.ReqRes, error) {
func (_m *AppConnConsensus) DeliverTxAsync(_a0 context.Context, _a1 abci.RequestDeliverTx) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *abcicli.ReqRes); ok {
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestDeliverTx) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -77,7 +76,7 @@ func (_m *AppConnConsensus) DeliverTxAsync(_a0 context.Context, _a1 types.Reques
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestDeliverTx) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestDeliverTx) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -87,20 +86,20 @@ func (_m *AppConnConsensus) DeliverTxAsync(_a0 context.Context, _a1 types.Reques
}
// EndBlockSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnConsensus) EndBlockSync(_a0 context.Context, _a1 types.RequestEndBlock) (*types.ResponseEndBlock, error) {
func (_m *AppConnConsensus) EndBlockSync(_a0 context.Context, _a1 abci.RequestEndBlock) (*abci.ResponseEndBlock, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseEndBlock
if rf, ok := ret.Get(0).(func(context.Context, types.RequestEndBlock) *types.ResponseEndBlock); ok {
var r0 *abci.ResponseEndBlock
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestEndBlock) *abci.ResponseEndBlock); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseEndBlock)
r0 = ret.Get(0).(*abci.ResponseEndBlock)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestEndBlock) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestEndBlock) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -124,20 +123,20 @@ func (_m *AppConnConsensus) Error() error {
}
// InitChainSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnConsensus) InitChainSync(_a0 context.Context, _a1 types.RequestInitChain) (*types.ResponseInitChain, error) {
func (_m *AppConnConsensus) InitChainSync(_a0 context.Context, _a1 abci.RequestInitChain) (*abci.ResponseInitChain, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseInitChain
if rf, ok := ret.Get(0).(func(context.Context, types.RequestInitChain) *types.ResponseInitChain); ok {
var r0 *abci.ResponseInitChain
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestInitChain) *abci.ResponseInitChain); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseInitChain)
r0 = ret.Get(0).(*abci.ResponseInitChain)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestInitChain) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestInitChain) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)

View File

@@ -3,13 +3,12 @@
package mocks
import (
abcicli "github.com/tendermint/tendermint/abci/client"
abci "github.com/tendermint/tendermint/pkg/abci"
context "context"
abcicli "github.com/tendermint/tendermint/abci/client"
mock "github.com/stretchr/testify/mock"
types "github.com/tendermint/tendermint/abci/types"
)
// AppConnMempool is an autogenerated mock type for the AppConnMempool type
@@ -18,11 +17,11 @@ type AppConnMempool struct {
}
// CheckTxAsync provides a mock function with given fields: _a0, _a1
func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 types.RequestCheckTx) (*abcicli.ReqRes, error) {
func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 abci.RequestCheckTx) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *abcicli.ReqRes); ok {
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestCheckTx) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -31,7 +30,7 @@ func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 types.RequestChe
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestCheckTx) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestCheckTx) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -41,20 +40,20 @@ func (_m *AppConnMempool) CheckTxAsync(_a0 context.Context, _a1 types.RequestChe
}
// CheckTxSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnMempool) CheckTxSync(_a0 context.Context, _a1 types.RequestCheckTx) (*types.ResponseCheckTx, error) {
func (_m *AppConnMempool) CheckTxSync(_a0 context.Context, _a1 abci.RequestCheckTx) (*abci.ResponseCheckTx, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseCheckTx
if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *types.ResponseCheckTx); ok {
var r0 *abci.ResponseCheckTx
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestCheckTx) *abci.ResponseCheckTx); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseCheckTx)
r0 = ret.Get(0).(*abci.ResponseCheckTx)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestCheckTx) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestCheckTx) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)

View File

@@ -5,9 +5,9 @@ package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
abci "github.com/tendermint/tendermint/pkg/abci"
types "github.com/tendermint/tendermint/abci/types"
mock "github.com/stretchr/testify/mock"
)
// AppConnQuery is an autogenerated mock type for the AppConnQuery type
@@ -16,15 +16,15 @@ type AppConnQuery struct {
}
// EchoSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnQuery) EchoSync(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) {
func (_m *AppConnQuery) EchoSync(_a0 context.Context, _a1 string) (*abci.ResponseEcho, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseEcho
if rf, ok := ret.Get(0).(func(context.Context, string) *types.ResponseEcho); ok {
var r0 *abci.ResponseEcho
if rf, ok := ret.Get(0).(func(context.Context, string) *abci.ResponseEcho); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseEcho)
r0 = ret.Get(0).(*abci.ResponseEcho)
}
}
@@ -53,20 +53,20 @@ func (_m *AppConnQuery) Error() error {
}
// InfoSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnQuery) InfoSync(_a0 context.Context, _a1 types.RequestInfo) (*types.ResponseInfo, error) {
func (_m *AppConnQuery) InfoSync(_a0 context.Context, _a1 abci.RequestInfo) (*abci.ResponseInfo, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseInfo
if rf, ok := ret.Get(0).(func(context.Context, types.RequestInfo) *types.ResponseInfo); ok {
var r0 *abci.ResponseInfo
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestInfo) *abci.ResponseInfo); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseInfo)
r0 = ret.Get(0).(*abci.ResponseInfo)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestInfo) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestInfo) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -76,20 +76,20 @@ func (_m *AppConnQuery) InfoSync(_a0 context.Context, _a1 types.RequestInfo) (*t
}
// QuerySync provides a mock function with given fields: _a0, _a1
func (_m *AppConnQuery) QuerySync(_a0 context.Context, _a1 types.RequestQuery) (*types.ResponseQuery, error) {
func (_m *AppConnQuery) QuerySync(_a0 context.Context, _a1 abci.RequestQuery) (*abci.ResponseQuery, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseQuery
if rf, ok := ret.Get(0).(func(context.Context, types.RequestQuery) *types.ResponseQuery); ok {
var r0 *abci.ResponseQuery
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestQuery) *abci.ResponseQuery); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseQuery)
r0 = ret.Get(0).(*abci.ResponseQuery)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestQuery) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestQuery) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)

View File

@@ -5,9 +5,9 @@ package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
abci "github.com/tendermint/tendermint/pkg/abci"
types "github.com/tendermint/tendermint/abci/types"
mock "github.com/stretchr/testify/mock"
)
// AppConnSnapshot is an autogenerated mock type for the AppConnSnapshot type
@@ -16,20 +16,20 @@ type AppConnSnapshot struct {
}
// ApplySnapshotChunkSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnSnapshot) ApplySnapshotChunkSync(_a0 context.Context, _a1 types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
func (_m *AppConnSnapshot) ApplySnapshotChunkSync(_a0 context.Context, _a1 abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseApplySnapshotChunk
if rf, ok := ret.Get(0).(func(context.Context, types.RequestApplySnapshotChunk) *types.ResponseApplySnapshotChunk); ok {
var r0 *abci.ResponseApplySnapshotChunk
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestApplySnapshotChunk) *abci.ResponseApplySnapshotChunk); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseApplySnapshotChunk)
r0 = ret.Get(0).(*abci.ResponseApplySnapshotChunk)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestApplySnapshotChunk) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestApplySnapshotChunk) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -53,20 +53,20 @@ func (_m *AppConnSnapshot) Error() error {
}
// ListSnapshotsSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnSnapshot) ListSnapshotsSync(_a0 context.Context, _a1 types.RequestListSnapshots) (*types.ResponseListSnapshots, error) {
func (_m *AppConnSnapshot) ListSnapshotsSync(_a0 context.Context, _a1 abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseListSnapshots
if rf, ok := ret.Get(0).(func(context.Context, types.RequestListSnapshots) *types.ResponseListSnapshots); ok {
var r0 *abci.ResponseListSnapshots
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestListSnapshots) *abci.ResponseListSnapshots); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseListSnapshots)
r0 = ret.Get(0).(*abci.ResponseListSnapshots)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestListSnapshots) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestListSnapshots) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -76,20 +76,20 @@ func (_m *AppConnSnapshot) ListSnapshotsSync(_a0 context.Context, _a1 types.Requ
}
// LoadSnapshotChunkSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnSnapshot) LoadSnapshotChunkSync(_a0 context.Context, _a1 types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
func (_m *AppConnSnapshot) LoadSnapshotChunkSync(_a0 context.Context, _a1 abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseLoadSnapshotChunk
if rf, ok := ret.Get(0).(func(context.Context, types.RequestLoadSnapshotChunk) *types.ResponseLoadSnapshotChunk); ok {
var r0 *abci.ResponseLoadSnapshotChunk
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestLoadSnapshotChunk) *abci.ResponseLoadSnapshotChunk); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseLoadSnapshotChunk)
r0 = ret.Get(0).(*abci.ResponseLoadSnapshotChunk)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestLoadSnapshotChunk) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestLoadSnapshotChunk) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -99,20 +99,20 @@ func (_m *AppConnSnapshot) LoadSnapshotChunkSync(_a0 context.Context, _a1 types.
}
// OfferSnapshotSync provides a mock function with given fields: _a0, _a1
func (_m *AppConnSnapshot) OfferSnapshotSync(_a0 context.Context, _a1 types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) {
func (_m *AppConnSnapshot) OfferSnapshotSync(_a0 context.Context, _a1 abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseOfferSnapshot
if rf, ok := ret.Get(0).(func(context.Context, types.RequestOfferSnapshot) *types.ResponseOfferSnapshot); ok {
var r0 *abci.ResponseOfferSnapshot
if rf, ok := ret.Get(0).(func(context.Context, abci.RequestOfferSnapshot) *abci.ResponseOfferSnapshot); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseOfferSnapshot)
r0 = ret.Get(0).(*abci.ResponseOfferSnapshot)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestOfferSnapshot) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, abci.RequestOfferSnapshot) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)

View File

@@ -1,7 +1,7 @@
package proxy
import (
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/pkg/abci"
"github.com/tendermint/tendermint/version"
)