memtxpool

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemTxPool

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

func NewMemTxPool

func NewMemTxPool(maxcount, maxsize uint64) *MemTxPool

func (*MemTxPool) AddTx

func (p *MemTxPool) AddTx(tx interfaces.Transaction) error

func (*MemTxPool) CheckTxExist

func (p *MemTxPool) CheckTxExist(tx interfaces.Transaction) (interfaces.Transaction, bool)

func (*MemTxPool) CheckTxExistByHash

func (p *MemTxPool) CheckTxExistByHash(txhash fields.Hash) (interfaces.Transaction, bool)

func (*MemTxPool) CopyTxsOrderByFeePurity

func (p *MemTxPool) CopyTxsOrderByFeePurity(targetblockheight uint64, maxcount uint32, maxsize uint32) []interfaces.Transaction

func (*MemTxPool) GetDiamondCreateTxGroup

func (p *MemTxPool) GetDiamondCreateTxGroup() *TxGroup

func (*MemTxPool) GetDiamondCreateTxs

func (p *MemTxPool) GetDiamondCreateTxs(num int) []interfaces.Transaction

func (*MemTxPool) GetSimpleTxGroup

func (p *MemTxPool) GetSimpleTxGroup() *TxGroup

func (*MemTxPool) GetTotalCount

func (p *MemTxPool) GetTotalCount() (uint64, uint64)

func (*MemTxPool) PauseEventSubscribe

func (p *MemTxPool) PauseEventSubscribe()

Pause event subscription

func (*MemTxPool) RemoveTxs

func (p *MemTxPool) RemoveTxs(txs []interfaces.Transaction)

func (*MemTxPool) RemoveTxsOnNextBlockArrive

func (p *MemTxPool) RemoveTxsOnNextBlockArrive(txs []interfaces.Transaction)

func (*MemTxPool) RenewalEventSubscribe

func (p *MemTxPool) RenewalEventSubscribe()

Reopen event subscription

func (*MemTxPool) SetAutomaticallyCleanInvalidTransactions

func (p *MemTxPool) SetAutomaticallyCleanInvalidTransactions(set bool)

func (*MemTxPool) SetBlockChain

func (p *MemTxPool) SetBlockChain(bc interfaces.BlockChain)

func (*MemTxPool) Start

func (p *MemTxPool) Start()

func (*MemTxPool) SubscribeOnAddTxSuccess

func (p *MemTxPool) SubscribeOnAddTxSuccess(addtxCh chan interfaces.Transaction)

type TxGroup

type TxGroup struct {
	Head *TxItem
	Tail *TxItem

	Count int64
	// contains filtered or unexported fields
}

func NewTxGroup

func NewTxGroup() *TxGroup

func (*TxGroup) Add

func (g *TxGroup) Add(item *TxItem) bool

func (*TxGroup) Clean

func (g *TxGroup) Clean()

func (*TxGroup) Find

func (g *TxGroup) Find(hash fields.Hash) *TxItem

func (*TxGroup) GetItem

func (g *TxGroup) GetItem(id string) (*TxItem, bool)

func (*TxGroup) RemoveByTxHash

func (g *TxGroup) RemoveByTxHash(hash fields.Hash) *TxItem

func (*TxGroup) RemoveItem

func (g *TxGroup) RemoveItem(item *TxItem) bool

type TxItem

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

func (*TxItem) GetNext

func (p *TxItem) GetNext() *TxItem

func (*TxItem) GetTx

func (p *TxItem) GetTx() interfaces.Transaction

Jump to

Keyboard shortcuts

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