mukan-consensus/state/txindex/mocks/tx_indexer.go
Mukan Erkin Törük ef24c0b67e
Some checks are pending
docker-build-cometbft / vars (push) Waiting to run
docker-build-cometbft / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-cometbft / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-cometbft / merge-images (push) Blocked by required conditions
docker-build-e2e-node / vars (push) Waiting to run
docker-build-e2e-node / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-e2e-node / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-e2e-node / merge-images (push) Blocked by required conditions
initial: sovereign Mukan Network fork
2026-05-11 03:18:27 +03:00

136 lines
3 KiB
Go

// Code generated by mockery v2.53.0. DO NOT EDIT.
package mocks
import (
context "context"
log "github.com/cometbft/cometbft/libs/log"
mock "github.com/stretchr/testify/mock"
query "github.com/cometbft/cometbft/libs/pubsub/query"
txindex "github.com/cometbft/cometbft/state/txindex"
types "github.com/cometbft/cometbft/abci/types"
)
// TxIndexer is an autogenerated mock type for the TxIndexer type
type TxIndexer struct {
mock.Mock
}
// AddBatch provides a mock function with given fields: b
func (_m *TxIndexer) AddBatch(b *txindex.Batch) error {
ret := _m.Called(b)
if len(ret) == 0 {
panic("no return value specified for AddBatch")
}
var r0 error
if rf, ok := ret.Get(0).(func(*txindex.Batch) error); ok {
r0 = rf(b)
} else {
r0 = ret.Error(0)
}
return r0
}
// Get provides a mock function with given fields: hash
func (_m *TxIndexer) Get(hash []byte) (*types.TxResult, error) {
ret := _m.Called(hash)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 *types.TxResult
var r1 error
if rf, ok := ret.Get(0).(func([]byte) (*types.TxResult, error)); ok {
return rf(hash)
}
if rf, ok := ret.Get(0).(func([]byte) *types.TxResult); ok {
r0 = rf(hash)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.TxResult)
}
}
if rf, ok := ret.Get(1).(func([]byte) error); ok {
r1 = rf(hash)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Index provides a mock function with given fields: result
func (_m *TxIndexer) Index(result *types.TxResult) error {
ret := _m.Called(result)
if len(ret) == 0 {
panic("no return value specified for Index")
}
var r0 error
if rf, ok := ret.Get(0).(func(*types.TxResult) error); ok {
r0 = rf(result)
} else {
r0 = ret.Error(0)
}
return r0
}
// Search provides a mock function with given fields: ctx, q
func (_m *TxIndexer) Search(ctx context.Context, q *query.Query) ([]*types.TxResult, error) {
ret := _m.Called(ctx, q)
if len(ret) == 0 {
panic("no return value specified for Search")
}
var r0 []*types.TxResult
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *query.Query) ([]*types.TxResult, error)); ok {
return rf(ctx, q)
}
if rf, ok := ret.Get(0).(func(context.Context, *query.Query) []*types.TxResult); ok {
r0 = rf(ctx, q)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*types.TxResult)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *query.Query) error); ok {
r1 = rf(ctx, q)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SetLogger provides a mock function with given fields: l
func (_m *TxIndexer) SetLogger(l log.Logger) {
_m.Called(l)
}
// 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.
// The first argument is typically a *testing.T value.
func NewTxIndexer(t interface {
mock.TestingT
Cleanup(func())
}) *TxIndexer {
mock := &TxIndexer{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}