signer

package
v0.0.0-...-855f576 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSignerLevelDBFolder = `signer_data`

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer struct {
	Binance *binance.Binance
	// contains filtered or unexported fields
}

Signer will pull the tx out from statechain and then forward it to binance chain

func NewSigner

func NewSigner(cfg config.SignerConfiguration) (*Signer, error)

NewSigner create a new instance of signer

func (*Signer) Start

func (s *Signer) Start() error

func (*Signer) Stop

func (s *Signer) Stop() error

Stop the signer process

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) (*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

func (*StateChainBlockScan) Stop

func (b *StateChainBlockScan) Stop() error

Stop the scanner

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

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL