Documentation ¶
Index ¶
- Constants
- type AddressManager
- func (pam *AddressManager) AddPubKey(pk common.PubKeys)
- func (pam *AddressManager) IsValidAddress(addr string, chain common.Chain) bool
- func (pam *AddressManager) IsValidPoolAddress(addr string, chain common.Chain) (bool, common.ChainPoolInfo)
- func (pam *AddressManager) RemovePubKey(pk common.PubKeys)
- func (pam *AddressManager) Start() error
- func (pam *AddressManager) Stop() error
- type AddressValidator
- 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
- func (mpa *MockPoolAddressValidator) AddPubKey(pk common.PubKeys)
- func (mpa *MockPoolAddressValidator) IsValidAddress(addr string, chain common.Chain) bool
- func (mpa *MockPoolAddressValidator) IsValidPoolAddress(addr string, chain common.Chain) (bool, common.ChainPoolInfo)
- func (mpa *MockPoolAddressValidator) RemovePubKey(pk common.PubKeys)
- type Observer
- type TxInStatusItem
- type TxInStorage
Constants ¶
const DefaultObserverLevelDBFolder = `observer_data`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressManager ¶
type AddressManager struct {
// contains filtered or unexported fields
}
AddressManager it manage the pool address
func NewAddressManager ¶
func NewAddressManager(chainHost string, m *metrics.Metrics) (*AddressManager, error)
NewAddressManager create a new instance of AddressManager
func (*AddressManager) AddPubKey ¶
func (pam *AddressManager) AddPubKey(pk common.PubKeys)
func (*AddressManager) IsValidAddress ¶
func (pam *AddressManager) IsValidAddress(addr string, chain common.Chain) bool
IsValidAddress check whether the given address is a monitored address
func (*AddressManager) IsValidPoolAddress ¶
func (pam *AddressManager) IsValidPoolAddress(addr string, chain common.Chain) (bool, common.ChainPoolInfo)
IsValidPoolAddress check whether the given address is a pool addr
func (*AddressManager) RemovePubKey ¶
func (pam *AddressManager) RemovePubKey(pk common.PubKeys)
func (*AddressManager) Start ¶
func (pam *AddressManager) Start() error
Start to poll poll addresses from statechain
type AddressValidator ¶
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, addrVal AddressValidator, 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) AddPubKey ¶
func (mpa *MockPoolAddressValidator) AddPubKey(pk common.PubKeys)
func (*MockPoolAddressValidator) IsValidAddress ¶
func (mpa *MockPoolAddressValidator) IsValidAddress(addr string, chain common.Chain) bool
func (*MockPoolAddressValidator) IsValidPoolAddress ¶
func (mpa *MockPoolAddressValidator) IsValidPoolAddress(addr string, chain common.Chain) (bool, common.ChainPoolInfo)
func (*MockPoolAddressValidator) RemovePubKey ¶
func (mpa *MockPoolAddressValidator) RemovePubKey(pk common.PubKeys)
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 TxInStatusItem ¶
type TxInStatusItem struct { TxIn types.TxIn `json:"tx_in"` Status types.TxInStatus `json:"status"` }
TxInStatusItem represent the TxIn item status