Documentation ¶
Index ¶
Constants ¶
View Source
const Difficulty = 12
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Hash []byte Transactions []*transaction.Transaction PrevHash []byte Nonce int }
func CreateBlock ¶
func CreateBlock(transactions []*transaction.Transaction, prevHash []byte) *Block
func Deserialize ¶
func Genesis ¶
func Genesis(coinbase *transaction.Transaction) *Block
func (*Block) HashString ¶
type ProofOfWork ¶
func NewProof ¶
func NewProof(b *Block) *ProofOfWork
func (*ProofOfWork) Run ¶
func (pow *ProofOfWork) Run() (int, []byte)
func (*ProofOfWork) Validate ¶
func (pow *ProofOfWork) Validate() bool
Click to show internal directories.
Click to hide internal directories.