transaction

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *pg.DB) *Repository

func (*Repository) FindTransactionByHash added in v0.2.4

func (r *Repository) FindTransactionByHash(hash string) (*models.Transaction, error)

func (Repository) IndexLastNTxAddress

func (r Repository) IndexLastNTxAddress(txsNumber int) error

func (Repository) IndexTxAddress

func (r Repository) IndexTxAddress(txsId []uint64) error

func (*Repository) LinkWithValidators

func (r *Repository) LinkWithValidators(links []*models.TransactionValidator) error

func (*Repository) Save

func (r *Repository) Save(transaction *models.Transaction) error

func (*Repository) SaveAll

func (r *Repository) SaveAll(transactions []*models.Transaction) error

func (*Repository) SaveAllInvalid

func (r *Repository) SaveAllInvalid(transactions []*models.InvalidTransaction) error

func (*Repository) SaveAllTxOutputs

func (r *Repository) SaveAllTxOutputs(output []*models.TransactionOutput) error

func (*Repository) SelectCoinsTransaction added in v0.2.6

func (r *Repository) SelectCoinsTransaction() (*[]models.Transaction, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(env *models.ExtenderEnvironment, repository *Repository, addressRepository *address.Repository,
	validatorRepository *validator.Repository, coinRepository *coin.Repository, coinService *coin.Service, logger *logrus.Entry) *Service

func (*Service) FindTransactionByHash added in v0.2.4

func (s *Service) FindTransactionByHash(hash string) (*models.Transaction, error)

func (*Service) GetSaveInvalidTxsJobChannel

func (s *Service) GetSaveInvalidTxsJobChannel() chan []*models.InvalidTransaction

func (*Service) GetSaveTxJobChannel

func (s *Service) GetSaveTxJobChannel() chan []*models.Transaction

func (*Service) GetSaveTxValidatorJobChannel

func (s *Service) GetSaveTxValidatorJobChannel() chan []*models.TransactionValidator

func (*Service) GetSaveTxsOutputJobChannel

func (s *Service) GetSaveTxsOutputJobChannel() chan []*models.Transaction

func (*Service) HandleTransactionsFromBlockResponse

func (s *Service) HandleTransactionsFromBlockResponse(blockHeight uint64, blockCreatedAt time.Time,
	transactions []responses.Transaction) error

Handle response and save block to DB

func (*Service) SaveAllTxOutputs

func (s *Service) SaveAllTxOutputs(txList []*models.Transaction) error

func (*Service) SaveInvalidTransactionsWorker

func (s *Service) SaveInvalidTransactionsWorker(jobs <-chan []*models.InvalidTransaction)

func (*Service) SaveTransactionsOutputWorker

func (s *Service) SaveTransactionsOutputWorker(jobs <-chan []*models.Transaction)

func (*Service) SaveTransactionsWorker

func (s *Service) SaveTransactionsWorker(jobs <-chan []*models.Transaction)

func (*Service) SaveTxValidatorWorker

func (s *Service) SaveTxValidatorWorker(jobs <-chan []*models.TransactionValidator)

func (*Service) SelectCoinsTransaction added in v0.2.6

func (s *Service) SelectCoinsTransaction() (*[]models.Transaction, error)

func (*Service) UpdateTxsIndexWorker

func (s *Service) UpdateTxsIndexWorker()

Jump to

Keyboard shortcuts

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