Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Timestamp int64 Transactions []*transaction.Transaction Hash []byte PrevBlockHash []byte Nounce int }
func NewBlock ¶
func NewBlock(tx []*transaction.Transaction, prevBlockHash []byte) *Block
func NewGenesisBlock ¶
func NewGenesisBlock(coinbase *transaction.Transaction) *Block
func (*Block) HashTransactions ¶
type ProofOfWork ¶
type ProofOfWork struct {
// contains filtered or unexported fields
}
func NewProofOfWork ¶
func NewProofOfWork(b *Block) *ProofOfWork
func (*ProofOfWork) Run ¶
func (pow *ProofOfWork) Run() (int, []byte)
* Run: Mining new Blocks.
- What is mining?
- It's the process of finding a hash that meets certain criteria, in this
- case the criteria is that the hash should be smaller than target. *
Click to show internal directories.
Click to hide internal directories.