Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricReceiveMessages = "receive_messages" MetricParseDataError = "parse_data_error" MetricVaildationSuccess = "validation_success" MetricVaildationError = "validation_error" MetricDatabaseRollback = "database_rollback" MetricDatabaseCommit = "database_commit" MetricCronWorkerJob = "cron_worker_job" MetricCronWorkerJobUpdateMetaData = "cron_worker_job_update_meta_data" MetricCronWorkerJobGetBatchBlock = "cron_worker_job_get_batch_block" MetricCronWorkerJobRefreshContractAddresses = "cron_worker_job_refresh_contract_addresses" MetricCronWorkerJobRefreshPoolName = "cron_worker_job_refresh_pool_name" MetricRPCCall = "rpc_call" MetricRevertBlock = "revert_block" AccountTypeNormal = 0 AccountTypeContract = 1 AccountTypeMiner = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CronWorker ¶
type CronWorker struct {
// contains filtered or unexported fields
}
func NewCronWorker ¶
func NewCronWorker(splitter *ETCSplitter) *CronWorker
func (*CronWorker) Prepare ¶
func (w *CronWorker) Prepare() error
func (*CronWorker) Start ¶
func (w *CronWorker) Start() error
func (*CronWorker) Stop ¶
func (w *CronWorker) Stop()
type ETCBlockData ¶
type ETCBlockData struct { Block *model.Block Uncles []*model.Uncle Transactions []*model.Transaction TokenTransactions []*model.TokenTransaction Accounts []*model.Account Tokens []*model.Token TokenAccounts []*model.TokenAccount }
func ParseBlock ¶
func ParseBlock(data string) (*ETCBlockData, error)
type ETCSplitter ¶
type ETCSplitter struct {
// contains filtered or unexported fields
}
func NewSplitter ¶
func NewSplitter(cfg *SplitterConfig) (*ETCSplitter, error)
func (*ETCSplitter) CheckBlock ¶
func (s *ETCSplitter) CheckBlock(curBlock *ETCBlockData) (bool, int64)
func (*ETCSplitter) RevertBlock ¶
func (s *ETCSplitter) RevertBlock(height int64, tx *service.Transaction) error
revert block
func (*ETCSplitter) SaveBlock ¶
func (s *ETCSplitter) SaveBlock(data *ETCBlockData) error
func (*ETCSplitter) Start ¶
func (s *ETCSplitter) Start()
type SplitterConfig ¶
Click to show internal directories.
Click to hide internal directories.