Help us shape the future of Go! Take the 2026 Go Developer Survey

txpool

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxMsgBufferChSize          = 65536
	ChainUpdateMsgBufferChSize = 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() []*chain.TxWrap

GetAllTxs returns all transactions in mempool

func (*TransactionPool) GetTransactionsInPool

func (tx_pool *TransactionPool) GetTransactionsInPool() []*types.Transaction

GetTransactionsInPool gets all transactions in memory 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, broadcast bool) 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