Documentation
¶
Index ¶
- type BulkValidator
- type Cleaner
- type NoOpValidator
- type UtxImpl
- func (a *UtxImpl) Add(st types.UtxPoolValidatorState, tx proto.Transaction) error
- func (a *UtxImpl) AddWithBytes(st types.UtxPoolValidatorState, tx proto.Transaction, b []byte) error
- func (a *UtxImpl) AddWithBytesRaw(tx proto.Transaction, b []byte) error
- func (a *UtxImpl) AllTransactions() []proto.Transaction
- func (a *UtxImpl) Clean(ctx context.Context, shouldDrop func(tx proto.Transaction) bool) (int, int)
- func (a *UtxImpl) CurSize() uint64
- func (a *UtxImpl) Exists(tx proto.Transaction) bool
- func (a *UtxImpl) ExistsByID(id []byte) bool
- func (a *UtxImpl) Len() int
- func (a *UtxImpl) Pop() *types.TransactionWithBytes
- type Validator
- type ValidatorImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkValidator ¶ added in v0.5.0
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 ¶
type NoOpValidator ¶ added in v0.5.0
type NoOpValidator struct {
}
func (NoOpValidator) Validate ¶ added in v0.5.0
func (a NoOpValidator) Validate(_ types.UtxPoolValidatorState, _ proto.Transaction) error
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
func (a *UtxImpl) Add(st types.UtxPoolValidatorState, tx proto.Transaction) error
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) ExistsByID ¶ added in v0.5.0
func (*UtxImpl) Pop ¶
func (a *UtxImpl) Pop() *types.TransactionWithBytes
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 (*ValidatorImpl) Validate ¶ added in v0.5.0
func (a *ValidatorImpl) Validate(st types.UtxPoolValidatorState, tx proto.Transaction) error
Click to show internal directories.
Click to hide internal directories.