Documentation
¶
Overview ¶
Package blocktest provides test utilities for blocks
Index ¶
- type Block
- func (b *Block) Accept(ctx context.Context) error
- func (b *Block) Bytes() []byte
- func (b *Block) Height() uint64
- func (b *Block) Parent() ids.ID
- func (b *Block) ParentID() ids.ID
- func (b *Block) Reject(ctx context.Context) error
- func (b *Block) Status() uint8
- func (b *Block) Timestamp() time.Time
- func (b *Block) Verify(ctx context.Context) error
- type TestBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
consensustest.Decidable
HeightV uint64
ParentV ids.ID
BytesV []byte
TimestampV time.Time
StatusV uint8
VerifyV error
AcceptV error
RejectV error
}
Block provides a full test implementation for blocks
type TestBlock ¶
type TestBlock struct {
// contains filtered or unexported fields
}
TestBlock provides a test implementation for blocks (deprecated, use Block)
func NewTestBlock ¶
NewTestBlock creates a new test block
Click to show internal directories.
Click to hide internal directories.