Documentation ¶
Index ¶
- Constants
- Variables
- func GetDefaultCacheConfig(nt nodeconfig.NetworkType) harmonyconfig.CacheConfig
- func GetDefaultCacheConfigCopy() harmonyconfig.CacheConfig
- func GetDefaultConfigCopy() harmonyconfig.HarmonyConfig
- func GetDefaultConsensusConfigCopy() harmonyconfig.ConsensusConfig
- func GetDefaultDNSSyncConfig(nt nodeconfig.NetworkType) harmonyconfig.DnsSync
- func GetDefaultDevnetConfigCopy() harmonyconfig.DevnetConfig
- func GetDefaultHmyConfigCopy(nt nodeconfig.NetworkType) harmonyconfig.HarmonyConfig
- func GetDefaultLogContextCopy() harmonyconfig.LogContext
- func GetDefaultNetworkConfig(nt nodeconfig.NetworkType) harmonyconfig.NetworkConfig
- func GetDefaultPreimageConfigCopy() harmonyconfig.PreimageConfig
- func GetDefaultPrometheusConfigCopy() harmonyconfig.PrometheusConfig
- func GetDefaultRevertConfigCopy() harmonyconfig.RevertConfig
- func GetDefaultSyncConfig(nt nodeconfig.NetworkType) harmonyconfig.SyncConfig
- func GetDefaultSysConfigCopy() harmonyconfig.SysConfig
- func GetHarmonyConfig(cmd *cobra.Command) (harmonyconfig.HarmonyConfig, error)
- func GetHarmonyVersion() string
- func Init(rootCmd *cobra.Command)
- func PrintVersion()
- func VersionFlag() cli.BoolFlag
- type KakashiDB
- func (db *KakashiDB) ChainDb() ethdb.Database
- func (db *KakashiDB) Close() error
- func (db *KakashiDB) Delete(key []byte) error
- func (db *KakashiDB) Get(key []byte) ([]byte, error)
- func (db *KakashiDB) GetBlock(hash common.Hash, number uint64) *types.Block
- func (db *KakashiDB) GetBlockByHash(hash common.Hash) *types.Block
- func (db *KakashiDB) GetBlockByNumber(number uint64) *types.Block
- func (db *KakashiDB) GetBlockNumber(hash common.Hash) *uint64
- func (db *KakashiDB) GetCanonicalHash(number uint64) common.Hash
- func (db *KakashiDB) GetHeader(hash common.Hash, number uint64) *block.Header
- func (db *KakashiDB) GetHeaderByHash(hash common.Hash) *block.Header
- func (db *KakashiDB) GetHeaderByNumber(number uint64) *block.Header
- func (db *KakashiDB) OnAccount(common.Address, state.DumpAccount)
- func (db *KakashiDB) OnAccountEnd(addr common.Address, acc state.DumpAccount)
- func (db *KakashiDB) OnAccountStart(addr common.Address, acc state.DumpAccount)
- func (db *KakashiDB) OnAccountState(addr common.Address, StateSecureKey hexutil.Bytes, key, value []byte)
- func (db *KakashiDB) OnRoot(common.Hash)
- func (db *KakashiDB) Put(key []byte, value []byte) error
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 GetDefaultCacheConfig ¶
func GetDefaultCacheConfig(nt nodeconfig.NetworkType) harmonyconfig.CacheConfig
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 GetDefaultHmyConfigCopy ¶
func GetDefaultHmyConfigCopy(nt nodeconfig.NetworkType) harmonyconfig.HarmonyConfig
func GetDefaultLogContextCopy ¶
func GetDefaultLogContextCopy() harmonyconfig.LogContext
func GetDefaultNetworkConfig ¶
func GetDefaultNetworkConfig(nt nodeconfig.NetworkType) harmonyconfig.NetworkConfig
func GetDefaultPreimageConfigCopy ¶
func GetDefaultPreimageConfigCopy() harmonyconfig.PreimageConfig
func GetDefaultPrometheusConfigCopy ¶
func GetDefaultPrometheusConfigCopy() harmonyconfig.PrometheusConfig
func GetDefaultRevertConfigCopy ¶
func GetDefaultRevertConfigCopy() harmonyconfig.RevertConfig
func GetDefaultSyncConfig ¶
func GetDefaultSyncConfig(nt nodeconfig.NetworkType) harmonyconfig.SyncConfig
func GetDefaultSysConfigCopy ¶
func GetDefaultSysConfigCopy() harmonyconfig.SysConfig
func GetHarmonyConfig ¶
func GetHarmonyConfig(cmd *cobra.Command) (harmonyconfig.HarmonyConfig, error)
func GetHarmonyVersion ¶
func GetHarmonyVersion() string
func PrintVersion ¶
func PrintVersion()
func VersionFlag ¶
Types ¶
type KakashiDB ¶
func (*KakashiDB) GetBlockByHash ¶
GetBlockByHash retrieves a block from the database by hash
func (*KakashiDB) GetBlockByNumber ¶
GetBlockByNumber retrieves a block from the database by number
func (*KakashiDB) GetBlockNumber ¶
GetBlockNumber retrieves the block number belonging to the given hash from the database
func (*KakashiDB) GetCanonicalHash ¶
func (*KakashiDB) GetHeaderByHash ¶
func (*KakashiDB) GetHeaderByNumber ¶
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
Click to show internal directories.
Click to hide internal directories.