config

package
v1.10.3-0...-bcc0b51 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: LGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeTypeValidator = "validator"
	NodeTypeExplorer  = "explorer"
)
View Source
const (
	MB                 = 1024 * 1024
	BLOCKS_DUMP        = 512 // must >= 256
	EPOCHS_DUMP        = 10
	STATEDB_CACHE_SIZE = 64 // size in MB
	LEVELDB_CACHE_SIZE = 256
	LEVELDB_HANDLES    = 1024
	LRU_CACHE_SIZE     = 512
)
View Source
const (
	NONE = iota
	ON_ACCOUNT_START
	ON_ACCOUNT_STATE
	ON_ACCOUNT_END
)
View Source
const (
	DefaultBroadcastInvalidTx = false
)

Variables

View Source
var VersionMetaData []interface{}

Functions

func GetDefaultCacheConfigCopy

func GetDefaultCacheConfigCopy() harmonyconfig.CacheConfig

func GetDefaultConfigCopy

func GetDefaultConfigCopy() harmonyconfig.HarmonyConfig

func GetDefaultConsensusConfigCopy

func GetDefaultConsensusConfigCopy() harmonyconfig.ConsensusConfig

func GetDefaultDNSSyncConfig

func GetDefaultDNSSyncConfig(nt nodeconfig.NetworkType) harmonyconfig.DnsSync

func GetDefaultDevnetConfigCopy

func GetDefaultDevnetConfigCopy() harmonyconfig.DevnetConfig

func GetDefaultLogContextCopy

func GetDefaultLogContextCopy() harmonyconfig.LogContext

func GetDefaultPreimageConfigCopy

func GetDefaultPreimageConfigCopy() harmonyconfig.PreimageConfig

func GetDefaultPrometheusConfigCopy

func GetDefaultPrometheusConfigCopy() harmonyconfig.PrometheusConfig

func GetDefaultRevertConfigCopy

func GetDefaultRevertConfigCopy() harmonyconfig.RevertConfig

func GetDefaultSysConfigCopy

func GetDefaultSysConfigCopy() harmonyconfig.SysConfig

func GetHarmonyConfig

func GetHarmonyConfig(cmd *cobra.Command) (harmonyconfig.HarmonyConfig, error)

func GetHarmonyVersion

func GetHarmonyVersion() string

func Init

func Init(rootCmd *cobra.Command)

func PrintVersion

func PrintVersion()

func VersionFlag

func VersionFlag() cli.BoolFlag

Types

type KakashiDB

type KakashiDB struct {
	ethdb.Database
	// contains filtered or unexported fields
}

func (*KakashiDB) ChainDb

func (db *KakashiDB) ChainDb() ethdb.Database

func (*KakashiDB) Close

func (db *KakashiDB) Close() error

func (*KakashiDB) Delete

func (db *KakashiDB) Delete(key []byte) error

Delete removes the key from the key-value data store.

func (*KakashiDB) Get

func (db *KakashiDB) Get(key []byte) ([]byte, error)

func (*KakashiDB) GetBlock

func (db *KakashiDB) GetBlock(hash common.Hash, number uint64) *types.Block

GetBlock retrieves a block from the database by hash and number

func (*KakashiDB) GetBlockByHash

func (db *KakashiDB) GetBlockByHash(hash common.Hash) *types.Block

GetBlockByHash retrieves a block from the database by hash

func (*KakashiDB) GetBlockByNumber

func (db *KakashiDB) GetBlockByNumber(number uint64) *types.Block

GetBlockByNumber retrieves a block from the database by number

func (*KakashiDB) GetBlockNumber

func (db *KakashiDB) GetBlockNumber(hash common.Hash) *uint64

GetBlockNumber retrieves the block number belonging to the given hash from the database

func (*KakashiDB) GetCanonicalHash

func (db *KakashiDB) GetCanonicalHash(number uint64) common.Hash

func (*KakashiDB) GetHeader

func (db *KakashiDB) GetHeader(hash common.Hash, number uint64) *block.Header

func (*KakashiDB) GetHeaderByHash

func (db *KakashiDB) GetHeaderByHash(hash common.Hash) *block.Header

func (*KakashiDB) GetHeaderByNumber

func (db *KakashiDB) GetHeaderByNumber(number uint64) *block.Header

func (*KakashiDB) OnAccount

func (db *KakashiDB) OnAccount(common.Address, state.DumpAccount)

func (*KakashiDB) OnAccountEnd

func (db *KakashiDB) OnAccountEnd(addr common.Address, acc state.DumpAccount)

OnAccount implements DumpCollector interface

func (*KakashiDB) OnAccountStart

func (db *KakashiDB) OnAccountStart(addr common.Address, acc state.DumpAccount)

OnAccount implements DumpCollector interface

func (*KakashiDB) OnAccountState

func (db *KakashiDB) OnAccountState(addr common.Address, StateSecureKey hexutil.Bytes, key, value []byte)

OnAccount implements DumpCollector interface

func (*KakashiDB) OnRoot

func (db *KakashiDB) OnRoot(common.Hash)

func (*KakashiDB) Put

func (db *KakashiDB) Put(key []byte, value []byte) error

Jump to

Keyboard shortcuts

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