项目作者: sezginpak

项目描述 :
Simple-Blockchain is a Python blockchain library example.
高级语言: Python
项目地址: git://github.com/sezginpak/simple-blockchain.git
创建时间: 2019-09-10T14:37:22Z
项目社区:https://github.com/sezginpak/simple-blockchain

开源协议:

下载


Simple-Blockchain

Simple-Blockchain is a Python blockchain library example.

Installation

Source code

  1. git clone https://github.com/sezginpak/simple-blockchain.git

Usage

  1. from simpleBlockchain import BlockChain, Block
  2. chain = BlockChain()
  3. chain.addBlock(Block([1,2,3]))
  4. chain.addBlock(Block([4,5,6]))
  5. chain.addBlock(Block([7,8,9]))
  6. chain.addBlock(Block([10,11,12]))
  7. print(chain.chainValid())
  8. for i in range(len(chain.chain)):
  9. print(i.data)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT