Documentation ¶
Index ¶
- func Init(LevelDBPath string) error
- func Uint64ToBytes(n uint64) []byte
- type MerkleTree
- func (m *MerkleTree) Build(data [][]byte)
- func (*MerkleTree) Descriptor() ([]byte, []int)
- func (m *MerkleTree) GetHash2Idx() map[string]int32
- func (m *MerkleTree) GetHashList() [][]byte
- func (m *MerkleTree) GetLeafNum() int32
- func (m *MerkleTree) MerklePath(hash []byte) ([][]byte, error)
- func (m *MerkleTree) MerkleProve(hash []byte, rootHash []byte, mp [][]byte) (bool, error)
- func (*MerkleTree) ProtoMessage()
- func (m *MerkleTree) Reset()
- func (m *MerkleTree) RootHash() []byte
- func (m *MerkleTree) String() string
- func (m *MerkleTree) XXX_DiscardUnknown()
- func (m *MerkleTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *MerkleTree) XXX_Merge(src proto.Message)
- func (m *MerkleTree) XXX_Size() int
- func (m *MerkleTree) XXX_Unmarshal(b []byte) error
- type TXRMerkleTree
- func (m *TXRMerkleTree) Build(txrs []*tx.TxReceipt)
- func (m *TXRMerkleTree) Decode(b []byte) error
- func (*TXRMerkleTree) Descriptor() ([]byte, []int)
- func (m *TXRMerkleTree) Encode() ([]byte, error)
- func (m *TXRMerkleTree) GetMt() *MerkleTree
- func (m *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 (m *TXRMerkleTree) Reset()
- func (m *TXRMerkleTree) RootHash() []byte
- func (m *TXRMerkleTree) String() string
- func (m *TXRMerkleTree) XXX_DiscardUnknown()
- func (m *TXRMerkleTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TXRMerkleTree) XXX_Merge(src proto.Message)
- func (m *TXRMerkleTree) XXX_Size() int
- func (m *TXRMerkleTree) XXX_Unmarshal(b []byte) error
- type TXRMerkleTreeDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MerkleTree) Descriptor ¶
func (*MerkleTree) Descriptor() ([]byte, []int)
func (*MerkleTree) GetHash2Idx ¶
func (m *MerkleTree) GetHash2Idx() map[string]int32
func (*MerkleTree) GetHashList ¶
func (m *MerkleTree) GetHashList() [][]byte
func (*MerkleTree) GetLeafNum ¶
func (m *MerkleTree) GetLeafNum() int32
func (*MerkleTree) MerklePath ¶
func (m *MerkleTree) MerklePath(hash []byte) ([][]byte, error)
MerklePath is path of the merkle tree
func (*MerkleTree) MerkleProve ¶
MerkleProve is prove of the merkle tree
func (*MerkleTree) ProtoMessage ¶
func (*MerkleTree) ProtoMessage()
func (*MerkleTree) Reset ¶
func (m *MerkleTree) Reset()
func (*MerkleTree) RootHash ¶
func (m *MerkleTree) RootHash() []byte
RootHash return root of the tree
func (*MerkleTree) String ¶
func (m *MerkleTree) String() string
func (*MerkleTree) XXX_DiscardUnknown ¶
func (m *MerkleTree) XXX_DiscardUnknown()
func (*MerkleTree) XXX_Marshal ¶
func (m *MerkleTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MerkleTree) XXX_Merge ¶
func (dst *MerkleTree) XXX_Merge(src proto.Message)
func (*MerkleTree) XXX_Size ¶
func (m *MerkleTree) XXX_Size() int
func (*MerkleTree) XXX_Unmarshal ¶
func (m *MerkleTree) XXX_Unmarshal(b []byte) error
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 */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*TXRMerkleTree) Descriptor() ([]byte, []int)
func (*TXRMerkleTree) Encode ¶
func (m *TXRMerkleTree) Encode() ([]byte, error)
Encode is marshal of the merkle tree
func (*TXRMerkleTree) GetMt ¶
func (m *TXRMerkleTree) GetMt() *MerkleTree
func (*TXRMerkleTree) GetTx2Txr ¶
func (m *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) Reset ¶
func (m *TXRMerkleTree) Reset()
func (*TXRMerkleTree) RootHash ¶
func (m *TXRMerkleTree) RootHash() []byte
RootHash return root of merkle tree
func (*TXRMerkleTree) String ¶
func (m *TXRMerkleTree) String() string
func (*TXRMerkleTree) XXX_DiscardUnknown ¶
func (m *TXRMerkleTree) XXX_DiscardUnknown()
func (*TXRMerkleTree) XXX_Marshal ¶
func (m *TXRMerkleTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TXRMerkleTree) XXX_Merge ¶
func (dst *TXRMerkleTree) XXX_Merge(src proto.Message)
func (*TXRMerkleTree) XXX_Size ¶
func (m *TXRMerkleTree) XXX_Size() int
func (*TXRMerkleTree) XXX_Unmarshal ¶
func (m *TXRMerkleTree) XXX_Unmarshal(b []byte) error
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.