mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-18 22:14:35 +00:00
update rpc mocks
This commit is contained in:
@@ -75,13 +75,13 @@ func (_m *BlockIndexer) Search(ctx context.Context, q *query.Query) ([]int64, er
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type NewBlockIndexerT interface {
|
||||
type mockConstructorTestingTNewBlockIndexer interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewBlockIndexer creates a new instance of BlockIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewBlockIndexer(t NewBlockIndexerT) *BlockIndexer {
|
||||
func NewBlockIndexer(t mockConstructorTestingTNewBlockIndexer) *BlockIndexer {
|
||||
mock := &BlockIndexer{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
+18
-18
@@ -121,22 +121,6 @@ func (_m *BlockStore) LoadBlockMeta(height int64) *types.BlockMeta {
|
||||
return r0
|
||||
}
|
||||
|
||||
// LoadBlockPart provides a mock function with given fields: height, index
|
||||
func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part {
|
||||
ret := _m.Called(height, index)
|
||||
|
||||
var r0 *types.Part
|
||||
if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok {
|
||||
r0 = rf(height, index)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*types.Part)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// LoadBlockMetaByHash provides a mock function with given fields: hash
|
||||
func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta {
|
||||
ret := _m.Called(hash)
|
||||
@@ -153,6 +137,22 @@ func (_m *BlockStore) LoadBlockMetaByHash(hash []byte) *types.BlockMeta {
|
||||
return r0
|
||||
}
|
||||
|
||||
// LoadBlockPart provides a mock function with given fields: height, index
|
||||
func (_m *BlockStore) LoadBlockPart(height int64, index int) *types.Part {
|
||||
ret := _m.Called(height, index)
|
||||
|
||||
var r0 *types.Part
|
||||
if rf, ok := ret.Get(0).(func(int64, int) *types.Part); ok {
|
||||
r0 = rf(height, index)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*types.Part)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// LoadSeenCommit provides a mock function with given fields: height
|
||||
func (_m *BlockStore) LoadSeenCommit(height int64) *types.Commit {
|
||||
ret := _m.Called(height)
|
||||
@@ -209,13 +209,13 @@ func (_m *BlockStore) Size() int64 {
|
||||
return r0
|
||||
}
|
||||
|
||||
type NewBlockStoreT interface {
|
||||
type mockConstructorTestingTNewBlockStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewBlockStore creates a new instance of BlockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewBlockStore(t NewBlockStoreT) *BlockStore {
|
||||
func NewBlockStore(t mockConstructorTestingTNewBlockStore) *BlockStore {
|
||||
mock := &BlockStore{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -70,13 +70,13 @@ func (_m *EvidencePool) Update(_a0 state.State, _a1 types.EvidenceList) {
|
||||
_m.Called(_a0, _a1)
|
||||
}
|
||||
|
||||
type NewEvidencePoolT interface {
|
||||
type mockConstructorTestingTNewEvidencePool interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewEvidencePool creates a new instance of EvidencePool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewEvidencePool(t NewEvidencePoolT) *EvidencePool {
|
||||
func NewEvidencePool(t mockConstructorTestingTNewEvidencePool) *EvidencePool {
|
||||
mock := &EvidencePool{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -218,13 +218,13 @@ func (_m *Store) SaveABCIResponses(_a0 int64, _a1 *tendermintstate.ABCIResponses
|
||||
return r0
|
||||
}
|
||||
|
||||
type NewStoreT interface {
|
||||
type mockConstructorTestingTNewStore interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewStore(t NewStoreT) *Store {
|
||||
func NewStore(t mockConstructorTestingTNewStore) *Store {
|
||||
mock := &Store{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
@@ -92,13 +92,13 @@ func (_m *TxIndexer) Search(ctx context.Context, q *query.Query) ([]*types.TxRes
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
type NewTxIndexerT interface {
|
||||
type mockConstructorTestingTNewTxIndexer interface {
|
||||
mock.TestingT
|
||||
Cleanup(func())
|
||||
}
|
||||
|
||||
// NewTxIndexer creates a new instance of TxIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
||||
func NewTxIndexer(t NewTxIndexerT) *TxIndexer {
|
||||
func NewTxIndexer(t mockConstructorTestingTNewTxIndexer) *TxIndexer {
|
||||
mock := &TxIndexer{}
|
||||
mock.Mock.Test(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user