Skip to content

zengchen221/blockchain_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

代码参考: https://jeiwan.cc/

编译

go build -o bc main.go

运行

开启一个客户端

export NODE_ID=9527

功能如下:

  • createwallet -- 创建钱包
  • getaddresslists -- 获取所有的钱包地址
  • createblockchain -address DATA -- 创建创世区块
  • send -from From -to To -amount Amount -- 转账交易 如: ./bc send -from '["1Jzy7YVNskW74CruSy5VpnwEhdKViPvUTa"]' -to '["1MvgwwWb7fu8CJqQXiXGWNasYBPDbzUyVR"]' -amount '["1"]'
  • printchain -- 打印区块
  • getbalance -address Data -- 查询余额
  • test -- 重置
  • startnode -miner Address -- 启动节点,并指定挖矿的奖励地址

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages