Help us shape the future of Go! Take the 2026 Go Developer Survey

statemock

package
v1.30.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package statemock is a generated GoMock package.

Package statemock is a generated GoMock package.

Package statemock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	// contains filtered or unexported fields
}

Chain is a mock of Chain interface.

func NewChain

func NewChain(ctrl *gomock.Controller) *Chain

NewChain creates a new mock instance.

func (*Chain) AddBlock

func (m *Chain) AddBlock(arg0 block.Block)

AddBlock mocks base method.

func (*Chain) AddTx

func (m *Chain) AddTx(tx *txs.Tx)

AddTx mocks base method.

func (*Chain) AddUTXO

func (m *Chain) AddUTXO(utxo *lux.UTXO)

AddUTXO mocks base method.

func (*Chain) DeleteUTXO

func (m *Chain) DeleteUTXO(utxoID ids.ID)

DeleteUTXO mocks base method.

func (*Chain) EXPECT

func (m *Chain) EXPECT() *ChainMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*Chain) GetBlock

func (m *Chain) GetBlock(blkID ids.ID) (block.Block, error)

GetBlock mocks base method.

func (*Chain) GetBlockIDAtHeight

func (m *Chain) GetBlockIDAtHeight(height uint64) (ids.ID, error)

GetBlockIDAtHeight mocks base method.

func (*Chain) GetLastAccepted

func (m *Chain) GetLastAccepted() ids.ID

GetLastAccepted mocks base method.

func (*Chain) GetTimestamp

func (m *Chain) GetTimestamp() time.Time

GetTimestamp mocks base method.

func (*Chain) GetTx

func (m *Chain) GetTx(txID ids.ID) (*txs.Tx, error)

GetTx mocks base method.

func (*Chain) GetUTXO

func (m *Chain) GetUTXO(utxoID ids.ID) (*lux.UTXO, error)

GetUTXO mocks base method.

func (*Chain) SetLastAccepted

func (m *Chain) SetLastAccepted(blkID ids.ID)

SetLastAccepted mocks base method.

func (*Chain) SetTimestamp

func (m *Chain) SetTimestamp(t time.Time)

SetTimestamp mocks base method.

type ChainMockRecorder

type ChainMockRecorder struct {
	// contains filtered or unexported fields
}

ChainMockRecorder is the mock recorder for Chain.

func (*ChainMockRecorder) AddBlock

func (mr *ChainMockRecorder) AddBlock(arg0 any) *gomock.Call

AddBlock indicates an expected call of AddBlock.

func (*ChainMockRecorder) AddTx

func (mr *ChainMockRecorder) AddTx(tx any) *gomock.Call

AddTx indicates an expected call of AddTx.

func (*ChainMockRecorder) AddUTXO

func (mr *ChainMockRecorder) AddUTXO(utxo any) *gomock.Call

AddUTXO indicates an expected call of AddUTXO.

func (*ChainMockRecorder) DeleteUTXO

func (mr *ChainMockRecorder) DeleteUTXO(utxoID any) *gomock.Call

DeleteUTXO indicates an expected call of DeleteUTXO.

func (*ChainMockRecorder) GetBlock

func (mr *ChainMockRecorder) GetBlock(blkID any) *gomock.Call

GetBlock indicates an expected call of GetBlock.

func (*ChainMockRecorder) GetBlockIDAtHeight

