Documentation ¶
Index ¶
- Constants
- type ConstantsProvider
- type Signer
- type SignerStorage
- type SignerStore
- func (s *SignerStore) Batch(items []TxOutStoreItem) error
- func (s *SignerStore) Close() error
- func (s *SignerStore) Get(key string) (item TxOutStoreItem, err error)
- func (s *SignerStore) GetInternalDb() *leveldb.DB
- func (s *SignerStore) Has(key string) (ok bool)
- func (s *SignerStore) List() []TxOutStoreItem
- func (s *SignerStore) OrderedLists() map[string][]TxOutStoreItem
- func (s *SignerStore) Remove(item TxOutStoreItem) error
- func (s *SignerStore) Set(item TxOutStoreItem) error
- type ThorchainBlockScan
- type TxOutStoreItem
- type TxStatus
Constants ¶
const (
DefaultSignerLevelDBFolder = "signer_data"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConstantsProvider ¶
type ConstantsProvider struct {
// contains filtered or unexported fields
}
ConstantProvider which will query thorchain to get the constants value per request it will also cache the constant values internally
func NewConstantsProvider ¶
func NewConstantsProvider(bridge *thorclient.ThorchainBridge) *ConstantsProvider
NewConstantsProvider create a new instance of ConstantsProvider
func (*ConstantsProvider) EnsureConstants ¶
func (cp *ConstantsProvider) EnsureConstants(thorchainBlockHeight int64) error
func (*ConstantsProvider) GetInt64Value ¶
func (cp *ConstantsProvider) GetInt64Value(thorchainBlockHeight int64, key constants.ConstantName) (int64, error)
GetInt64Value get the constant value that match the given key
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer will pull the tx out from thorchain and then forward it to chain
func NewSigner ¶
func NewSigner(cfg config.SignerConfiguration, thorchainBridge *thorclient.ThorchainBridge, thorKeys *thorclient.Keys, pubkeyMgr pubkeymanager.PubKeyValidator, tssServer *tssp.TssServer, chains map[common.Chain]chainclients.ChainClient, m *metrics.Metrics) (*Signer, error)
NewSigner create a new instance of signer
type SignerStorage ¶
type SignerStorage interface { Set(item TxOutStoreItem) error Batch(items []TxOutStoreItem) error Get(key string) (TxOutStoreItem, error) Has(key string) bool Remove(item TxOutStoreItem) error List() []TxOutStoreItem OrderedLists() map[string][]TxOutStoreItem Close() error }
type SignerStore ¶
type SignerStore struct { *blockscanner.LevelDBScannerStorage // contains filtered or unexported fields }
func NewSignerStore ¶
func NewSignerStore(levelDbFolder, passphrase string) (*SignerStore, error)
NewSignerStore create a new instance of SignerStore. If no folder is given, an in memory implementation is used.
func (*SignerStore) Batch ¶
func (s *SignerStore) Batch(items []TxOutStoreItem) error
func (*SignerStore) Get ¶
func (s *SignerStore) Get(key string) (item TxOutStoreItem, err error)
func (*SignerStore) GetInternalDb ¶
func (s *SignerStore) GetInternalDb() *leveldb.DB
func (*SignerStore) Has ¶
func (s *SignerStore) Has(key string) (ok bool)
func (*SignerStore) List ¶
func (s *SignerStore) List() []TxOutStoreItem
GetTxOutsForRetry send back tx out to retry depending on arg failed only
func (*SignerStore) OrderedLists ¶
func (s *SignerStore) OrderedLists() map[string][]TxOutStoreItem
OrderedLists
func (*SignerStore) Remove ¶
func (s *SignerStore) Remove(item TxOutStoreItem) error
func (*SignerStore) Set ¶
func (s *SignerStore) Set(item TxOutStoreItem) error
type ThorchainBlockScan ¶
type ThorchainBlockScan struct {
// contains filtered or unexported fields
}
func NewThorchainBlockScan ¶
func NewThorchainBlockScan(cfg config.BlockScannerConfiguration, scanStorage blockscanner.ScannerStorage, thorchain *thorclient.ThorchainBridge, m *metrics.Metrics, pubkeyMgr pubkeymanager.PubKeyValidator) (*ThorchainBlockScan, error)
NewThorchainBlockScan create a new instance of thorchain block scanner
func (*ThorchainBlockScan) FetchTxs ¶
func (b *ThorchainBlockScan) FetchTxs(height int64) (stypes.TxIn, error)
func (*ThorchainBlockScan) GetHeight ¶
func (b *ThorchainBlockScan) GetHeight() (int64, error)
func (*ThorchainBlockScan) GetKeygenMessages ¶
func (b *ThorchainBlockScan) GetKeygenMessages() <-chan ttypes.KeygenBlock
func (*ThorchainBlockScan) GetTxOutMessages ¶
func (b *ThorchainBlockScan) GetTxOutMessages() <-chan types.TxOut
GetMessages return the channel
type TxOutStoreItem ¶
func NewTxOutStoreItem ¶
func NewTxOutStoreItem(height int64, item types.TxOutItem) TxOutStoreItem
func (*TxOutStoreItem) Key ¶
func (s *TxOutStoreItem) Key() string