Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDuplicatedHash = fmt.Errorf("MerkleTree: duplicated hash provided")
)
Functions ¶
func NewMerkleTree ¶
func NewMerkleTree(hashes []common.Hash) (*MerkleTreeNode, []*MerkleProof, error)
func VerifyProof ¶
Types ¶
type MerkleProof ¶
func NewMerkleProof ¶
func NewMerkleProof(node *MerkleTreeNode) *MerkleProof
func (*MerkleProof) Bytes ¶
func (p *MerkleProof) Bytes() []byte
type MerkleTreeNode ¶
type MerkleTreeNode struct {
Hash common.Hash
Parent *MerkleTreeNode
LeftSib *MerkleTreeNode
RightSib *MerkleTreeNode
}
func (*MerkleTreeNode) String ¶
func (n *MerkleTreeNode) String() string
Click to show internal directories.
Click to hide internal directories.