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

executor

package
v1.29.0 Latest Latest
Warning

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

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

Documentation

Overview

Package executor is a generated GoMock package.

Index

Constants

View Source
const SyncBound = 10 * time.Second

Variables

View Source
var (
	ErrUnexpectedMerkleRoot        = errors.New("unexpected merkle root")
	ErrTimestampBeyondSyncBound    = errors.New("proposed timestamp is too far in the future relative to local time")
	ErrEmptyBlock                  = errors.New("block contains no transactions")
	ErrChildBlockEarlierThanParent = errors.New("proposed timestamp before current chain time")
	ErrConflictingBlockTxs         = errors.New("block contains conflicting transactions")
	ErrIncorrectHeight             = errors.New("block has incorrect height")
	ErrBlockNotFound               = errors.New("block not found")
)
View Source
var (
	ErrChainNotSynced       = errors.New("chain not synced")
	ErrConflictingParentTxs = errors.New("block contains a transaction that conflicts with a transaction in a parent block")
)

Functions

This section is empty.

Types

type Block

type Block struct {
	block.Block
	// contains filtered or unexported fields
}

Exported for testing in xvm package.

func (*Block) Accept

func (b *Block) Accept(ctx context.Context) error

func (*Block) EpochBit added in v1.11.14

func (b *Block) EpochBit() bool

EpochBit returns the epoch bit for FPC

func (*Block) FPCVotes added in v1.11.14

func (b *Block) FPCVotes() [][]byte

FPCVotes returns embedded fast-path vote references

func (*Block) ParentID added in v1.16.16

func (b *Block) ParentID() ids.ID

ParentID returns the parent block ID

func (*Block) Reject

func (b *Block) Reject(ctx context.Context) error

func (*Block) Status

func (b *Block) Status() uint8

Status returns the status of this block

func (*Block) Verify

func (b *Block) Verify(ctx context.Context) error

type Manager

type Manager interface {
	state.Versions

	// Returns the ID of the most recently accepted block.
	LastAccepted() ids.ID

	SetPreference(blkID ids.ID)
	Preferred() ids.ID

	GetBlock(blkID ids.ID) (chain.Block, error)
	GetStatelessBlock(blkID ids.ID) (block.Block, error)
	NewBlock(block.Block) chain.Block

	// VerifyTx verifies that the transaction can be issued based on the currently
	// preferred state. This should *not* be used to verify transactions in a block.
	VerifyTx(tx *txs.Tx) error

	// VerifyUniqueInputs returns nil iff no blocks in the inclusive
	// ancestry of [blkID] consume an input in [inputs].
	VerifyUniqueInputs(blkID ids.ID, inputs set.Set[ids.ID]) error
}

func NewManager

func NewManager(
	mempool mempool.Mempool[*txs.Tx],
	metrics metrics.Metrics,
	state state.State,
	backend *executor.Backend,
	clk *mockable.Clock,
	onAccept func(*txs.Tx),
) Manager

type MockManager added in v1.1.11

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

MockManager is a mock of Manager interface.

func NewMockManager added in v1.1.11

func NewMockManager(ctrl *gomock.Controller) *MockManager

NewMockManager creates a new mock instance.

func (*MockManager) EXPECT added in v1.1.11

func (m *MockManager) EXPECT() *MockManagerMockRecorder

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

func (*MockManager) GetBlock added in v1.1.11

func (m *MockManager) GetBlock(blkID ids.ID) (chain.Block, error)

GetBlock mocks base method.

func (*MockManager) GetState added in v1.1.11

func (m *MockManager) GetState(blkID ids.ID) (state.Chain, bool)

GetState mocks base method.

func (*MockManager) GetStatelessBlock added in v1.1.11

func (m *MockManager) GetStatelessBlock(blkID ids.ID) (block.Block, error)

GetStatelessBlock mocks base method.

func (*MockManager) LastAccepted added in v1.1.11

func (m *MockManager) LastAccepted() ids.ID

LastAccepted mocks base method.

func (*MockManager) NewBlock added in v1.1.11

func (m *MockManager) NewBlock(arg0 block.Block) chain.Block

NewBlock mocks base method.

func (*MockManager) Preferred added in v1.1.11

func (m *MockManager) Preferred() ids.ID

Preferred mocks base method.

func (*MockManager) SetPreference added in v1.1.11

func (m *MockManager) SetPreference(blkID ids.ID)

SetPreference mocks base method.

func (*MockManager) VerifyTx added in v1.1.11

func (m *MockManager) VerifyTx(tx *txs.Tx) error

VerifyTx mocks base method.

func (*MockManager) VerifyUniqueInputs added in v1.1.11

func (m *MockManager) VerifyUniqueInputs(blkID ids.ID, inputs set.Set[ids.ID]) error

VerifyUniqueInputs mocks base method.

type MockManagerMockRecorder added in v1.1.11

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

MockManagerMockRecorder is the mock recorder for MockManager.

func (*MockManagerMockRecorder) GetBlock added in v1.1.11

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

GetBlock indicates an expected call of GetBlock.

func (*MockManagerMockRecorder) GetState added in v1.1.11

func (mr *MockManagerMockRecorder) GetState(blkID any) *gomock.Call

GetState indicates an expected call of GetState.

func (*MockManagerMockRecorder) GetStatelessBlock added in v1.1.11

func (mr *MockManagerMockRecorder) GetStatelessBlock(blkID any) *gomock.Call

GetStatelessBlock indicates an expected call of GetStatelessBlock.

func (*MockManagerMockRecorder) LastAccepted added in v1.1.11

func (mr *MockManagerMockRecorder) LastAccepted() *gomock.Call

LastAccepted indicates an expected call of LastAccepted.

func (*MockManagerMockRecorder) NewBlock added in v1.1.11

func (mr *MockManagerMockRecorder) NewBlock(arg0 any) *gomock.Call

NewBlock indicates an expected call of NewBlock.

func (*MockManagerMockRecorder) Preferred added in v1.1.11

func (mr *MockManagerMockRecorder) Preferred() *gomock.Call

Preferred indicates an expected call of Preferred.

func (*MockManagerMockRecorder) SetPreference added in v1.1.11

func (mr *MockManagerMockRecorder) SetPreference(blkID any) *gomock.Call

SetPreference indicates an expected call of SetPreference.

func (*MockManagerMockRecorder) VerifyTx added in v1.1.11

func (mr *MockManagerMockRecorder) VerifyTx(tx any) *gomock.Call

VerifyTx indicates an expected call of VerifyTx.

func (*MockManagerMockRecorder) VerifyUniqueInputs added in v1.1.11

func (mr *MockManagerMockRecorder) VerifyUniqueInputs(blkID, inputs any) *gomock.Call

VerifyUniqueInputs indicates an expected call of VerifyUniqueInputs.

Directories

Path Synopsis
Package executormock is a generated GoMock package.
Package executormock is a generated GoMock package.

Jump to

Keyboard shortcuts

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