Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartPruning ¶
func StartPruning() bool
func StopPruning ¶
func StopPruning() bool
Types ¶
type PruneDatabase ¶
type PruneDatabase interface { // OpenPruneTrie opens the prune trie. OpenPruneTrie(root common.Hash) (state.Trie, error) // CopyTrie returns an independent copy of the given trie. CopyTrie(state.Trie) state.Trie // TrieDB retrieves the low level trie database used for data storage. TrieDB() *trie.Database }
PruneDatabase wraps access to prune tries.
func NewDatabase ¶
func NewDatabase(db ligodb.Database) PruneDatabase
NewDatabase creates a backing store for prune trie. The returned database is safe for concurrent use, but does not retain any recent trie nodes in memory. To keep some historical state in memory, use the NewDatabaseWithCache constructor.
func NewDatabaseWithCache ¶
func NewDatabaseWithCache(db ligodb.Database, cache int) PruneDatabase
NewDatabaseWithCache creates a backing store for prune trie. The returned database is safe for concurrent use and retains a lot of collapsed RLP trie nodes in a large memory cache.
type PruneProcessor ¶
type PruneProcessor struct {
// contains filtered or unexported fields
}
func NewPruneProcessor ¶
func NewPruneProcessor(chaindb, prunedb ligodb.Database, bc *core.BlockChain, pruneBodyData bool) *PruneProcessor
type PruneStatus ¶
type PruneStatus struct { Running bool `json:"is_running"` LatestBlockNumber uint64 `json:"latest_block_number"` LatestScanNumber uint64 `json:"latest_scan_number"` LatestPruneNumber uint64 `json:"latest_prune_number"` }
func GetLatestStatus ¶
func GetLatestStatus(prunedb ligodb.Database) *PruneStatus
Click to show internal directories.
Click to hide internal directories.