Documentation
¶
Overview ¶
Package chaintest provides test utilities for chains
Package chaintest provides test utilities for chain testing
Index ¶
- Variables
- type TestBlock
- func (b *TestBlock) Accept(ctx context.Context) error
- func (b *TestBlock) Bytes() []byte
- func (b *TestBlock) Height() uint64
- func (b *TestBlock) ID() ids.ID
- func (b *TestBlock) Parent() ids.ID
- func (b *TestBlock) ParentID() ids.ID
- func (b *TestBlock) Reject(ctx context.Context) error
- func (b *TestBlock) Status() uint8
- func (b *TestBlock) Timestamp() time.Time
- func (b *TestBlock) Verify(ctx context.Context) error
- type TestChain
Constants ¶
This section is empty.
Variables ¶
View Source
var Genesis = &TestBlock{ id: ids.GenerateTestID(), parentID: ids.Empty, height: 0, bytes: []byte("genesis"), status: consensustest.Accepted, timestamp: time.Now(), }
Genesis is the genesis test block
Functions ¶
This section is empty.
Types ¶
type TestBlock ¶
type TestBlock struct {
// contains filtered or unexported fields
}
TestBlock is a mock block for testing
func BuildChildWithTime ¶
BuildChildWithTime builds a child block with timestamp
Click to show internal directories.
Click to hide internal directories.