Files
zeekay 7cf87b230b node-unified is the node
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.
2026-09-07 16:15:25 -07:00

221 lines
6.7 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/luxfi/node/vms/xvm/state (interfaces: Chain)
//
// Generated by this command:
//
// mockgen -package=statemock -destination=statemock/chain.go -mock_names=Chain=Chain . Chain
//
// Package statemock is a generated GoMock package.
package statemock
import (
reflect "reflect"
time "time"
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"
)
// Chain is a mock of Chain interface.
type Chain struct {
ctrl *gomock.Controller
recorder *ChainMockRecorder
isgomock struct{}
}
// ChainMockRecorder is the mock recorder for Chain.
type ChainMockRecorder struct {
mock *Chain
}
// NewChain creates a new mock instance.
func NewChain(ctrl *gomock.Controller) *Chain {
mock := &Chain{ctrl: ctrl}
mock.recorder = &ChainMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Chain) EXPECT() *ChainMockRecorder {
return m.recorder
}
// AddBlock mocks base method.
func (m *Chain) AddBlock(arg0 block.Block) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AddBlock", arg0)
}
// AddBlock indicates an expected call of AddBlock.
func (mr *ChainMockRecorder) AddBlock(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBlock", reflect.TypeOf((*Chain)(nil).AddBlock), arg0)
}
// AddTx mocks base method.
func (m *Chain) AddTx(tx *txs.Tx) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AddTx", tx)
}
// AddTx indicates an expected call of AddTx.
func (mr *ChainMockRecorder) AddTx(tx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTx", reflect.TypeOf((*Chain)(nil).AddTx), tx)
}
// AddUTXO mocks base method.
func (m *Chain) AddUTXO(arg0 *utxo.UTXO) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AddUTXO", arg0)
}
// AddUTXO indicates an expected call of AddUTXO.
func (mr *ChainMockRecorder) AddUTXO(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUTXO", reflect.TypeOf((*Chain)(nil).AddUTXO), arg0)
}
// DeleteUTXO mocks base method.
func (m *Chain) DeleteUTXO(utxoID ids.ID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "DeleteUTXO", utxoID)
}
// DeleteUTXO indicates an expected call of DeleteUTXO.
func (mr *ChainMockRecorder) DeleteUTXO(utxoID any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUTXO", reflect.TypeOf((*Chain)(nil).DeleteUTXO), utxoID)
}
// GetBlock mocks base method.
func (m *Chain) 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 *ChainMockRecorder) GetBlock(blkID any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*Chain)(nil).GetBlock), blkID)
}
// GetBlockIDAtHeight mocks base method.
func (m *Chain) 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 *ChainMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockIDAtHeight", reflect.TypeOf((*Chain)(nil).GetBlockIDAtHeight), height)
}
// GetLastAccepted mocks base method.
func (m *Chain) 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 *ChainMockRecorder) GetLastAccepted() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastAccepted", reflect.TypeOf((*Chain)(nil).GetLastAccepted))
}
// GetTimestamp mocks base method.
func (m *Chain) 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 *ChainMockRecorder) GetTimestamp() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTimestamp", reflect.TypeOf((*Chain)(nil).GetTimestamp))
}
// GetTx mocks base method.
func (m *Chain) 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 *ChainMockRecorder) GetTx(txID any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTx", reflect.TypeOf((*Chain)(nil).GetTx), txID)
}
// GetUTXO mocks base method.
func (m *Chain) 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 *ChainMockRecorder) GetUTXO(utxoID any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUTXO", reflect.TypeOf((*Chain)(nil).GetUTXO), utxoID)
}
// SetLastAccepted mocks base method.
func (m *Chain) SetLastAccepted(blkID ids.ID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetLastAccepted", blkID)
}
// SetLastAccepted indicates an expected call of SetLastAccepted.
func (mr *ChainMockRecorder) SetLastAccepted(blkID any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLastAccepted", reflect.TypeOf((*Chain)(nil).SetLastAccepted), blkID)
}
// SetTimestamp mocks base method.
func (m *Chain) SetTimestamp(t time.Time) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetTimestamp", t)
}
// SetTimestamp indicates an expected call of SetTimestamp.
func (mr *ChainMockRecorder) SetTimestamp(t any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTimestamp", reflect.TypeOf((*Chain)(nil).SetTimestamp), t)
}
// UTXOs mocks base method.
func (m *Chain) 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 *ChainMockRecorder) UTXOs(start, limit any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UTXOs", reflect.TypeOf((*Chain)(nil).UTXOs), start, limit)
}