ckb_rocksdb_parser

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CKBBlockChain

type CKBBlockChain struct {
	Ctx       context.Context
	ReqTryCfg *types.RetryConfig
	RpcClient rpc.Client
}

func NewCKBBlockChain

func NewCKBBlockChain(ctx context.Context, nodeUrl string, reqTryCfg *types.RetryConfig) *CKBBlockChain

func NewCKBBlockChainWithRpcClient

func NewCKBBlockChainWithRpcClient(ctx context.Context, rpcClient rpc.Client, reqTryCfg *types.RetryConfig) *CKBBlockChain

func (*CKBBlockChain) Close

func (ckb *CKBBlockChain) Close()

func (*CKBBlockChain) GetBlockInfoByNumber

func (ckb *CKBBlockChain) GetBlockInfoByNumber(blockNumber *big.Int) (*types.ScannerBlockInfo, error)

func (*CKBBlockChain) GetLatestBlockNumber

func (ckb *CKBBlockChain) GetLatestBlockNumber() (*big.Int, error)

func (*CKBBlockChain) GetParentHash

func (ckb *CKBBlockChain) GetParentHash(childHash string) (string, error)

type CKBRocksDb

type CKBRocksDb struct {
	// contains filtered or unexported fields
}

func NewCKBRocksDb

func NewCKBRocksDb(dataDir string, handler MsgHandler) *CKBRocksDb

func (*CKBRocksDb) Close

func (ckb *CKBRocksDb) Close() error

func (*CKBRocksDb) GetDbBlockByHash

func (ckb *CKBRocksDb) GetDbBlockByHash(blockHash string) (*types.Block, error)

func (*CKBRocksDb) GetDbLastBlock

func (ckb *CKBRocksDb) GetDbLastBlock() (*types.Block, error)

func (*CKBRocksDb) HandleForkEvent

func (ckb *CKBRocksDb) HandleForkEvent(info *types.BlockForkInfo) error

func (*CKBRocksDb) RecordBlock

func (ckb *CKBRocksDb) RecordBlock(block *types.Block, isUpdate, commitAfterOpt bool) error

func (*CKBRocksDb) TransactionHandler

func (ckb *CKBRocksDb) TransactionHandler(block *types.ScannerBlockInfo, dbTx interface{}, blockTxs interface{}) error

func (*CKBRocksDb) TxClose

func (ckb *CKBRocksDb) TxClose()

func (*CKBRocksDb) TxCommit

func (ckb *CKBRocksDb) TxCommit() error

func (*CKBRocksDb) TxOpen

func (ckb *CKBRocksDb) TxOpen() (interface{}, error)

func (*CKBRocksDb) TxRollBack

func (ckb *CKBRocksDb) TxRollBack() error

type MsgHandler

type MsgHandler struct {
	Receive func(info *TxMsgData) error
	Close   func()
}

type TxMsgData

type TxMsgData struct {
	BlockBaseInfo blockparserTypes.ScannerBlockInfo `json:"block_base_info"`
	Txs           []*types.Transaction              `json:"block_tx_list"`
}

Jump to

Keyboard shortcuts

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