Documentation ¶
Index ¶
- Variables
- func ParallelWorker(total, nThds int, worker func(start, end, idx int, args ...interface{}), ...)
- type ChildResolver
- type Config
- type Database
- func (this *Database) Cap(limit common.StorageSize) error
- func (this *Database) Close() error
- func (this *Database) Commit(hash common.Hash, report bool) error
- func (this *Database) Dereference(root common.Hash)
- func (this *Database) Find(node common.Hash) (*database, []byte, error)
- func (this *Database) Initialized(genesisRoot common.Hash) bool
- func (this *Database) Node(hash common.Hash) ([]byte, error)
- func (this *Database) Reader(blockRoot common.Hash) *paraReader
- func (this *Database) Reference(root common.Hash, parent common.Hash)
- func (this *Database) Scheme() string
- func (this *Database) Size() common.StorageSize
- func (this *Database) Update(root common.Hash, parent common.Hash, nodes *trienode.MergedNodeSet) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Defaults = &Config{
CleanCacheSize: 0,
}
Defaults is the default setting for database if it's not specified. Notably, clean cache is disabled explicitly,
Functions ¶
func ParallelWorker ¶
Types ¶
type ChildResolver ¶
ChildResolver defines the required method to decode the provided trie node and iterate the children on top.
type Config ¶
type Config struct {
CleanCacheSize int // Maximum memory allowance (in bytes) for caching clean nodes
}
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func New ¶
func New(diskdb interface{}, _ interface{}, resolver ChildResolver) *Database
diskdbs, db.cleans, mptResolver{}
func (*Database) Dereference ¶
func (*Database) Size ¶
func (this *Database) Size() common.StorageSize
Click to show internal directories.
Click to hide internal directories.