txpool

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxMsgBufferChSize          = 65536
	ChainUpdateMsgBufferChSize = 65536
	TxScriptBufferChSize       = 65536
)

const defines constants

Variables

This section is empty.

Functions

This section is empty.

Types

type TransactionPool

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

TransactionPool define struct.

func NewTransactionPool

func NewTransactionPool(parent goprocess.Process, notifiee p2p.Net, c *chain.BlockChain, bus eventbus.Bus) *TransactionPool

NewTransactionPool new a transaction pool.

func (*TransactionPool) GetAllTxs

func (tx_pool *TransactionPool) GetAllTxs() []*types.TxWrap

GetAllTxs returns all transactions in mempool

func (*TransactionPool) GetOrphaTxs added in v0.3.0

func (tx_pool *TransactionPool) GetOrphaTxs() []*types.TxWrap

GetOrphaTxs returns all orpha txs in mempool

func (*TransactionPool) GetTxByHash added in v0.3.0

func (tx_pool *TransactionPool) GetTxByHash(hash *crypto.HashType) (*types.TxWrap, bool)

GetTxByHash get a transaction by hash from pool or orphan pool return a tx and tell whether it is in pool or in orphan pool

func (*TransactionPool) Proc

func (tx_pool *TransactionPool) Proc() goprocess.Process

Proc returns the goprocess of the TransactionPool

func (*TransactionPool) ProcessTx

func (tx_pool *TransactionPool) ProcessTx(tx *types.Transaction, transferMode core.TransferMode) error

ProcessTx is used to handle new transactions. utxoSet: utxos associated with the tx

func (*TransactionPool) Run

func (tx_pool *TransactionPool) Run() error

Run launch transaction pool.

func (*TransactionPool) Stop

func (tx_pool *TransactionPool) Stop()

Stop the server

Jump to

Keyboard shortcuts

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