Documentation ¶
Index ¶
- type CKBBlockChain
- type CKBRocksDb
- func (ckb *CKBRocksDb) Close() error
- func (ckb *CKBRocksDb) GetDbBlockByHash(blockHash string) (*types.Block, error)
- func (ckb *CKBRocksDb) GetDbLastBlock() (*types.Block, error)
- func (ckb *CKBRocksDb) HandleForkEvent(info *types.BlockForkInfo) error
- func (ckb *CKBRocksDb) RecordBlock(block *types.Block, isUpdate, commitAfterOpt bool) error
- func (ckb *CKBRocksDb) TransactionHandler(block *types.ScannerBlockInfo, dbTx interface{}, blockTxs interface{}) error
- func (ckb *CKBRocksDb) TxClose()
- func (ckb *CKBRocksDb) TxCommit() error
- func (ckb *CKBRocksDb) TxOpen() (interface{}, error)
- func (ckb *CKBRocksDb) TxRollBack() error
- type MsgHandler
- type TxMsgData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CKBBlockChain ¶
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 TxMsgData ¶
type TxMsgData struct { BlockBaseInfo blockparserTypes.ScannerBlockInfo `json:"block_base_info"` Txs []*types.Transaction `json:"block_tx_list"` }
Click to show internal directories.
Click to hide internal directories.