merkmap

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2019 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MerkMap

type MerkMap struct {
	// contains filtered or unexported fields
}

func NewMerkMap

func NewMerkMap(dbDir string, rootHash interface{}, slot interface{}) (mp *MerkMap, err error)

func NewMerkMapFromDB

func NewMerkMapFromDB(db *leveldb.DB, rtHash interface{}, slot interface{}) (mp *MerkMap, err error)

func (*MerkMap) ArrangeSlot

func (mp *MerkMap) ArrangeSlot(newSlot []byte) *MerkMap

func (*MerkMap) Close

func (mp *MerkMap) Close() error

dont use this function if its db handler comes from outside

func (*MerkMap) Commit

func (mp *MerkMap) Commit(cb trie.LeafCallback) (root []byte, err error)

func (*MerkMap) MakeErrorProof

func (mp *MerkMap) MakeErrorProof(err error) string

func (*MerkMap) MakeErrorProofFromString

func (mp *MerkMap) MakeErrorProofFromString(str string) string

func (*MerkMap) MakeProof

func (mp *MerkMap) MakeProof(key []byte) string

func (*MerkMap) Revert

func (mp *MerkMap) Revert() (err error)

func (*MerkMap) TryDelete

func (mp *MerkMap) TryDelete(key []byte) error

func (*MerkMap) TryGet

func (mp *MerkMap) TryGet(key []byte) ([]byte, error)

func (*MerkMap) TryProve

func (mp *MerkMap) TryProve(key []byte) ([][]byte, error)

func (*MerkMap) TryPureDelete

func (mp *MerkMap) TryPureDelete(key []byte) error

func (*MerkMap) TryPureGet

func (mp *MerkMap) TryPureGet(key []byte) ([]byte, error)

func (*MerkMap) TryUpdate

func (mp *MerkMap) TryUpdate(key []byte, value []byte) error

type ProofJson

type ProofJson struct {
	Proof [][]byte `json:"proof"`
	Key   []byte   `json:"key"`
	Value []byte   `json:"value"`
	Log   string   `json:"log"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL