mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
23 lines
389 B
Go
23 lines
389 B
Go
package chain
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/luxfi/ids"
|
|
)
|
|
|
|
// Block represents a blockchain block
|
|
type Block interface {
|
|
ID() ids.ID
|
|
Parent() ids.ID // Alias for ParentID for compatibility
|
|
ParentID() ids.ID
|
|
Height() uint64
|
|
Timestamp() time.Time
|
|
Bytes() []byte
|
|
Status() uint8
|
|
Accept(context.Context) error
|
|
Reject(context.Context) error
|
|
Verify(context.Context) error
|
|
}
|