check in mockgen stuff

This commit is contained in:
Roy Crihfield 2023-09-01 00:10:53 +08:00
parent 12b1b2df3d
commit b20a8a4771

View File

@ -0,0 +1,256 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/cerc-io/plugeth-statediff/indexer (interfaces: Indexer)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
big "math/big"
reflect "reflect"
time "time"
interfaces "github.com/cerc-io/plugeth-statediff/indexer/interfaces"
models "github.com/cerc-io/plugeth-statediff/indexer/models"
types "github.com/cerc-io/plugeth-statediff/types"
common "github.com/ethereum/go-ethereum/common"
types0 "github.com/ethereum/go-ethereum/core/types"
gomock "github.com/golang/mock/gomock"
)
// MockgenIndexer is a mock of Indexer interface.
type MockgenIndexer struct {
ctrl *gomock.Controller
recorder *MockgenIndexerMockRecorder
}
// MockgenIndexerMockRecorder is the mock recorder for MockgenIndexer.
type MockgenIndexerMockRecorder struct {
mock *MockgenIndexer
}
// NewMockgenIndexer creates a new mock instance.
func NewMockgenIndexer(ctrl *gomock.Controller) *MockgenIndexer {
mock := &MockgenIndexer{ctrl: ctrl}
mock.recorder = &MockgenIndexerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockgenIndexer) EXPECT() *MockgenIndexerMockRecorder {
return m.recorder
}
// BeginTx mocks base method.
func (m *MockgenIndexer) BeginTx(arg0 *big.Int, arg1 context.Context) interfaces.Batch {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BeginTx", arg0, arg1)
ret0, _ := ret[0].(interfaces.Batch)
return ret0
}
// BeginTx indicates an expected call of BeginTx.
func (mr *MockgenIndexerMockRecorder) BeginTx(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginTx", reflect.TypeOf((*MockgenIndexer)(nil).BeginTx), arg0, arg1)
}
// ClearWatchedAddresses mocks base method.
func (m *MockgenIndexer) ClearWatchedAddresses() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClearWatchedAddresses")
ret0, _ := ret[0].(error)
return ret0
}
// ClearWatchedAddresses indicates an expected call of ClearWatchedAddresses.
func (mr *MockgenIndexerMockRecorder) ClearWatchedAddresses() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearWatchedAddresses", reflect.TypeOf((*MockgenIndexer)(nil).ClearWatchedAddresses))
}
// Close mocks base method.
func (m *MockgenIndexer) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockgenIndexerMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockgenIndexer)(nil).Close))
}
// CurrentBlock mocks base method.
func (m *MockgenIndexer) CurrentBlock() (*models.HeaderModel, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CurrentBlock")
ret0, _ := ret[0].(*models.HeaderModel)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CurrentBlock indicates an expected call of CurrentBlock.
func (mr *MockgenIndexerMockRecorder) CurrentBlock() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentBlock", reflect.TypeOf((*MockgenIndexer)(nil).CurrentBlock))
}
// DetectGaps mocks base method.
func (m *MockgenIndexer) DetectGaps(arg0, arg1 uint64) ([]*interfaces.BlockGap, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DetectGaps", arg0, arg1)
ret0, _ := ret[0].([]*interfaces.BlockGap)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DetectGaps indicates an expected call of DetectGaps.
func (mr *MockgenIndexerMockRecorder) DetectGaps(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetectGaps", reflect.TypeOf((*MockgenIndexer)(nil).DetectGaps), arg0, arg1)
}
// HasBlock mocks base method.
func (m *MockgenIndexer) HasBlock(arg0 common.Hash, arg1 uint64) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HasBlock", arg0, arg1)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// HasBlock indicates an expected call of HasBlock.
func (mr *MockgenIndexerMockRecorder) HasBlock(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasBlock", reflect.TypeOf((*MockgenIndexer)(nil).HasBlock), arg0, arg1)
}
// InsertWatchedAddresses mocks base method.
func (m *MockgenIndexer) InsertWatchedAddresses(arg0 []types.WatchAddressArg, arg1 *big.Int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InsertWatchedAddresses", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// InsertWatchedAddresses indicates an expected call of InsertWatchedAddresses.
func (mr *MockgenIndexerMockRecorder) InsertWatchedAddresses(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertWatchedAddresses", reflect.TypeOf((*MockgenIndexer)(nil).InsertWatchedAddresses), arg0, arg1)
}
// LoadWatchedAddresses mocks base method.
func (m *MockgenIndexer) LoadWatchedAddresses() ([]common.Address, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LoadWatchedAddresses")
ret0, _ := ret[0].([]common.Address)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LoadWatchedAddresses indicates an expected call of LoadWatchedAddresses.
func (mr *MockgenIndexerMockRecorder) LoadWatchedAddresses() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadWatchedAddresses", reflect.TypeOf((*MockgenIndexer)(nil).LoadWatchedAddresses))
}
// PushBlock mocks base method.
func (m *MockgenIndexer) PushBlock(arg0 *types0.Block, arg1 types0.Receipts, arg2 *big.Int) (interfaces.Batch, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PushBlock", arg0, arg1, arg2)
ret0, _ := ret[0].(interfaces.Batch)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PushBlock indicates an expected call of PushBlock.
func (mr *MockgenIndexerMockRecorder) PushBlock(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushBlock", reflect.TypeOf((*MockgenIndexer)(nil).PushBlock), arg0, arg1, arg2)
}
// PushHeader mocks base method.
func (m *MockgenIndexer) PushHeader(arg0 interfaces.Batch, arg1 *types0.Header, arg2, arg3 *big.Int) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PushHeader", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PushHeader indicates an expected call of PushHeader.
func (mr *MockgenIndexerMockRecorder) PushHeader(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushHeader", reflect.TypeOf((*MockgenIndexer)(nil).PushHeader), arg0, arg1, arg2, arg3)
}
// PushIPLD mocks base method.
func (m *MockgenIndexer) PushIPLD(arg0 interfaces.Batch, arg1 types.IPLD) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PushIPLD", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// PushIPLD indicates an expected call of PushIPLD.
func (mr *MockgenIndexerMockRecorder) PushIPLD(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushIPLD", reflect.TypeOf((*MockgenIndexer)(nil).PushIPLD), arg0, arg1)
}
// PushStateNode mocks base method.
func (m *MockgenIndexer) PushStateNode(arg0 interfaces.Batch, arg1 types.StateLeafNode, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PushStateNode", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// PushStateNode indicates an expected call of PushStateNode.
func (mr *MockgenIndexerMockRecorder) PushStateNode(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushStateNode", reflect.TypeOf((*MockgenIndexer)(nil).PushStateNode), arg0, arg1, arg2)
}
// RemoveWatchedAddresses mocks base method.
func (m *MockgenIndexer) RemoveWatchedAddresses(arg0 []types.WatchAddressArg) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RemoveWatchedAddresses", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RemoveWatchedAddresses indicates an expected call of RemoveWatchedAddresses.
func (mr *MockgenIndexerMockRecorder) RemoveWatchedAddresses(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveWatchedAddresses", reflect.TypeOf((*MockgenIndexer)(nil).RemoveWatchedAddresses), arg0)
}
// ReportDBMetrics mocks base method.
func (m *MockgenIndexer) ReportDBMetrics(arg0 time.Duration, arg1 <-chan bool) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReportDBMetrics", arg0, arg1)
}
// ReportDBMetrics indicates an expected call of ReportDBMetrics.
func (mr *MockgenIndexerMockRecorder) ReportDBMetrics(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportDBMetrics", reflect.TypeOf((*MockgenIndexer)(nil).ReportDBMetrics), arg0, arg1)
}
// SetWatchedAddresses mocks base method.
func (m *MockgenIndexer) SetWatchedAddresses(arg0 []types.WatchAddressArg, arg1 *big.Int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetWatchedAddresses", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetWatchedAddresses indicates an expected call of SetWatchedAddresses.
func (mr *MockgenIndexerMockRecorder) SetWatchedAddresses(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWatchedAddresses", reflect.TypeOf((*MockgenIndexer)(nil).SetWatchedAddresses), arg0, arg1)
}