poolsCleaner

package
v1.0.101 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCrossTxsPoolsCleaner added in v0.0.5

func NewCrossTxsPoolsCleaner(
	blockTracker BlockTracker,
	dataPool dataRetriever.PoolsHolder,
	rounder process.Rounder,
	shardCoordinator sharding.Coordinator,
) (*crossTxsPoolsCleaner, error)

NewCrossTxsPoolsCleaner will return a new cross txs pools cleaner

func NewMiniBlocksPoolsCleaner added in v0.0.5

func NewMiniBlocksPoolsCleaner(
	blockTracker BlockTracker,
	miniblocksPool storage.Cacher,
	rounder process.Rounder,
	shardCoordinator sharding.Coordinator,
) (*miniBlocksPoolsCleaner, error)

NewMiniBlocksPoolsCleaner will return a new miniblocks pools cleaner

Types

type BlockTracker added in v0.0.5

type BlockTracker interface {
	GetNumPendingMiniBlocks(shardID uint32) uint32
	IsInterfaceNil() bool
}

BlockTracker defines the functionality for node to track the blocks which are received from network

type TxPoolsCleaner

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

TxPoolsCleaner represents a pools cleaner that check if a transaction should be in pool

func NewTxsPoolsCleaner

func NewTxsPoolsCleaner(
	accounts state.AccountsAdapter,
	shardCoordinator sharding.Coordinator,
	dataPool dataRetriever.PoolsHolder,
	addrConverter state.AddressConverter,
	economicsFee process.FeeHandler,
) (*TxPoolsCleaner, error)

NewTxsPoolsCleaner will return a new transaction pools cleaner

func (*TxPoolsCleaner) Clean

func (tpc *TxPoolsCleaner) Clean(duration time.Duration) (bool, error)

Clean removes the transactions with lower nonces than the senders' accounts.

func (*TxPoolsCleaner) IsInterfaceNil

func (tpc *TxPoolsCleaner) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TxPoolsCleaner) NumRemovedTxs

func (tpc *TxPoolsCleaner) NumRemovedTxs() uint64

NumRemovedTxs will return the number of removed txs from pools

Jump to

Keyboard shortcuts

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