Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
Block keeps block headers
func NewGenesisBlock ¶
func NewGenesisBlock() *Block
NewGenesisBlock creates and returns genesis Block
type Blockchain ¶
type Blockchain struct {
Blocks []*Block
}
Blockchain keeps a sequence of Blocks
func NewBlockchain ¶
func NewBlockchain() *Blockchain
NewBlockchain creates a new Blockchain with genesis Block
func (*Blockchain) AddBlock ¶
func (bc *Blockchain) AddBlock(data string) *Block
AddBlock saves provided data as a block in the blockchain
Click to show internal directories.
Click to hide internal directories.