func (mr *ChainMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call

GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.

func (*ChainMockRecorder) GetLastAccepted

func (mr *ChainMockRecorder) GetLastAccepted() *gomock.Call

GetLastAccepted indicates an expected call of GetLastAccepted.

func (*ChainMockRecorder) GetTimestamp

func (mr *ChainMockRecorder) GetTimestamp() *gomock.Call

GetTimestamp indicates an expected call of GetTimestamp.

func (*ChainMockRecorder) GetTx

func (mr *ChainMockRecorder) GetTx(txID any) *gomock.Call

GetTx indicates an expected call of GetTx.

func (*ChainMockRecorder) GetUTXO

func (mr *ChainMockRecorder) GetUTXO(utxoID any) *gomock.Call

GetUTXO indicates an expected call of GetUTXO.

func (*ChainMockRecorder) SetLastAccepted

func (mr *ChainMockRecorder) SetLastAccepted(blkID any) *gomock.Call

SetLastAccepted indicates an expected call of SetLastAccepted.

func (*ChainMockRecorder) SetTimestamp

func (mr *ChainMockRecorder) SetTimestamp(t any) *gomock.Call

SetTimestamp indicates an expected call of SetTimestamp.

type Diff

type Diff struct {
	// contains filtered or unexported fields
}

Diff is a mock of Diff interface.

func NewDiff

func NewDiff(ctrl *gomock.Controller) *Diff

NewDiff creates a new mock instance.

func (*Diff) AddBlock

func (m *Diff) AddBlock(arg0 block.Block)

AddBlock mocks base method.

func (*Diff) AddTx

func (m *Diff) AddTx(tx *txs.Tx)

AddTx mocks base method.

func (*Diff) AddUTXO

func (m *Diff) AddUTXO(utxo *lux.UTXO)

AddUTXO mocks base method.

func (*Diff) Apply

func (m *Diff) Apply(arg0 state.Chain)

Apply mocks base method.

func (*Diff) DeleteUTXO

func (m *Diff) DeleteUTXO(utxoID ids.ID)

DeleteUTXO mocks base method.

func (*Diff) EXPECT

func (m *Diff) EXPECT() *DiffMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*Diff) GetBlock

func (m *Diff) GetBlock(blkID ids.ID) (block.Block, error)

GetBlock mocks base method.

func (*Diff) GetBlockIDAtHeight

func (m *Diff) GetBlockIDAtHeight(height uint64) (ids.ID, error)

GetBlockIDAtHeight mocks base method.

func (*Diff) GetLastAccepted

func (m *Diff) GetLastAccepted() ids.ID

GetLastAccepted mocks base method.

func (*Diff) GetTimestamp

func (m *Diff) GetTimestamp() time.Time

GetTimestamp mocks base method.

func (*Diff) GetTx

func (m *Diff) GetTx(txID ids.ID) (*txs.Tx, error)

GetTx mocks base method.

func (*Diff) GetUTXO

func (m *Diff) GetUTXO(utxoID ids.ID) (*lux.UTXO, error)

GetUTXO mocks base method.

func (*Diff) SetLastAccepted

func (m *Diff) SetLastAccepted(blkID ids.ID)

SetLastAccepted mocks base method.

func (*Diff) SetTimestamp

func (m *Diff) SetTimestamp(t time.Time)

SetTimestamp mocks base method.

type DiffMockRecorder

type DiffMockRecorder struct {
	// contains filtered or unexported fields
}

DiffMockRecorder is the mock recorder for Diff.

func (*DiffMockRecorder) AddBlock

func (mr *DiffMockRecorder) AddBlock(arg0 any) *gomock.Call

AddBlock indicates an expected call of AddBlock.

func (*DiffMockRecorder) AddTx

func (mr *DiffMockRecorder) AddTx(tx any) *gomock.Call

AddTx indicates an expected call of AddTx.

func (*DiffMockRecorder) AddUTXO

func (mr *DiffMockRecorder) AddUTXO(utxo any) *gomock.Call

AddUTXO indicates an expected call of AddUTXO.

func (*DiffMockRecorder) Apply

func (mr *DiffMockRecorder) Apply(arg0 any) *gomock.Call

Apply indicates an expected call of Apply.

func (*DiffMockRecorder) DeleteUTXO

func (mr *DiffMockRecorder) DeleteUTXO(utxoID any) *gomock.Call

DeleteUTXO indicates an expected call of DeleteUTXO.

func (*DiffMockRecorder) GetBlock

func (mr *DiffMockRecorder) GetBlock(blkID any) *gomock.Call

GetBlock indicates an expected call of GetBlock.

