snowmantest

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package snowmantest is a generated GoMock package.

Index

Constants

View Source
const (
	GenesisHeight        uint64 = 0
	GenesisUnixTimestamp int64  = 1
)

Variables

View Source
var (
	GenesisID        = ids.GenerateTestID()
	GenesisTimestamp = time.Unix(GenesisUnixTimestamp, 0)
	GenesisBytes     = GenesisID[:]
	Genesis          = BuildChain(1)[0]
)

Functions

This section is empty.

Types

type Block

type Block struct {
	choices.TestDecidable

	ParentV    ids.ID
	HeightV    uint64
	TimestampV time.Time
	VerifyV    error
	BytesV     []byte
}

func BuildChain

func BuildChain(length int) []*Block

func BuildChild

func BuildChild(parent *Block) *Block

func BuildDescendants

func BuildDescendants(parent *Block, length int) []*Block

func (*Block) Bytes

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

func (*Block) Compare

func (b *Block) Compare(other *Block) int

func (*Block) Height

func (b *Block) Height() uint64

func (*Block) Parent

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

func (*Block) Timestamp

func (b *Block) Timestamp() time.Time

func (*Block) Verify

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

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(arg0 context.Context) 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(arg0 context.Context) error

Reject mocks base method.

func (*MockBlock) Status

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

Status mocks base method.

func (*MockBlock) Timestamp

func (m *MockBlock) Timestamp() time.Time

Timestamp 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(arg0 any) *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(arg0 any) *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) Timestamp

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

Timestamp indicates an expected call of Timestamp.

func (*MockBlockMockRecorder) Verify

func (mr *MockBlockMockRecorder) Verify(arg0 any) *gomock.Call

Verify indicates an expected call of Verify.

Jump to

Keyboard shortcuts

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