utxpool

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkValidator added in v0.5.0

type BulkValidator interface {
	Validate(ctx context.Context)
}

type Cleaner

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

Cleaner is responsible for validating transactions in the UTX pool and removing invalid ones.

func NewCleaner

func NewCleaner(state cleanerState, pool types.UtxPool, tm types.Time, scheme proto.Scheme) *Cleaner

func (*Cleaner) Clean added in v0.6.0

func (a *Cleaner) Clean(ctx context.Context)

type NoOpValidator added in v0.5.0

type NoOpValidator struct {
}

func (NoOpValidator) Validate added in v0.5.0

type UtxImpl

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

func New

func New(sizeLimit uint64, validator Validator, settings *settings.BlockchainSettings) *UtxImpl

func (*UtxImpl) Add added in v0.6.0

Add Must only be called inside state Map or MapUnsafe.

func (*UtxImpl) AddWithBytes

func (a *UtxImpl) AddWithBytes(st types.UtxPoolValidatorState, tx proto.Transaction, b []byte) error

AddWithBytes Must only be called inside state Map or MapUnsafe.

func (*UtxImpl) AddWithBytesRaw added in v0.11.0

func (a *UtxImpl) AddWithBytesRaw(tx proto.Transaction, b []byte) error

func (*UtxImpl) AllTransactions added in v0.5.0

func (a *UtxImpl) AllTransactions() []proto.Transaction

func (*UtxImpl) Clean added in v0.11.0

func (a *UtxImpl) Clean(ctx context.Context, shouldDrop func(tx proto.Transaction) bool) (int, int)

func (*UtxImpl) CurSize added in v0.5.0

func (a *UtxImpl) CurSize() uint64

func (*UtxImpl) Exists

func (a *UtxImpl) Exists(tx proto.Transaction) bool

func (*UtxImpl) ExistsByID added in v0.5.0

func (a *UtxImpl) ExistsByID(id []byte) bool

func (*UtxImpl) Len

func (a *UtxImpl) Len() int

func (*UtxImpl) Pop

type Validator added in v0.5.0

type Validator interface {
	Validate(st types.UtxPoolValidatorState, t proto.Transaction) error
}

type ValidatorImpl added in v0.5.0

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

func NewValidator added in v0.5.0

func NewValidator(tm types.Time, obsolescence time.Duration) (*ValidatorImpl, error)

func (*ValidatorImpl) Validate added in v0.5.0

Jump to

Keyboard shortcuts

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