func (*DiffMockRecorder) GetBlockIDAtHeight

func (mr *DiffMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call

GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.

func (*DiffMockRecorder) GetLastAccepted

func (mr *DiffMockRecorder) GetLastAccepted() *gomock.Call

GetLastAccepted indicates an expected call of GetLastAccepted.

func (*DiffMockRecorder) GetTimestamp

func (mr *DiffMockRecorder) GetTimestamp() *gomock.Call

GetTimestamp indicates an expected call of GetTimestamp.

func (*DiffMockRecorder) GetTx

func (mr *DiffMockRecorder) GetTx(txID any) *gomock.Call

GetTx indicates an expected call of GetTx.

func (*DiffMockRecorder) GetUTXO

func (mr *DiffMockRecorder) GetUTXO(utxoID any) *gomock.Call

GetUTXO indicates an expected call of GetUTXO.

func (*DiffMockRecorder) SetLastAccepted

func (mr *DiffMockRecorder) SetLastAccepted(blkID any) *gomock.Call

SetLastAccepted indicates an expected call of SetLastAccepted.

func (*DiffMockRecorder) SetTimestamp

func (mr *DiffMockRecorder) SetTimestamp(t any) *gomock.Call

SetTimestamp indicates an expected call of SetTimestamp.

type State

type State struct {
	// contains filtered or unexported fields
}

State is a mock of State interface.

func NewState

func NewState(ctrl *gomock.Controller) *State

NewState creates a new mock instance.

func (*State) Abort

func (m *State) Abort()

Abort mocks base method.

func (*State) AddBlock

func (m *State) AddBlock(arg0 block.Block)

AddBlock mocks base method.

func (*State) AddTx

func (m *State) AddTx(tx *txs.Tx)

AddTx mocks base method.

func (*State) AddUTXO

func (m *State) AddUTXO(utxo *lux.UTXO)

AddUTXO mocks base method.

func (*State) Checksum

func (m *State) Checksum() ids.ID

Checksum mocks base method.

func (*State) Close

func (m *State) Close() error

Close mocks base method.

func (*State) Commit

func (m *State) Commit() error

Commit mocks base method.

func (*State) CommitBatch

func (m *State) CommitBatch() (database.Batch, error)

CommitBatch mocks base method.

func (*State) DeleteUTXO

func (m *State) DeleteUTXO(utxoID ids.ID)

DeleteUTXO mocks base method.

func (*State) EXPECT

func (m *State) EXPECT() *StateMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*State) GetBlock

func (m *State) GetBlock(blkID ids.ID) (block.Block, error)

GetBlock mocks base method.

func (*State) GetBlockIDAtHeight

func (m *State) GetBlockIDAtHeight(height uint64) (ids.ID, error)

GetBlockIDAtHeight mocks base method.

func (*State) GetLastAccepted

func (m *State) GetLastAccepted() ids.ID

GetLastAccepted mocks base method.

func (*State) GetTimestamp

func (m *State) GetTimestamp() time.Time

GetTimestamp mocks base method.

func (*State) GetTx

func (m *State) GetTx(txID ids.ID) (*txs.Tx, error)

GetTx mocks base method.

func (*State) GetUTXO

func (m *State) GetUTXO(utxoID ids.ID) (*lux.UTXO, error)

GetUTXO mocks base method.

func (*State) InitializeChainState

func (m *State) InitializeChainState(stopVertexID ids.ID, genesisTimestamp time.Time) error

InitializeChainState mocks base method.

func (*State) IsInitialized

func (m *State) IsInitialized() (bool, error)

IsInitialized mocks base method.

func (*State) SetInitialized

func (m *State) SetInitialized() error

SetInitialized mocks base method.

func (*State) SetLastAccepted

func (m *State) SetLastAccepted(blkID ids.ID)

SetLastAccepted mocks base method.

func (*State) SetTimestamp

func (m *State) SetTimestamp(t time.Time)

SetTimestamp mocks base method.

func (*State) UTXOIDs

