mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-09 04:21:20 +00:00
1a6b83b82c
1. Adds an eth/stagedsync/test package which provides a test Harness object 2. Adds the first automated test to the bor-heimdall stage regarding span persistence (more to come in subsequent PRs) 3. Fixes a bug in the bor-heimdall stage which was uncovered with the test - we do not fetch span 0 when we sync straight from blockNum=0 without snapshots 4. Reorganises all mocks to be placed under ./mock sub-package within their respective packages
67 lines
2.2 KiB
Go
67 lines
2.2 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/ledgerwatch/erigon/consensus/bor (interfaces: GenesisContract)
|
|
|
|
// Package mock is a generated GoMock package.
|
|
package mock
|
|
|
|
import (
|
|
big "math/big"
|
|
reflect "reflect"
|
|
|
|
gomock "github.com/golang/mock/gomock"
|
|
consensus "github.com/ledgerwatch/erigon/consensus"
|
|
rlp "github.com/ledgerwatch/erigon/rlp"
|
|
)
|
|
|
|
// MockGenesisContract is a mock of GenesisContract interface.
|
|
type MockGenesisContract struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockGenesisContractMockRecorder
|
|
}
|
|
|
|
// MockGenesisContractMockRecorder is the mock recorder for MockGenesisContract.
|
|
type MockGenesisContractMockRecorder struct {
|
|
mock *MockGenesisContract
|
|
}
|
|
|
|
// NewMockGenesisContract creates a new mock instance.
|
|
func NewMockGenesisContract(ctrl *gomock.Controller) *MockGenesisContract {
|
|
mock := &MockGenesisContract{ctrl: ctrl}
|
|
mock.recorder = &MockGenesisContractMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockGenesisContract) EXPECT() *MockGenesisContractMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// CommitState mocks base method.
|
|
func (m *MockGenesisContract) CommitState(arg0 rlp.RawValue, arg1 consensus.SystemCall) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "CommitState", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// CommitState indicates an expected call of CommitState.
|
|
func (mr *MockGenesisContractMockRecorder) CommitState(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitState", reflect.TypeOf((*MockGenesisContract)(nil).CommitState), arg0, arg1)
|
|
}
|
|
|
|
// LastStateId mocks base method.
|
|
func (m *MockGenesisContract) LastStateId(arg0 consensus.SystemCall) (*big.Int, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "LastStateId", arg0)
|
|
ret0, _ := ret[0].(*big.Int)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// LastStateId indicates an expected call of LastStateId.
|
|
func (mr *MockGenesisContractMockRecorder) LastStateId(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastStateId", reflect.TypeOf((*MockGenesisContract)(nil).LastStateId), arg0)
|
|
}
|