c6

command
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

代币案例:使用默克尔树

理解默克尔树的作用,学习如何在状态机中使用默克尔树。

目录文件组织:

  • daemon.go: abci应用
  • cli.go: 节点客户端
  • lib: 公用代码目录
  • merkle-hash.go:默克尔哈希测试代码
  • merkle-proof.go:默克尔证据测试代码
  • wallet:钱包文件

预置代码运行

1、计算默克尔哈希

在2#终端执行以下命令:

~/repo/go/src/hubwiz.com/c6$ go run merkle-hash.go
2、状态的默克尔证据

在2#终端执行以下命令:

~/repo/go/src/hubwiz.com/c6$ go run merkle-proof.go
3、ABCI应用

在2#终端启动ABCI应用:

~/repo/go/src/hubwiz.com/c6$ go run daemon.go

在1#终端重新初始化并启动tendermint

~$ tendermint unsafe_reset_all
~$ tendermint node

在3#终端执行客户端程序的子命令,例如:

发行代币:

~/repo/go/src/hubwiz.com/c6$ go run cli.go issue-tx

转账:

~/repo/go/src/hubwiz.com/c6$ go run cli.go transfer-tx

查询账户michael的余额:

~/repo/go/src/hubwiz.com/c6$ go run cli.go query michael

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