mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
The module already called itself github.com/luxfi/node while containing no node in Go: cmd/luxd was twenty-one lines that printed the size of a few types, and the Go column of the matrix measured a VM plugin. A repo that fetches the thing it claims to be has not replaced it, so the Go sources move in — 1515 files, the daemon and everything under it — and the build reaches outside this module for nothing. Rust and C++ sit beside it unchanged and are still measured against it by the differential. That is the point of one repo: the reference implementation and the two ports are the same checkout, so parity is a thing you can run rather than a thing you assert. Verified: builds, and the closure carries no lux-private — checked at build time rather than believed. The daemon starts twelve chains on a local network (P X C Q Z A B G K M F, plus D through its plugin) and reports healthy.
759 lines
24 KiB
Go
759 lines
24 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/luxfi/node/vms/xvm/state (interfaces: Chain,State,Diff)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package=state -destination=vms/xvm/state/mock_state.go github.com/luxfi/node/vms/xvm/state Chain,State,Diff
|
|
//
|
|
|
|
// Package state is a generated GoMock package.
|
|
package state
|
|
|
|
import (
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
database "github.com/luxfi/database"
|
|
ids "github.com/luxfi/ids"
|
|
block "github.com/luxfi/node/vms/xvm/block"
|
|
txs "github.com/luxfi/node/vms/xvm/txs"
|
|
utxo "github.com/luxfi/utxo"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockChain is a mock of Chain interface.
|
|
type MockChain struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockChainMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockChainMockRecorder is the mock recorder for MockChain.
|
|
type MockChainMockRecorder struct {
|
|
mock *MockChain
|
|
}
|
|
|
|
// NewMockChain creates a new mock instance.
|
|
func NewMockChain(ctrl *gomock.Controller) *MockChain {
|
|
mock := &MockChain{ctrl: ctrl}
|
|
mock.recorder = &MockChainMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockChain) EXPECT() *MockChainMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// AddBlock mocks base method.
|
|
func (m *MockChain) AddBlock(arg0 block.Block) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddBlock", arg0)
|
|
}
|
|
|
|
// AddBlock indicates an expected call of AddBlock.
|
|
func (mr *MockChainMockRecorder) AddBlock(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlock", reflect.TypeOf((*MockChain)(nil).AddBlock), arg0)
|
|
}
|
|
|
|
// AddTx mocks base method.
|
|
func (m *MockChain) AddTx(tx *txs.Tx) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddTx", tx)
|
|
}
|
|
|
|
// AddTx indicates an expected call of AddTx.
|
|
func (mr *MockChainMockRecorder) AddTx(tx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTx", reflect.TypeOf((*MockChain)(nil).AddTx), tx)
|
|
}
|
|
|
|
// AddUTXO mocks base method.
|
|
func (m *MockChain) AddUTXO(arg0 *utxo.UTXO) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddUTXO", arg0)
|
|
}
|
|
|
|
// AddUTXO indicates an expected call of AddUTXO.
|
|
func (mr *MockChainMockRecorder) AddUTXO(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUTXO", reflect.TypeOf((*MockChain)(nil).AddUTXO), arg0)
|
|
}
|
|
|
|
// DeleteUTXO mocks base method.
|
|
func (m *MockChain) DeleteUTXO(utxoID ids.ID) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "DeleteUTXO", utxoID)
|
|
}
|
|
|
|
// DeleteUTXO indicates an expected call of DeleteUTXO.
|
|
func (mr *MockChainMockRecorder) DeleteUTXO(utxoID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUTXO", reflect.TypeOf((*MockChain)(nil).DeleteUTXO), utxoID)
|
|
}
|
|
|
|
// GetBlock mocks base method.
|
|
func (m *MockChain) GetBlock(blkID ids.ID) (block.Block, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBlock", blkID)
|
|
ret0, _ := ret[0].(block.Block)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBlock indicates an expected call of GetBlock.
|
|
func (mr *MockChainMockRecorder) GetBlock(blkID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockChain)(nil).GetBlock), blkID)
|
|
}
|
|
|
|
// GetBlockIDAtHeight mocks base method.
|
|
func (m *MockChain) GetBlockIDAtHeight(height uint64) (ids.ID, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBlockIDAtHeight", height)
|
|
ret0, _ := ret[0].(ids.ID)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.
|
|
func (mr *MockChainMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockIDAtHeight", reflect.TypeOf((*MockChain)(nil).GetBlockIDAtHeight), height)
|
|
}
|
|
|
|
// GetLastAccepted mocks base method.
|
|
func (m *MockChain) GetLastAccepted() ids.ID {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetLastAccepted")
|
|
ret0, _ := ret[0].(ids.ID)
|
|
return ret0
|
|
}
|
|
|
|
// GetLastAccepted indicates an expected call of GetLastAccepted.
|
|
func (mr *MockChainMockRecorder) GetLastAccepted() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastAccepted", reflect.TypeOf((*MockChain)(nil).GetLastAccepted))
|
|
}
|
|
|
|
// GetTimestamp mocks base method.
|
|
func (m *MockChain) GetTimestamp() time.Time {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetTimestamp")
|
|
ret0, _ := ret[0].(time.Time)
|
|
return ret0
|
|
}
|
|
|
|
// GetTimestamp indicates an expected call of GetTimestamp.
|
|
func (mr *MockChainMockRecorder) GetTimestamp() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTimestamp", reflect.TypeOf((*MockChain)(nil).GetTimestamp))
|
|
}
|
|
|
|
// GetTx mocks base method.
|
|
func (m *MockChain) GetTx(txID ids.ID) (*txs.Tx, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetTx", txID)
|
|
ret0, _ := ret[0].(*txs.Tx)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetTx indicates an expected call of GetTx.
|
|
func (mr *MockChainMockRecorder) GetTx(txID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTx", reflect.TypeOf((*MockChain)(nil).GetTx), txID)
|
|
}
|
|
|
|
// GetUTXO mocks base method.
|
|
func (m *MockChain) GetUTXO(utxoID ids.ID) (*utxo.UTXO, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetUTXO", utxoID)
|
|
ret0, _ := ret[0].(*utxo.UTXO)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetUTXO indicates an expected call of GetUTXO.
|
|
func (mr *MockChainMockRecorder) GetUTXO(utxoID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUTXO", reflect.TypeOf((*MockChain)(nil).GetUTXO), utxoID)
|
|
}
|
|
|
|
// SetLastAccepted mocks base method.
|
|
func (m *MockChain) SetLastAccepted(blkID ids.ID) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "SetLastAccepted", blkID)
|
|
}
|
|
|
|
// SetLastAccepted indicates an expected call of SetLastAccepted.
|
|
func (mr *MockChainMockRecorder) SetLastAccepted(blkID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLastAccepted", reflect.TypeOf((*MockChain)(nil).SetLastAccepted), blkID)
|
|
}
|
|
|
|
// SetTimestamp mocks base method.
|
|
func (m *MockChain) SetTimestamp(t time.Time) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "SetTimestamp", t)
|
|
}
|
|
|
|
// SetTimestamp indicates an expected call of SetTimestamp.
|
|
func (mr *MockChainMockRecorder) SetTimestamp(t any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTimestamp", reflect.TypeOf((*MockChain)(nil).SetTimestamp), t)
|
|
}
|
|
|
|
// UTXOs mocks base method.
|
|
func (m *MockChain) UTXOs(start ids.ID, limit int) ([]*utxo.UTXO, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UTXOs", start, limit)
|
|
ret0, _ := ret[0].([]*utxo.UTXO)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// UTXOs indicates an expected call of UTXOs.
|
|
func (mr *MockChainMockRecorder) UTXOs(start, limit any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UTXOs", reflect.TypeOf((*MockChain)(nil).UTXOs), start, limit)
|
|
}
|
|
|
|
// MockState is a mock of State interface.
|
|
type MockState struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockStateMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockStateMockRecorder is the mock recorder for MockState.
|
|
type MockStateMockRecorder struct {
|
|
mock *MockState
|
|
}
|
|
|
|
// NewMockState creates a new mock instance.
|
|
func NewMockState(ctrl *gomock.Controller) *MockState {
|
|
mock := &MockState{ctrl: ctrl}
|
|
mock.recorder = &MockStateMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockState) EXPECT() *MockStateMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Abort mocks base method.
|
|
func (m *MockState) Abort() {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "Abort")
|
|
}
|
|
|
|
// Abort indicates an expected call of Abort.
|
|
func (mr *MockStateMockRecorder) Abort() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Abort", reflect.TypeOf((*MockState)(nil).Abort))
|
|
}
|
|
|
|
// AddBlock mocks base method.
|
|
func (m *MockState) AddBlock(arg0 block.Block) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddBlock", arg0)
|
|
}
|
|
|
|
// AddBlock indicates an expected call of AddBlock.
|
|
func (mr *MockStateMockRecorder) AddBlock(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlock", reflect.TypeOf((*MockState)(nil).AddBlock), arg0)
|
|
}
|
|
|
|
// AddTx mocks base method.
|
|
func (m *MockState) AddTx(tx *txs.Tx) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddTx", tx)
|
|
}
|
|
|
|
// AddTx indicates an expected call of AddTx.
|
|
func (mr *MockStateMockRecorder) AddTx(tx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTx", reflect.TypeOf((*MockState)(nil).AddTx), tx)
|
|
}
|
|
|
|
// AddUTXO mocks base method.
|
|
func (m *MockState) AddUTXO(arg0 *utxo.UTXO) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddUTXO", arg0)
|
|
}
|
|
|
|
// AddUTXO indicates an expected call of AddUTXO.
|
|
func (mr *MockStateMockRecorder) AddUTXO(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUTXO", reflect.TypeOf((*MockState)(nil).AddUTXO), arg0)
|
|
}
|
|
|
|
// Checksum mocks base method.
|
|
func (m *MockState) Checksum() ids.ID {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Checksum")
|
|
ret0, _ := ret[0].(ids.ID)
|
|
return ret0
|
|
}
|
|
|
|
// Checksum indicates an expected call of Checksum.
|
|
func (mr *MockStateMockRecorder) Checksum() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Checksum", reflect.TypeOf((*MockState)(nil).Checksum))
|
|
}
|
|
|
|
// Close mocks base method.
|
|
func (m *MockState) 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 *MockStateMockRecorder) Close() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockState)(nil).Close))
|
|
}
|
|
|
|
// Commit mocks base method.
|
|
func (m *MockState) Commit() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Commit")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Commit indicates an expected call of Commit.
|
|
func (mr *MockStateMockRecorder) Commit() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockState)(nil).Commit))
|
|
}
|
|
|
|
// CommitBatch mocks base method.
|
|
func (m *MockState) CommitBatch() (database.Batch, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "CommitBatch")
|
|
ret0, _ := ret[0].(database.Batch)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// CommitBatch indicates an expected call of CommitBatch.
|
|
func (mr *MockStateMockRecorder) CommitBatch() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitBatch", reflect.TypeOf((*MockState)(nil).CommitBatch))
|
|
}
|
|
|
|
// DeleteUTXO mocks base method.
|
|
func (m *MockState) DeleteUTXO(utxoID ids.ID) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "DeleteUTXO", utxoID)
|
|
}
|
|
|
|
// DeleteUTXO indicates an expected call of DeleteUTXO.
|
|
func (mr *MockStateMockRecorder) DeleteUTXO(utxoID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUTXO", reflect.TypeOf((*MockState)(nil).DeleteUTXO), utxoID)
|
|
}
|
|
|
|
// GetBlock mocks base method.
|
|
func (m *MockState) GetBlock(blkID ids.ID) (block.Block, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBlock", blkID)
|
|
ret0, _ := ret[0].(block.Block)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBlock indicates an expected call of GetBlock.
|
|
func (mr *MockStateMockRecorder) GetBlock(blkID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockState)(nil).GetBlock), blkID)
|
|
}
|
|
|
|
// GetBlockIDAtHeight mocks base method.
|
|
func (m *MockState) GetBlockIDAtHeight(height uint64) (ids.ID, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBlockIDAtHeight", height)
|
|
ret0, _ := ret[0].(ids.ID)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.
|
|
func (mr *MockStateMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockIDAtHeight", reflect.TypeOf((*MockState)(nil).GetBlockIDAtHeight), height)
|
|
}
|
|
|
|
// GetLastAccepted mocks base method.
|
|
func (m *MockState) GetLastAccepted() ids.ID {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetLastAccepted")
|
|
ret0, _ := ret[0].(ids.ID)
|
|
return ret0
|
|
}
|
|
|
|
// GetLastAccepted indicates an expected call of GetLastAccepted.
|
|
func (mr *MockStateMockRecorder) GetLastAccepted() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastAccepted", reflect.TypeOf((*MockState)(nil).GetLastAccepted))
|
|
}
|
|
|
|
// GetTimestamp mocks base method.
|
|
func (m *MockState) GetTimestamp() time.Time {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetTimestamp")
|
|
ret0, _ := ret[0].(time.Time)
|
|
return ret0
|
|
}
|
|
|
|
// GetTimestamp indicates an expected call of GetTimestamp.
|
|
func (mr *MockStateMockRecorder) GetTimestamp() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTimestamp", reflect.TypeOf((*MockState)(nil).GetTimestamp))
|
|
}
|
|
|
|
// GetTx mocks base method.
|
|
func (m *MockState) GetTx(txID ids.ID) (*txs.Tx, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetTx", txID)
|
|
ret0, _ := ret[0].(*txs.Tx)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetTx indicates an expected call of GetTx.
|
|
func (mr *MockStateMockRecorder) GetTx(txID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTx", reflect.TypeOf((*MockState)(nil).GetTx), txID)
|
|
}
|
|
|
|
// GetUTXO mocks base method.
|
|
func (m *MockState) GetUTXO(utxoID ids.ID) (*utxo.UTXO, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetUTXO", utxoID)
|
|
ret0, _ := ret[0].(*utxo.UTXO)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetUTXO indicates an expected call of GetUTXO.
|
|
func (mr *MockStateMockRecorder) GetUTXO(utxoID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUTXO", reflect.TypeOf((*MockState)(nil).GetUTXO), utxoID)
|
|
}
|
|
|
|
// InitializeChainState mocks base method.
|
|
func (m *MockState) InitializeChainState(stopVertexID ids.ID, genesisTimestamp time.Time) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "InitializeChainState", stopVertexID, genesisTimestamp)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// InitializeChainState indicates an expected call of InitializeChainState.
|
|
func (mr *MockStateMockRecorder) InitializeChainState(stopVertexID, genesisTimestamp any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitializeChainState", reflect.TypeOf((*MockState)(nil).InitializeChainState), stopVertexID, genesisTimestamp)
|
|
}
|
|
|
|
// IsInitialized mocks base method.
|
|
func (m *MockState) IsInitialized() (bool, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "IsInitialized")
|
|
ret0, _ := ret[0].(bool)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// IsInitialized indicates an expected call of IsInitialized.
|
|
func (mr *MockStateMockRecorder) IsInitialized() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitialized", reflect.TypeOf((*MockState)(nil).IsInitialized))
|
|
}
|
|
|
|
// SetInitialized mocks base method.
|
|
func (m *MockState) SetInitialized() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "SetInitialized")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// SetInitialized indicates an expected call of SetInitialized.
|
|
func (mr *MockStateMockRecorder) SetInitialized() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInitialized", reflect.TypeOf((*MockState)(nil).SetInitialized))
|
|
}
|
|
|
|
// SetLastAccepted mocks base method.
|
|
func (m *MockState) SetLastAccepted(blkID ids.ID) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "SetLastAccepted", blkID)
|
|
}
|
|
|
|
// SetLastAccepted indicates an expected call of SetLastAccepted.
|
|
func (mr *MockStateMockRecorder) SetLastAccepted(blkID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLastAccepted", reflect.TypeOf((*MockState)(nil).SetLastAccepted), blkID)
|
|
}
|
|
|
|
// SetTimestamp mocks base method.
|
|
func (m *MockState) SetTimestamp(t time.Time) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "SetTimestamp", t)
|
|
}
|
|
|
|
// SetTimestamp indicates an expected call of SetTimestamp.
|
|
func (mr *MockStateMockRecorder) SetTimestamp(t any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTimestamp", reflect.TypeOf((*MockState)(nil).SetTimestamp), t)
|
|
}
|
|
|
|
// UTXOIDs mocks base method.
|
|
func (m *MockState) UTXOIDs(addr []byte, previous ids.ID, limit int) ([]ids.ID, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UTXOIDs", addr, previous, limit)
|
|
ret0, _ := ret[0].([]ids.ID)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// UTXOIDs indicates an expected call of UTXOIDs.
|
|
func (mr *MockStateMockRecorder) UTXOIDs(addr, previous, limit any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UTXOIDs", reflect.TypeOf((*MockState)(nil).UTXOIDs), addr, previous, limit)
|
|
}
|
|
|
|
// UTXOs mocks base method.
|
|
func (m *MockState) UTXOs(start ids.ID, limit int) ([]*utxo.UTXO, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UTXOs", start, limit)
|
|
ret0, _ := ret[0].([]*utxo.UTXO)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// UTXOs indicates an expected call of UTXOs.
|
|
func (mr *MockStateMockRecorder) UTXOs(start, limit any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UTXOs", reflect.TypeOf((*MockState)(nil).UTXOs), start, limit)
|
|
}
|
|
|
|
// MockDiff is a mock of Diff interface.
|
|
type MockDiff struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockDiffMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockDiffMockRecorder is the mock recorder for MockDiff.
|
|
type MockDiffMockRecorder struct {
|
|
mock *MockDiff
|
|
}
|
|
|
|
// NewMockDiff creates a new mock instance.
|
|
func NewMockDiff(ctrl *gomock.Controller) *MockDiff {
|
|
mock := &MockDiff{ctrl: ctrl}
|
|
mock.recorder = &MockDiffMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockDiff) EXPECT() *MockDiffMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// AddBlock mocks base method.
|
|
func (m *MockDiff) AddBlock(arg0 block.Block) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddBlock", arg0)
|
|
}
|
|
|
|
// AddBlock indicates an expected call of AddBlock.
|
|
func (mr *MockDiffMockRecorder) AddBlock(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlock", reflect.TypeOf((*MockDiff)(nil).AddBlock), arg0)
|
|
}
|
|
|
|
// AddTx mocks base method.
|
|
func (m *MockDiff) AddTx(tx *txs.Tx) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddTx", tx)
|
|
}
|
|
|
|
// AddTx indicates an expected call of AddTx.
|
|
func (mr *MockDiffMockRecorder) AddTx(tx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTx", reflect.TypeOf((*MockDiff)(nil).AddTx), tx)
|
|
}
|
|
|
|
// AddUTXO mocks base method.
|
|
func (m *MockDiff) AddUTXO(arg0 *utxo.UTXO) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "AddUTXO", arg0)
|
|
}
|
|
|
|
// AddUTXO indicates an expected call of AddUTXO.
|
|
func (mr *MockDiffMockRecorder) AddUTXO(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUTXO", reflect.TypeOf((*MockDiff)(nil).AddUTXO), arg0)
|
|
}
|
|
|
|
// Apply mocks base method.
|
|
func (m *MockDiff) Apply(arg0 Chain) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "Apply", arg0)
|
|
}
|
|
|
|
// Apply indicates an expected call of Apply.
|
|
func (mr *MockDiffMockRecorder) Apply(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockDiff)(nil).Apply), arg0)
|
|
}
|
|
|
|
// DeleteUTXO mocks base method.
|
|
func (m *MockDiff) DeleteUTXO(utxoID ids.ID) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "DeleteUTXO", utxoID)
|
|
}
|
|
|
|
// DeleteUTXO indicates an expected call of DeleteUTXO.
|
|
func (mr *MockDiffMockRecorder) DeleteUTXO(utxoID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUTXO", reflect.TypeOf((*MockDiff)(nil).DeleteUTXO), utxoID)
|
|
}
|
|
|
|
// GetBlock mocks base method.
|
|
func (m *MockDiff) GetBlock(blkID ids.ID) (block.Block, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBlock", blkID)
|
|
ret0, _ := ret[0].(block.Block)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBlock indicates an expected call of GetBlock.
|
|
func (mr *MockDiffMockRecorder) GetBlock(blkID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockDiff)(nil).GetBlock), blkID)
|
|
}
|
|
|
|
// GetBlockIDAtHeight mocks base method.
|
|
func (m *MockDiff) GetBlockIDAtHeight(height uint64) (ids.ID, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetBlockIDAtHeight", height)
|
|
ret0, _ := ret[0].(ids.ID)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.
|
|
func (mr *MockDiffMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockIDAtHeight", reflect.TypeOf((*MockDiff)(nil).GetBlockIDAtHeight), height)
|
|
}
|
|
|
|
// GetLastAccepted mocks base method.
|
|
func (m *MockDiff) GetLastAccepted() ids.ID {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetLastAccepted")
|
|
ret0, _ := ret[0].(ids.ID)
|
|
return ret0
|
|
}
|
|
|
|
// GetLastAccepted indicates an expected call of GetLastAccepted.
|
|
func (mr *MockDiffMockRecorder) GetLastAccepted() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastAccepted", reflect.TypeOf((*MockDiff)(nil).GetLastAccepted))
|
|
}
|
|
|
|
// GetTimestamp mocks base method.
|
|
func (m *MockDiff) GetTimestamp() time.Time {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetTimestamp")
|
|
ret0, _ := ret[0].(time.Time)
|
|
return ret0
|
|
}
|
|
|
|
// GetTimestamp indicates an expected call of GetTimestamp.
|
|
func (mr *MockDiffMockRecorder) GetTimestamp() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTimestamp", reflect.TypeOf((*MockDiff)(nil).GetTimestamp))
|
|
}
|
|
|
|
// GetTx mocks base method.
|
|
func (m *MockDiff) GetTx(txID ids.ID) (*txs.Tx, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetTx", txID)
|
|
ret0, _ := ret[0].(*txs.Tx)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetTx indicates an expected call of GetTx.
|
|
func (mr *MockDiffMockRecorder) GetTx(txID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTx", reflect.TypeOf((*MockDiff)(nil).GetTx), txID)
|
|
}
|
|
|
|
// GetUTXO mocks base method.
|
|
func (m *MockDiff) GetUTXO(utxoID ids.ID) (*utxo.UTXO, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetUTXO", utxoID)
|
|
ret0, _ := ret[0].(*utxo.UTXO)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetUTXO indicates an expected call of GetUTXO.
|
|
func (mr *MockDiffMockRecorder) GetUTXO(utxoID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUTXO", reflect.TypeOf((*MockDiff)(nil).GetUTXO), utxoID)
|
|
}
|
|
|
|
// SetLastAccepted mocks base method.
|
|
func (m *MockDiff) SetLastAccepted(blkID ids.ID) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "SetLastAccepted", blkID)
|
|
}
|
|
|
|
// SetLastAccepted indicates an expected call of SetLastAccepted.
|
|
func (mr *MockDiffMockRecorder) SetLastAccepted(blkID any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLastAccepted", reflect.TypeOf((*MockDiff)(nil).SetLastAccepted), blkID)
|
|
}
|
|
|
|
// SetTimestamp mocks base method.
|
|
func (m *MockDiff) SetTimestamp(t time.Time) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "SetTimestamp", t)
|
|
}
|
|
|
|
// SetTimestamp indicates an expected call of SetTimestamp.
|
|
func (mr *MockDiffMockRecorder) SetTimestamp(t any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTimestamp", reflect.TypeOf((*MockDiff)(nil).SetTimestamp), t)
|
|
}
|
|
|
|
// UTXOs mocks base method.
|
|
func (m *MockDiff) UTXOs(start ids.ID, limit int) ([]*utxo.UTXO, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UTXOs", start, limit)
|
|
ret0, _ := ret[0].([]*utxo.UTXO)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// UTXOs indicates an expected call of UTXOs.
|
|
func (mr *MockDiffMockRecorder) UTXOs(start, limit any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UTXOs", reflect.TypeOf((*MockDiff)(nil).UTXOs), start, limit)
|
|
}
|