func (m *State) UTXOIDs(addr []byte, previous ids.ID, limit int) ([]ids.ID, error)

UTXOIDs mocks base method.

type StateMockRecorder

type StateMockRecorder struct {
	// contains filtered or unexported fields
}

StateMockRecorder is the mock recorder for State.

func (*StateMockRecorder) Abort

func (mr *StateMockRecorder) Abort() *gomock.Call

Abort indicates an expected call of Abort.

func (*StateMockRecorder) AddBlock

func (mr *StateMockRecorder) AddBlock(arg0 any) *gomock.Call

AddBlock indicates an expected call of AddBlock.

func (*StateMockRecorder) AddTx

func (mr *StateMockRecorder) AddTx(tx any) *gomock.Call

AddTx indicates an expected call of AddTx.

func (*StateMockRecorder) AddUTXO

func (mr *StateMockRecorder) AddUTXO(utxo any) *gomock.Call

AddUTXO indicates an expected call of AddUTXO.

func (*StateMockRecorder) Checksum

func (mr *StateMockRecorder) Checksum() *gomock.Call

Checksum indicates an expected call of Checksum.

func (*StateMockRecorder) Close

func (mr *StateMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*StateMockRecorder) Commit

func (mr *StateMockRecorder) Commit() *gomock.Call

Commit indicates an expected call of Commit.

func (*StateMockRecorder) CommitBatch

func (mr *StateMockRecorder) CommitBatch() *gomock.Call

CommitBatch indicates an expected call of CommitBatch.

func (*StateMockRecorder) DeleteUTXO

func (mr *StateMockRecorder) DeleteUTXO(utxoID any) *gomock.Call

DeleteUTXO indicates an expected call of DeleteUTXO.

func (*StateMockRecorder) GetBlock

func (mr *StateMockRecorder) GetBlock(blkID any) *gomock.Call

GetBlock indicates an expected call of GetBlock.

func (*StateMockRecorder) GetBlockIDAtHeight

func (mr *StateMockRecorder) GetBlockIDAtHeight(height any) *gomock.Call

GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.

func (*StateMockRecorder) GetLastAccepted

func (mr *StateMockRecorder) GetLastAccepted() *gomock.Call

GetLastAccepted indicates an expected call of GetLastAccepted.

func (*StateMockRecorder) GetTimestamp

func (mr *StateMockRecorder) GetTimestamp() *gomock.Call

GetTimestamp indicates an expected call of GetTimestamp.

func (*StateMockRecorder) GetTx

func (mr *StateMockRecorder) GetTx(txID any) *gomock.Call

GetTx indicates an expected call of GetTx.

func (*StateMockRecorder) GetUTXO

func (mr *StateMockRecorder) GetUTXO(utxoID any) *gomock.Call

GetUTXO indicates an expected call of GetUTXO.

func (*StateMockRecorder) InitializeChainState

func (mr *StateMockRecorder) InitializeChainState(stopVertexID, genesisTimestamp any) *gomock.Call

InitializeChainState indicates an expected call of InitializeChainState.

func (*StateMockRecorder) IsInitialized

func (mr *StateMockRecorder) IsInitialized() *gomock.Call

IsInitialized indicates an expected call of IsInitialized.

func (*StateMockRecorder) SetInitialized

func (mr *StateMockRecorder) SetInitialized() *gomock.Call

SetInitialized indicates an expected call of SetInitialized.

func (*StateMockRecorder) SetLastAccepted

func (mr *StateMockRecorder) SetLastAccepted(blkID any) *gomock.Call

SetLastAccepted indicates an expected call of SetLastAccepted.

func (*StateMockRecorder) SetTimestamp

func (mr *StateMockRecorder) SetTimestamp(t any) *gomock.Call

SetTimestamp indicates an expected call of SetTimestamp.

func (*StateMockRecorder) UTXOIDs

func (mr *StateMockRecorder) UTXOIDs(addr, previous, limit any) *gomock.Call

UTXOIDs indicates an expected call of UTXOIDs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL