Documentation ¶
Index ¶
- Constants
- type BinanceBlockScanner
- type BinanceChanBlockScannerStorage
- func (ldbss *BinanceChanBlockScannerStorage) Close() error
- func (ldbss *BinanceChanBlockScannerStorage) GetTxInForRetry(failedOnly bool) ([]types.TxIn, error)
- func (ldbss *BinanceChanBlockScannerStorage) RemoveTxIn(txin types.TxIn) error
- func (ldbss *BinanceChanBlockScannerStorage) SetTxInStatus(txIn types.TxIn, status types.TxInStatus) error
- type MockPoolAddressValidator
- type Observer
- type PoolAddressManager
- type PoolAddressValidator
- type TxInStatusItem
- type TxInStorage
Constants ¶
const DefaultObserverLevelDBFolder = `observer_data`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinanceBlockScanner ¶
type BinanceBlockScanner struct {
// contains filtered or unexported fields
}
BinanceBlockScanner is to scan the blocks
func NewBinanceBlockScanner ¶
func NewBinanceBlockScanner(cfg config.BlockScannerConfiguration, scanStorage blockscanner.ScannerStorage, isTestNet bool, pav PoolAddressValidator, m *metrics.Metrics) (*BinanceBlockScanner, error)
NewBinanceBlockScanner create a new instance of BlockScan
func (*BinanceBlockScanner) GetMessages ¶
func (b *BinanceBlockScanner) GetMessages() <-chan stypes.TxIn
GetMessages return the channel
func (*BinanceBlockScanner) Stop ¶
func (b *BinanceBlockScanner) Stop() error
type BinanceChanBlockScannerStorage ¶
type BinanceChanBlockScannerStorage struct { *blockscanner.LevelDBScannerStorage // contains filtered or unexported fields }
func NewBinanceChanBlockScannerStorage ¶
func NewBinanceChanBlockScannerStorage(levelDbFolder string) (*BinanceChanBlockScannerStorage, error)
func (*BinanceChanBlockScannerStorage) Close ¶
func (ldbss *BinanceChanBlockScannerStorage) Close() error
Close underlying db
func (*BinanceChanBlockScannerStorage) GetTxInForRetry ¶
func (ldbss *BinanceChanBlockScannerStorage) GetTxInForRetry(failedOnly bool) ([]types.TxIn, error)
GetTxInForRetry retrieve all txin that had been failed before to retry
func (*BinanceChanBlockScannerStorage) RemoveTxIn ¶
func (ldbss *BinanceChanBlockScannerStorage) RemoveTxIn(txin types.TxIn) error
RemoveTxIn remove the given txin from the store
func (*BinanceChanBlockScannerStorage) SetTxInStatus ¶
func (ldbss *BinanceChanBlockScannerStorage) SetTxInStatus(txIn types.TxIn, status types.TxInStatus) error
SetTxInStatus set the given txin to a status , in the data store
type MockPoolAddressValidator ¶
type MockPoolAddressValidator struct {
// contains filtered or unexported fields
}
func NewMockPoolAddressValidator ¶
func NewMockPoolAddressValidator() *MockPoolAddressValidator
func (*MockPoolAddressValidator) IsValidPoolAddress ¶
func (mpa *MockPoolAddressValidator) IsValidPoolAddress(addr string) bool
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer observer service
func NewObserver ¶
func NewObserver(cfg config.Configuration) (*Observer, error)
NewObserver create a new instance of Observer
type PoolAddressManager ¶
type PoolAddressManager struct {
// contains filtered or unexported fields
}
PoolAddressManager it manage the pool address
func NewPoolAddressManager ¶
func NewPoolAddressManager(chainHost string, m *metrics.Metrics) (*PoolAddressManager, error)
NewPoolAddressManager create a new instance of PoolAddressManager
func (*PoolAddressManager) IsValidPoolAddress ¶
func (pam *PoolAddressManager) IsValidPoolAddress(addr string) bool
IsFromValidPoolAddress check whether the given address is a pool addr
func (*PoolAddressManager) Start ¶
func (pam *PoolAddressManager) Start() error
Start to poll poll addresses from statechain
func (*PoolAddressManager) Stop ¶
func (pam *PoolAddressManager) Stop() error
Stop pool address manager
type PoolAddressValidator ¶
type TxInStatusItem ¶
type TxInStatusItem struct { TxIn types.TxIn `json:"tx_in"` Status types.TxInStatus `json:"status"` }
TxInStatusItem represent the TxIn item status