From 5aabf99502f6644d82430901bcdee69396afb8aa Mon Sep 17 00:00:00 2001 From: William Banfield Date: Wed, 23 Feb 2022 16:28:14 -0500 Subject: [PATCH] export BaseMock --- abci/types/mocks/base.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/abci/types/mocks/base.go b/abci/types/mocks/base.go index db25cfe29..6a91dccc3 100644 --- a/abci/types/mocks/base.go +++ b/abci/types/mocks/base.go @@ -4,13 +4,13 @@ import ( types "github.com/tendermint/tendermint/abci/types" ) -type baseMock struct { +type BaseMock struct { base *types.BaseApplication *Application } -func NewBaseMock() baseMock { - return baseMock{ +func NewBaseMock() BaseMock { + return BaseMock{ base: types.NewBaseApplication(), Application: new(Application), } @@ -18,7 +18,7 @@ func NewBaseMock() baseMock { // Info/Query Connection // Return application info -func (m baseMock) Info(input types.RequestInfo) types.ResponseInfo { +func (m BaseMock) Info(input types.RequestInfo) types.ResponseInfo { var ret types.ResponseInfo defer func() { if r := recover(); r != nil { @@ -29,7 +29,7 @@ func (m baseMock) Info(input types.RequestInfo) types.ResponseInfo { return ret } -func (m baseMock) Query(input types.RequestQuery) types.ResponseQuery { +func (m BaseMock) Query(input types.RequestQuery) types.ResponseQuery { var ret types.ResponseQuery defer func() { if r := recover(); r != nil { @@ -42,7 +42,7 @@ func (m baseMock) Query(input types.RequestQuery) types.ResponseQuery { // Mempool Connection // Validate a tx for the mempool -func (m baseMock) CheckTx(input types.RequestCheckTx) types.ResponseCheckTx { +func (m BaseMock) CheckTx(input types.RequestCheckTx) types.ResponseCheckTx { var ret types.ResponseCheckTx defer func() { if r := recover(); r != nil { @@ -55,7 +55,7 @@ func (m baseMock) CheckTx(input types.RequestCheckTx) types.ResponseCheckTx { // Consensus Connection // Initialize blockchain w validators/other info from TendermintCore -func (m baseMock) InitChain(input types.RequestInitChain) types.ResponseInitChain { +func (m BaseMock) InitChain(input types.RequestInitChain) types.ResponseInitChain { var ret types.ResponseInitChain defer func() { if r := recover(); r != nil { @@ -66,7 +66,7 @@ func (m baseMock) InitChain(input types.RequestInitChain) types.ResponseInitChai return ret } -func (m baseMock) PrepareProposal(input types.RequestPrepareProposal) types.ResponsePrepareProposal { +func (m BaseMock) PrepareProposal(input types.RequestPrepareProposal) types.ResponsePrepareProposal { var ret types.ResponsePrepareProposal defer func() { if r := recover(); r != nil { @@ -77,7 +77,7 @@ func (m baseMock) PrepareProposal(input types.RequestPrepareProposal) types.Resp return ret } -func (m baseMock) ProcessProposal(input types.RequestProcessProposal) types.ResponseProcessProposal { +func (m BaseMock) ProcessProposal(input types.RequestProcessProposal) types.ResponseProcessProposal { var ret types.ResponseProcessProposal defer func() { if r := recover(); r != nil { @@ -89,7 +89,7 @@ func (m baseMock) ProcessProposal(input types.RequestProcessProposal) types.Resp } // Commit the state and return the application Merkle root hash -func (m baseMock) Commit() types.ResponseCommit { +func (m BaseMock) Commit() types.ResponseCommit { var ret types.ResponseCommit defer func() { if r := recover(); r != nil { @@ -101,7 +101,7 @@ func (m baseMock) Commit() types.ResponseCommit { } // Create application specific vote extension -func (m baseMock) ExtendVote(input types.RequestExtendVote) types.ResponseExtendVote { +func (m BaseMock) ExtendVote(input types.RequestExtendVote) types.ResponseExtendVote { var ret types.ResponseExtendVote defer func() { if r := recover(); r != nil { @@ -113,7 +113,7 @@ func (m baseMock) ExtendVote(input types.RequestExtendVote) types.ResponseExtend } // Verify application's vote extension data -func (m baseMock) VerifyVoteExtension(input types.RequestVerifyVoteExtension) types.ResponseVerifyVoteExtension { +func (m BaseMock) VerifyVoteExtension(input types.RequestVerifyVoteExtension) types.ResponseVerifyVoteExtension { var ret types.ResponseVerifyVoteExtension defer func() { if r := recover(); r != nil { @@ -126,7 +126,7 @@ func (m baseMock) VerifyVoteExtension(input types.RequestVerifyVoteExtension) ty // State Sync Connection // List available snapshots -func (m baseMock) ListSnapshots(input types.RequestListSnapshots) types.ResponseListSnapshots { +func (m BaseMock) ListSnapshots(input types.RequestListSnapshots) types.ResponseListSnapshots { var ret types.ResponseListSnapshots defer func() { if r := recover(); r != nil { @@ -137,7 +137,7 @@ func (m baseMock) ListSnapshots(input types.RequestListSnapshots) types.Response return ret } -func (m baseMock) OfferSnapshot(input types.RequestOfferSnapshot) types.ResponseOfferSnapshot { +func (m BaseMock) OfferSnapshot(input types.RequestOfferSnapshot) types.ResponseOfferSnapshot { var ret types.ResponseOfferSnapshot defer func() { if r := recover(); r != nil { @@ -148,7 +148,7 @@ func (m baseMock) OfferSnapshot(input types.RequestOfferSnapshot) types.Response return ret } -func (m baseMock) LoadSnapshotChunk(input types.RequestLoadSnapshotChunk) types.ResponseLoadSnapshotChunk { +func (m BaseMock) LoadSnapshotChunk(input types.RequestLoadSnapshotChunk) types.ResponseLoadSnapshotChunk { var ret types.ResponseLoadSnapshotChunk defer func() { if r := recover(); r != nil { @@ -159,7 +159,7 @@ func (m baseMock) LoadSnapshotChunk(input types.RequestLoadSnapshotChunk) types. return ret } -func (m baseMock) ApplySnapshotChunk(input types.RequestApplySnapshotChunk) types.ResponseApplySnapshotChunk { +func (m BaseMock) ApplySnapshotChunk(input types.RequestApplySnapshotChunk) types.ResponseApplySnapshotChunk { var ret types.ResponseApplySnapshotChunk defer func() { if r := recover(); r != nil { @@ -170,7 +170,7 @@ func (m baseMock) ApplySnapshotChunk(input types.RequestApplySnapshotChunk) type return ret } -func (m baseMock) FinalizeBlock(input types.RequestFinalizeBlock) types.ResponseFinalizeBlock { +func (m BaseMock) FinalizeBlock(input types.RequestFinalizeBlock) types.ResponseFinalizeBlock { var ret types.ResponseFinalizeBlock defer func() { if r := recover(); r != nil {