Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNotFound = errors.New("block not found")
View Source
var ErrorUnknown = errors.New("unknown")
Functions ¶
This section is empty.
Types ¶
type Blockchain ¶
type Blockchain interface { // AddBlock adds data to blockchain. AddBlock(data string) error // AllBlocks gets all the blocks of this blockchain. AllBlocks() ([]Block, error) // PrintBlock just prints all the blocks. PrintBlock() // GetBlock gets block at the height of this blockchain. GetBlock(hash string) (Block, error) // GetNewestHash gets newest hash of this blockchain. GetNewestHash() string // GetHeight gets height of this blockchain. GetHeight() int // Close closes blockchain. Close() error }
Click to show internal directories.
Click to hide internal directories.