Documentation ¶
Index ¶
- Variables
- func Init(levelDBPath string) error
- func Uint64ToBytes(n uint64) []byte
- type MerkleTree
- func (m *MerkleTree) Build(data [][]byte)
- func (*MerkleTree) Descriptor() ([]byte, []int)deprecated
- func (x *MerkleTree) GetHash2Idx() map[string]int32
- func (x *MerkleTree) GetHashList() [][]byte
- func (x *MerkleTree) GetLeafNum() int32
- func (m *MerkleTree) MerklePath(hash []byte) ([][]byte, error)
- func (*MerkleTree) ProtoMessage()
- func (x *MerkleTree) ProtoReflect() protoreflect.Message
- func (x *MerkleTree) Reset()
- func (m *MerkleTree) RootHash() []byte
- func (x *MerkleTree) String() string
- type TXRMerkleTree
- func (m *TXRMerkleTree) Build(txrs []*tx.TxReceipt)
- func (m *TXRMerkleTree) Decode(b []byte) error
- func (*TXRMerkleTree) Descriptor() ([]byte, []int)deprecated
- func (m *TXRMerkleTree) Encode() ([]byte, error)
- func (x *TXRMerkleTree) GetMt() *MerkleTree
- func (x *TXRMerkleTree) GetTx2Txr() map[string][]byte
- func (m *TXRMerkleTree) MerklePath(hash []byte) ([][]byte, error)
- func (m *TXRMerkleTree) MerkleProve(hash []byte, rootHash []byte, mp [][]byte) (bool, error)
- func (*TXRMerkleTree) ProtoMessage()
- func (x *TXRMerkleTree) ProtoReflect() protoreflect.Message
- func (x *TXRMerkleTree) Reset()
- func (m *TXRMerkleTree) RootHash() []byte
- func (x *TXRMerkleTree) String() string
- type TXRMerkleTreeDB
Constants ¶
This section is empty.
Variables ¶
View Source
var File_core_merkletree_merkle_tree_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type MerkleTree ¶
type MerkleTree struct { HashList [][]byte `protobuf:"bytes,1,rep,name=hash_list,json=hashList,proto3" json:"hash_list,omitempty"` Hash2Idx map[string]int32 `` /* 174-byte string literal not displayed */ LeafNum int32 `protobuf:"varint,3,opt,name=leaf_num,json=leafNum,proto3" json:"leaf_num,omitempty"` // contains filtered or unexported fields }
func (*MerkleTree) Descriptor
deprecated
func (*MerkleTree) Descriptor() ([]byte, []int)
Deprecated: Use MerkleTree.ProtoReflect.Descriptor instead.
func (*MerkleTree) GetHash2Idx ¶
func (x *MerkleTree) GetHash2Idx() map[string]int32
func (*MerkleTree) GetHashList ¶
func (x *MerkleTree) GetHashList() [][]byte
func (*MerkleTree) GetLeafNum ¶
func (x *MerkleTree) GetLeafNum() int32
func (*MerkleTree) MerklePath ¶
func (m *MerkleTree) MerklePath(hash []byte) ([][]byte, error)
MerklePath is path of the merkle tree
func (*MerkleTree) ProtoMessage ¶
func (*MerkleTree) ProtoMessage()
func (*MerkleTree) ProtoReflect ¶
func (x *MerkleTree) ProtoReflect() protoreflect.Message
func (*MerkleTree) Reset ¶
func (x *MerkleTree) Reset()
func (*MerkleTree) RootHash ¶
func (m *MerkleTree) RootHash() []byte
RootHash return root of the tree
func (*MerkleTree) String ¶
func (x *MerkleTree) String() string
type TXRMerkleTree ¶
type TXRMerkleTree struct { Mt *MerkleTree `protobuf:"bytes,1,opt,name=mt,proto3" json:"mt,omitempty"` Tx2Txr map[string][]byte `` /* 167-byte string literal not displayed */ // contains filtered or unexported fields }
func (*TXRMerkleTree) Build ¶
func (m *TXRMerkleTree) Build(txrs []*tx.TxReceipt)
Build return the merkle tree
func (*TXRMerkleTree) Decode ¶
func (m *TXRMerkleTree) Decode(b []byte) error
Decode is unmarshal of the merkle tree
func (*TXRMerkleTree) Descriptor
deprecated
func (*TXRMerkleTree) Descriptor() ([]byte, []int)
Deprecated: Use TXRMerkleTree.ProtoReflect.Descriptor instead.
func (*TXRMerkleTree) Encode ¶
func (m *TXRMerkleTree) Encode() ([]byte, error)
Encode is marshal of the merkle tree
func (*TXRMerkleTree) GetMt ¶
func (x *TXRMerkleTree) GetMt() *MerkleTree
func (*TXRMerkleTree) GetTx2Txr ¶
func (x *TXRMerkleTree) GetTx2Txr() map[string][]byte
func (*TXRMerkleTree) MerklePath ¶
func (m *TXRMerkleTree) MerklePath(hash []byte) ([][]byte, error)
MerklePath return path of the merkle tree
func (*TXRMerkleTree) MerkleProve ¶
MerkleProve return prove of the merkle tree
func (*TXRMerkleTree) ProtoMessage ¶
func (*TXRMerkleTree) ProtoMessage()
func (*TXRMerkleTree) ProtoReflect ¶
func (x *TXRMerkleTree) ProtoReflect() protoreflect.Message
func (*TXRMerkleTree) Reset ¶
func (x *TXRMerkleTree) Reset()
func (*TXRMerkleTree) RootHash ¶
func (m *TXRMerkleTree) RootHash() []byte
RootHash return root of merkle tree
func (*TXRMerkleTree) String ¶
func (x *TXRMerkleTree) String() string
type TXRMerkleTreeDB ¶
type TXRMerkleTreeDB struct {
// contains filtered or unexported fields
}
TXRMerkleTreeDB is the implementation of TXRMerkleTreeDB
var TXRMTDB TXRMerkleTreeDB
TXRMTDB ...
func (*TXRMerkleTreeDB) Get ¶
func (mdb *TXRMerkleTreeDB) Get(blockNum uint64) (*TXRMerkleTree, error)
Get return the merkle tree
func (*TXRMerkleTreeDB) Put ¶
func (mdb *TXRMerkleTreeDB) Put(m *TXRMerkleTree, blockNum uint64) error
Put ...
Click to show internal directories.
Click to hide internal directories.