Documentation
¶
Index ¶
- Constants
- type BaseSynchronizer
- func (syncer *BaseSynchronizer) BatchBlockHandle(startBlock uint64, endBlock uint64) ([]*account.BlockResponse, error)
- func (syncer *BaseSynchronizer) Close() error
- func (syncer *BaseSynchronizer) ScanBlockTransactions(txHashList []string, blockNumber *big.Int, blockHash string, bank *ChannelBank, ...) error
- func (syncer *BaseSynchronizer) Start() error
- type BlockHeader
- type BlockHeaderBank
- type ChannelBank
- type Config
- type Deposit
- func (deposit *Deposit) BuildTransaction(txMsg *account.TxMessage) (*database.Transactions, error)
- func (deposit *Deposit) Close() error
- func (deposit *Deposit) HandleDeposit(txMsg *account.TxMessage) (*database.Deposits, error)
- func (deposit *Deposit) HandleInternalTx(txMsg *account.TxMessage) (*database.Internals, error)
- func (deposit *Deposit) HandleWithdraw(txMsg *account.TxMessage) (*database.Withdraws, error)
- func (deposit *Deposit) Start() error
- type Internal
- type TransactionChannel
- type Withdraw
Constants ¶
View Source
const TxHandleTaskBatchSize uint64 = 500
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseSynchronizer ¶
type BaseSynchronizer struct {
// contains filtered or unexported fields
}
func (*BaseSynchronizer) BatchBlockHandle ¶
func (syncer *BaseSynchronizer) BatchBlockHandle(startBlock uint64, endBlock uint64) ([]*account.BlockResponse, error)
func (*BaseSynchronizer) Close ¶
func (syncer *BaseSynchronizer) Close() error
func (*BaseSynchronizer) ScanBlockTransactions ¶
func (syncer *BaseSynchronizer) ScanBlockTransactions(txHashList []string, blockNumber *big.Int, blockHash string, bank *ChannelBank, wg *sync.WaitGroup) error
func (*BaseSynchronizer) Start ¶
func (syncer *BaseSynchronizer) Start() error
type BlockHeader ¶
type BlockHeaderBank ¶
type BlockHeaderBank struct {
// contains filtered or unexported fields
}
func NewBlockHeaderBank ¶
func NewBlockHeaderBank(bufferSize int) *BlockHeaderBank
func (*BlockHeaderBank) Channel ¶
func (bhb *BlockHeaderBank) Channel() <-chan BlockHeader
func (*BlockHeaderBank) Close ¶
func (bhb *BlockHeaderBank) Close()
func (*BlockHeaderBank) Push ¶
func (bhb *BlockHeaderBank) Push(bh BlockHeader)
type ChannelBank ¶
type ChannelBank struct {
// contains filtered or unexported fields
}
func NewChannelBank ¶
func NewChannelBank(bufferSize int) *ChannelBank
NewChannelBank 创建一个新的 ChannelBank 实例
func (*ChannelBank) Channel ¶
func (cb *ChannelBank) Channel() <-chan TransactionChannel
func (*ChannelBank) Close ¶
func (cb *ChannelBank) Close()
func (*ChannelBank) Push ¶
func (cb *ChannelBank) Push(tx TransactionChannel)
type Deposit ¶
type Deposit struct { BaseSynchronizer // contains filtered or unexported fields }
func NewDeposit ¶
func NewDeposit(cfg *config.Config, db *database.DB, rpcClient *rpcclient.WalletChainAccountClient, shutdown context.CancelCauseFunc) (*Deposit, error)
func (*Deposit) BuildTransaction ¶
func (*Deposit) HandleDeposit ¶
func (*Deposit) HandleInternalTx ¶
func (*Deposit) HandleWithdraw ¶
type Internal ¶
type Internal struct {
// contains filtered or unexported fields
}
func NewInternal ¶
func NewInternal(cfg *config.Config, db *database.DB, rpcClient *rpcclient.WalletChainAccountClient, shutdown context.CancelCauseFunc) (*Internal, error)
type TransactionChannel ¶
type Withdraw ¶
type Withdraw struct {
// contains filtered or unexported fields
}
func NewWithdraw ¶
func NewWithdraw(cfg *config.Config, db *database.DB, rpcClient *rpcclient.WalletChainAccountClient, shutdown context.CancelCauseFunc) (*Withdraw, error)
Click to show internal directories.
Click to hide internal directories.