请选择 进入手机版 | 继续访问电脑版

4Ameta

 找回密码
 立即注册
搜索
查看: 81|回复: 0

write a blockchain in Python【6】software test

[复制链接]

26

主题

26

帖子

119

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
119
发表于 2022-9-12 21:48:18 | 显示全部楼层 |阅读模式
write a blockchain in Python【6】software test



  1. blockChain = BlockChain()
  2.     blockChain.add_block(Block(time.time(), {'amount': 100}))
  3.     blockChain.add_block(Block(time.time(), {'amount': 200}))

复制代码


By this point, the prototype of our blockchain has been completed,
But this is not a complete blockchain,
It does not run on a P2P network,
It also lacks many functions,
Here is just to illustrate the working principle of blockchain.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|4ameta

GMT+8, 2022-10-4 11:22 , Processed in 0.035641 second(s), 17 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表