Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // There is not a root hash of empty merkle trie, so we use the hash of nil to represent it EmptyTrieHash = common.Sha3Nil )
Functions ¶
Types ¶
type MerkleNode ¶
type MerkleNode struct { Hash common.Hash NodeType NodeTypeFlag }
MerkleNode 用在获取与验证伴随节点
func FindSiblingNodes ¶
FindSiblingNodes 查找伴随节点
type MerkleTree ¶
type MerkleTree struct {
// contains filtered or unexported fields
}
func (*MerkleTree) HashNodes ¶
func (m *MerkleTree) HashNodes() []common.Hash
HashNodes 获取所有的hash,从叶子节点到根root
type NodeTypeFlag ¶
type NodeTypeFlag int
NodeTypeFlag 节点类型标识
const ( LeftNode NodeTypeFlag = iota RightNode RootNode )
用在伴随节点
Click to show internal directories.
Click to hide internal directories.