Documentation ¶
Index ¶
- Constants
- type PubKeyManager
- type Signer
- type StateChainBlockScan
- type StateChanBlockScannerStorage
- func (s *StateChanBlockScannerStorage) Close() error
- func (ldbss *StateChanBlockScannerStorage) GetTxOutsForRetry(failedOnly bool) ([]types.TxOut, error)
- func (s *StateChanBlockScannerStorage) RemoveTxOut(txOut types.TxOut) error
- func (s *StateChanBlockScannerStorage) SetTxOutStatus(txOut types.TxOut, status TxOutLocalStatus) error
- type TxOutLocalItem
- type TxOutLocalStatus
Constants ¶
View Source
const DefaultSignerLevelDBFolder = `signer_data`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubKeyManager ¶
type PubKeyManager struct {
// contains filtered or unexported fields
}
func NewPubKeyManager ¶
func NewPubKeyManager() *PubKeyManager
NewPubKeyManager create a new instance of PubKeyManager
func (*PubKeyManager) Add ¶
func (pkm *PubKeyManager) Add(pk common.PubKey)
func (*PubKeyManager) HasKey ¶
func (pkm *PubKeyManager) HasKey(pk common.PubKey) bool
HasKey determinate whether the given key is in the PubKeyManager
func (*PubKeyManager) Remove ¶
func (pkm *PubKeyManager) Remove(pk common.PubKey)
type Signer ¶
Signer will pull the tx out from statechain and then forward it to binance chain
type StateChainBlockScan ¶
type StateChainBlockScan struct {
// contains filtered or unexported fields
}
func NewStateChainBlockScan ¶
func NewStateChainBlockScan(cfg config.BlockScannerConfiguration, scanStorage blockscanner.ScannerStorage, chainHost string, m *metrics.Metrics, pkm *PubKeyManager) (*StateChainBlockScan, error)
NewStateChainBlockScan create a new instance of statechain block scanner
func (*StateChainBlockScan) GetMessages ¶
func (b *StateChainBlockScan) GetMessages() <-chan stypes.TxOut
GetMessages return the channel
func (*StateChainBlockScan) Start ¶
func (b *StateChainBlockScan) Start() error
Start to scan blocks
type StateChanBlockScannerStorage ¶
type StateChanBlockScannerStorage struct { *blockscanner.LevelDBScannerStorage // contains filtered or unexported fields }
func NewStateChanBlockScannerStorage ¶
func NewStateChanBlockScannerStorage(levelDbFolder string) (*StateChanBlockScannerStorage, error)
NewStateChanBlockScannerStorage create a new instance of StateChanBlockScannerStorage
func (*StateChanBlockScannerStorage) Close ¶
func (s *StateChanBlockScannerStorage) Close() error
Close underlying db
func (*StateChanBlockScannerStorage) GetTxOutsForRetry ¶
func (ldbss *StateChanBlockScannerStorage) GetTxOutsForRetry(failedOnly bool) ([]types.TxOut, error)
GetFailedBlocksForRetry
func (*StateChanBlockScannerStorage) RemoveTxOut ¶
func (s *StateChanBlockScannerStorage) RemoveTxOut(txOut types.TxOut) error
RemoveTxOut delete the given txout from data store
func (*StateChanBlockScannerStorage) SetTxOutStatus ¶
func (s *StateChanBlockScannerStorage) SetTxOutStatus(txOut types.TxOut, status TxOutLocalStatus) error
SetTxOutStatus store the txout locally
type TxOutLocalItem ¶
type TxOutLocalItem struct { TxOut types.TxOut `json:"tx_out"` Status TxOutLocalStatus `json:"status"` }
TxOutLocalItem for local storage
type TxOutLocalStatus ¶
type TxOutLocalStatus byte
const ( Processing TxOutLocalStatus = iota Failed )
Click to show internal directories.
Click to hide internal directories.