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

chainmock

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBlock

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

MockBlock is a mock of Block interface.

func NewMockBlock

func NewMockBlock(ctrl *gomock.Controller) *MockBlock

NewMockBlock creates a new mock instance.

func (*MockBlock) Accept

func (m *MockBlock) Accept() error

Accept mocks base method.

func (*MockBlock) Bytes

func (m *MockBlock) Bytes() []byte

Bytes mocks base method.

func (*MockBlock) EXPECT

func (m *MockBlock) EXPECT() *MockBlockMockRecorder

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

func (*MockBlock) Height

func (m *MockBlock) Height() uint64

Height mocks base method.

func (*MockBlock) ID

func (m *MockBlock) ID() ids.ID

ID mocks base method.

func (*MockBlock) Parent

func (m *MockBlock) Parent() ids.ID

Parent mocks base method.

func (*MockBlock) Reject

func (m *MockBlock) Reject() error

Reject mocks base method.

func (*MockBlock) Status

func (m *MockBlock) Status() choices.Status

Status mocks base method.

func (*MockBlock) Time

func (m *MockBlock) Time() uint64

Time mocks base method.

func (*MockBlock) Verify

func (m *MockBlock) Verify(arg0 context.Context) error

Verify mocks base method.

type MockBlockMockRecorder

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

MockBlockMockRecorder is the mock recorder for MockBlock.

func (*MockBlockMockRecorder) Accept

func (mr *MockBlockMockRecorder) Accept() *gomock.Call

Accept indicates an expected call of Accept.

func (*MockBlockMockRecorder) Bytes

func (mr *MockBlockMockRecorder) Bytes() *gomock.Call

Bytes indicates an expected call of Bytes.

func (*MockBlockMockRecorder) Height

func (mr *MockBlockMockRecorder) Height() *gomock.Call

Height indicates an expected call of Height.

func (*MockBlockMockRecorder) ID

func (mr *MockBlockMockRecorder) ID() *gomock.Call

ID indicates an expected call of ID.

func (*MockBlockMockRecorder) Parent

func (mr *MockBlockMockRecorder) Parent() *gomock.Call

Parent indicates an expected call of Parent.

func (*MockBlockMockRecorder) Reject

func (mr *MockBlockMockRecorder) Reject() *gomock.Call

Reject indicates an expected call of Reject.

func (*MockBlockMockRecorder) Status

func (mr *MockBlockMockRecorder) Status() *gomock.Call

Status indicates an expected call of Status.

func (*MockBlockMockRecorder) Time

func (mr *MockBlockMockRecorder) Time() *gomock.Call

Time indicates an expected call of Time.

func (*MockBlockMockRecorder) Verify

func (mr *MockBlockMockRecorder) Verify(arg0 interface{}) *gomock.Call

Verify indicates an expected call of Verify.

type MockConsensus

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

MockConsensus is a mock of Consensus interface.

func NewMockConsensus

func NewMockConsensus(ctrl *gomock.Controller) *MockConsensus

NewMockConsensus creates a new mock instance.

func (*MockConsensus) Add

func (m *MockConsensus) Add(ctx context.Context, block chain.Block) error

Add mocks base method.

func (*MockConsensus) Decided

func (m *MockConsensus) Decided(blk chain.Block) bool

Decided mocks base method.

func (*MockConsensus) EXPECT

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

func (*MockConsensus) Finalized

func (m *MockConsensus) Finalized() bool

Finalized mocks base method.

func (*MockConsensus) HealthCheck

func (m *MockConsensus) HealthCheck(ctx context.Context) (interface{}, error)

HealthCheck mocks base method.

func (*MockConsensus) Initialize

func (m *MockConsensus) Initialize(ctx context.Context, params chain.Parameters) error

Initialize mocks base method.

func (*MockConsensus) IsPreferred

func (m *MockConsensus) IsPreferred(blk chain.Block) bool

IsPreferred mocks base method.

func (*MockConsensus) Issued

func (m *MockConsensus) Issued(blk chain.Block) bool

Issued mocks base method.

func (*MockConsensus) NumProcessing

func (m *MockConsensus) NumProcessing() int

NumProcessing mocks base method.

func (*MockConsensus) Parameters

func (m *MockConsensus) Parameters() chain.Parameters

Parameters mocks base method.

func (*MockConsensus) Preference

func (m *MockConsensus) Preference() ids.ID

Preference mocks base method.

func (*MockConsensus) Processing

func (m *MockConsensus) Processing(blkID ids.ID) bool

Processing mocks base method.

func (*MockConsensus) RecordPoll

func (m *MockConsensus) RecordPoll(ctx context.Context, votes []ids.ID) error

RecordPoll mocks base method.

type MockConsensusMockRecorder

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

MockConsensusMockRecorder is the mock recorder for MockConsensus.

func (*MockConsensusMockRecorder) Add

func (mr *MockConsensusMockRecorder) Add(ctx, block interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockConsensusMockRecorder) Decided

func (mr *MockConsensusMockRecorder) Decided(blk interface{}) *gomock.Call

Decided indicates an expected call of Decided.

func (*MockConsensusMockRecorder) Finalized

func (mr *MockConsensusMockRecorder) Finalized() *gomock.Call

Finalized indicates an expected call of Finalized.

func (*MockConsensusMockRecorder) HealthCheck

func (mr *MockConsensusMockRecorder) HealthCheck(ctx interface{}) *gomock.Call

HealthCheck indicates an expected call of HealthCheck.

func (*MockConsensusMockRecorder) Initialize

func (mr *MockConsensusMockRecorder) Initialize(ctx, params interface{}) *gomock.Call

Initialize indicates an expected call of Initialize.

func (*MockConsensusMockRecorder) IsPreferred

func (mr *MockConsensusMockRecorder) IsPreferred(blk interface{}) *gomock.Call

IsPreferred indicates an expected call of IsPreferred.

func (*MockConsensusMockRecorder) Issued

func (mr *MockConsensusMockRecorder) Issued(blk interface{}) *gomock.Call

Issued indicates an expected call of Issued.

func (*MockConsensusMockRecorder) NumProcessing

func (mr *MockConsensusMockRecorder) NumProcessing() *gomock.Call

NumProcessing indicates an expected call of NumProcessing.

func (*MockConsensusMockRecorder) Parameters

func (mr *MockConsensusMockRecorder) Parameters() *gomock.Call

Parameters indicates an expected call of Parameters.

func (*MockConsensusMockRecorder) Preference

func (mr *MockConsensusMockRecorder) Preference() *gomock.Call

Preference indicates an expected call of Preference.

func (*MockConsensusMockRecorder) Processing

func (mr *MockConsensusMockRecorder) Processing(blkID interface{}) *gomock.Call

Processing indicates an expected call of Processing.

func (*MockConsensusMockRecorder) RecordPoll

func (mr *MockConsensusMockRecorder) RecordPoll(ctx, votes interface{}) *gomock.Call

RecordPoll indicates an expected call of RecordPoll.

Jump to

Keyboard shortcuts

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