pool

package
v0.0.0-...-041d6b2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTxTTL    = 10 * time.Minute
	DefaultTxPrefix = "tx_"
)

Variables

View Source
var (
	ErrTxNotFound = errors.New("tx isn't found in mempool")
)

Functions

This section is empty.

Types

type Mempool

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

func NewMempool

func NewMempool(bus EventBus.Bus, cm cache.CacheManager) (*Mempool, error)

func (*Mempool) DeleteTx

func (mp *Mempool) DeleteTx(txHash []byte) error

func (*Mempool) GetAllTransactions

func (mp *Mempool) GetAllTransactions() []*types2.Transaction

func (*Mempool) GetTransaction

func (mp *Mempool) GetTransaction(hash []byte) (*types2.Transaction, error)

func (*Mempool) GetTransactionsForNewBlock

func (mp *Mempool) GetTransactionsForNewBlock() []*types2.Transaction

func (*Mempool) StoreTx

func (mp *Mempool) StoreTx(tx *types2.Transaction) error

Jump to

Keyboard shortcuts

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