package
0.0.0-20191113032148-3606b63ab30f
Repository: https://github.com/phenixchain/devchain.git
Documentation: pkg.go.dev

# Functions

CalcMerkleRoot 计算merkle树根.
CalcMerkleRootCache 计算merkle树根缓存.
Computation This implements a constant-space merkle root/path calculator, limited to 2^32 leaves.
Decode decodes the byte-reversed hexadecimal string encoding of a Hash to a destination.
GetHashFromTwoHash 计算左右节点hash的父hash.
GetMerkleBranch 获取指定txindex的branch position 从0开始.
GetMerkleRoot 256构成一个组,进行计算 n * step = hashes (hashes / n).
GetMerkleRootAndBranch 获取merkle roothash 以及指定tx index的branch,注释:position从0开始.
GetMerkleRootFromBranch 通过branch 获取对应的roothash 用于指定txhash的proof证明.
NewHash returns a new Hash from a byte slice.
NewHashFromStr creates a Hash from a hash string.

# Constants

HashSize hash长度.
MaxHashStringSize 最大hash字符串长度.

# Variables

ErrHashStrSize error.

# Type aliases

Hash 哈希.