Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Blockchain []Block
Blockchain is the main set of blocks in the network
View Source
var Mutex = &sync.Mutex{}
Mutex provides locking mechanism for one goroutine
Functions ¶
func CalculateBlockHash ¶
CalculateBlockHash hashes using SHA256 algorithm
func CheckDuplicateVote ¶
CheckDuplicateVote sees if a vote casted is a duplicate
func IsBlockValid ¶
IsBlockValid makes sure block is valid by checking index, and comparing the hash of the previous block
Types ¶
Click to show internal directories.
Click to hide internal directories.