Documentation ¶
Index ¶
- Constants
- Variables
- func CaculateBlockHash(block Block) string
- func CaculateHash(s string) string
- func HandleStream(s net.Stream)
- func IsBlockValid(newBlock, oldBlock Block) bool
- func MakeBasicHost(listenPort int, secio bool, randseed int64) (host.Host, error)
- func PickWinner() (bp string)
- func Run()
- func SavePeer(name string)
- type Block
- type Validator
Constants ¶
View Source
const BPCount = 5
View Source
const DefaultVote = 10
View Source
const FileName = "config.ini"
Variables ¶
View Source
var BlockChain []Block
Functions ¶
func CaculateBlockHash ¶
func HandleStream ¶
func HandleStream(s net.Stream)
func IsBlockValid ¶
func MakeBasicHost ¶
func PickWinner ¶
func PickWinner() (bp string)
Types ¶
Click to show internal directories.
Click to hide internal directories.