Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseSyncer ¶
type DatabaseSyncer struct {
// contains filtered or unexported fields
}
DatabaseSyncer is used to sync blockchain data into database against the latest confirmed epoch.
func MustNewDatabaseSyncer ¶
func MustNewDatabaseSyncer(cfxClients []*sdk.Client, db *mysql.MysqlStore) *DatabaseSyncer
MustNewDatabaseSyncer creates an instance of DatabaseSyncer to sync blockchain data.
func (*DatabaseSyncer) OnStateChange ¶
func (syncer *DatabaseSyncer) OnStateChange(state monitor.HealthState, details ...string)
type EthSyncer ¶
type EthSyncer struct {
// contains filtered or unexported fields
}
EthSyncer is used to synchronize evm space blockchain data into db store.
func MustNewEthSyncer ¶
func MustNewEthSyncer(ethClients []*web3go.Client, db *mysql.MysqlStore) *EthSyncer
MustNewEthSyncer creates an instance of EthSyncer to sync Conflux EVM space chaindata.
func (*EthSyncer) OnStateChange ¶
func (syncer *EthSyncer) OnStateChange(state monitor.HealthState, details ...string)
type PruneConfig ¶
type PruneConfig struct {
PruneInterval time.Duration `mapstructure:"interval"` // interval to run pruning
Threshold PruneThresHold `mapstructure:"threshold"` // threshold for pruning
MaxPruneEpochs uint64 `mapstructure:"maxEpochs"` // max epochs to prune if threshold condition met
}
type PruneThresHold ¶
type PruneThresHold struct {
MaxBlocks uint64 `mapstructure:"maxBlocks"` // max number of blocks to trigger block pruning
MaxTxs uint64 `mapstructure:"maxTxs"` // max number of transactions to trigger transaction pruning
MaxLogs uint64 `mapstructure:"maxLogs"` // max number of logs to trigger log pruning
}
Threshold settings for pruner
type Pruner ¶
type Pruner struct {
// contains filtered or unexported fields
}
Pruner is used to prune blockchain data in store periodly. It will prune blockchain data in store with epoch as the smallest unit to retain data atomicity.
func MustNewKVCachePruner ¶
MustNewKVCachePruner creates an instance of Pruner to prune blockchain data in kv cache
Source Files
¶
Click to show internal directories.
Click to hide internal directories.