Documentation ¶
Index ¶
Constants ¶
View Source
const ( Ordered = iota SortNonce Remove Rebroadcast )
View Source
const ( ReadyGenerateBatch statusType = iota HasPendingRequest PoolFull PoolEmpty )
View Source
const ( DefaultPoolSize = 50000 DefaultBatchSize = 500 DefaultToleranceNonceGap = 1000 DefaultToleranceTime = 5 * time.Minute DefaultToleranceRemoveTime = 15 * time.Minute DefaultCleanEmptyAccountTime = 10 * time.Minute )
nolint
View Source
const ( SendMissingTxsEvent = iota FilterReBroadcastTxsEvent RestoreOneBatchEvent RestoreAllBatchedEvent )
=======================consensusEvent=============================
View Source
const (
DefaultTestBatchSize = uint64(4)
)
nolint
Variables ¶
Functions ¶
Types ¶
type Config ¶
type Config struct { Logger logrus.FieldLogger BatchSize uint64 PoolSize uint64 BatchMemLimit bool BatchMaxMem uint64 IsTimed bool ToleranceNonceGap uint64 ToleranceTime time.Duration ToleranceRemoveTime time.Duration CleanEmptyAccountTime time.Duration GetAccountNonce GetAccountNonceFunc }
Config defines the txpool config items.
func NewMockTxPoolConfig ¶
func NewMockTxPoolConfig() Config
NewMockTxPoolConfig returns the default test config
type GetAccountNonceFunc ¶
type PoolStatusMgr ¶
type PoolStatusMgr struct {
// contains filtered or unexported fields
}
func (*PoolStatusMgr) In ¶
func (st *PoolStatusMgr) In(pos statusType) bool
In returns the atomic status of specified position.
func (*PoolStatusMgr) InOne ¶
func (st *PoolStatusMgr) InOne(poss ...statusType) bool
func (*PoolStatusMgr) Reset ¶
func (st *PoolStatusMgr) Reset()
Click to show internal directories.
Click to hide internal directories.