txpool

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChainTxPoolManager             *ChainTxPool
	RecentAccountCellUsedTxManager *RecentUsedTxManager
	RecentManagerCellUsedTxManager *RecentUsedTxManager
	RecentIncomeCellUsedTxManager  *RecentUsedTxManager
)

Functions

This section is empty.

Types

type ChainTxPool

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

func NewChainTxPool

func NewChainTxPool() *ChainTxPool

func (*ChainTxPool) FindOneTx

func (c *ChainTxPool) FindOneTx(targetTxHash string) bool

func (*ChainTxPool) Print

func (c *ChainTxPool) Print() string

func (*ChainTxPool) StartLoopGetRawTxPool

func (c *ChainTxPool) StartLoopGetRawTxPool(ctx context.Context, rpcClient rpc.Client, duration time.Duration)

type RecentUsedTxInfoObj

type RecentUsedTxInfoObj struct {
	TimeUnixAdd int64          `json:"time_unix_add"`
	OutPoint    types.OutPoint `json:"out_point"`
	DetailObj   interface{}    `json:"detail_obj"`
}

type RecentUsedTxManager

type RecentUsedTxManager struct {
	UsedTx     sync.Map
	RetryTime  int
	RetryDelay time.Duration
	// contains filtered or unexported fields
}

func NewRecentUsedTxManager

func NewRecentUsedTxManager(retryTime int, retryDelay time.Duration, overdueSec int64) *RecentUsedTxManager

func (*RecentUsedTxManager) AddRecentUsedTx

func (r *RecentUsedTxManager) AddRecentUsedTx(accountId celltype.DasAccountId, tx RecentUsedTxInfoObj)

func (*RecentUsedTxManager) AddRecentUsedTx2

func (r *RecentUsedTxManager) AddRecentUsedTx2(tx RecentUsedTxInfoObj)

func (*RecentUsedTxManager) PopOneLocalRecentUsedTx

func (r *RecentUsedTxManager) PopOneLocalRecentUsedTx(key interface{}) *RecentUsedTxInfoObj

func (*RecentUsedTxManager) PopOneRecentUsedTx

func (r *RecentUsedTxManager) PopOneRecentUsedTx(chainTxPool *ChainTxPool, key interface{}) *RecentUsedTxInfoObj

func (*RecentUsedTxManager) RemoveOneRecentUsedTx

func (r *RecentUsedTxManager) RemoveOneRecentUsedTx(accountId celltype.DasAccountId, newTxHash types.Hash)

func (*RecentUsedTxManager) RemoveOneRecentUsedTxByHash

func (r *RecentUsedTxManager) RemoveOneRecentUsedTxByHash(txHash types.Hash)

Jump to

Keyboard shortcuts

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