simple_blockchain

command module
v0.0.0-...-fa99088 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

README

simple_blockchain

一个简单的区块链,供学习研究

数据结构

block结构
type Block struct {
	Index        int64
	PreviousHash string
	Timestamp    int64
	Data         string
	Hash         string
	Nonce        int64
}
blockchain结构
type blockchain struct {
	CurBlock   *block.Block
	Blocks     []*block.Block
	Difficulty uint
	Locker     *sync.Mutex
}

peer结构
type peer struct {
	svrPeers map[string]*tcpnetwork.Connection
	cliPeers map[string]*tcpnetwork.Connection
	peerName string
}
go get -v github.com/Frank-gh/simple_blockchain

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL