utxpool

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package utxpool is a generated GoMock package.

Index

Constants

View Source
const DELTA = 86400 * 1000 / 6 // 4 hours

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkValidator added in v0.5.0

type BulkValidator interface {
	Validate()
}

type Cleaner

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

func NewCleaner

func NewCleaner(services services.Services) *Cleaner

func (*Cleaner) Handle

func (a *Cleaner) Handle()

implements types.Handler

type MockstateWrapper added in v0.5.0

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

MockstateWrapper is a mock of stateWrapper interface

func NewMockstateWrapper added in v0.5.0

func NewMockstateWrapper(ctrl *gomock.Controller) *MockstateWrapper

NewMockstateWrapper creates a new mock instance

func (*MockstateWrapper) BlockVRF added in v0.5.0

func (m *MockstateWrapper) BlockVRF(blockHeader *proto.BlockHeader, height proto.Height) ([]byte, error)

BlockVRF mocks base method

func (*MockstateWrapper) EXPECT added in v0.5.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockstateWrapper) Height added in v0.5.0

func (m *MockstateWrapper) Height() (proto.Height, error)

Height mocks base method

func (*MockstateWrapper) Mutex added in v0.5.0

func (m *MockstateWrapper) Mutex() *lock.RwMutex

Mutex mocks base method

func (*MockstateWrapper) ResetValidationList added in v0.5.0

func (m *MockstateWrapper) ResetValidationList()

ResetValidationList mocks base method

func (*MockstateWrapper) TopBlock added in v0.5.0

func (m *MockstateWrapper) TopBlock() *proto.Block

TopBlock mocks base method

func (*MockstateWrapper) ValidateNextTx added in v0.5.0

func (m *MockstateWrapper) ValidateNextTx(tx proto.Transaction, currentTimestamp, parentTimestamp uint64, version proto.BlockVersion, vrf []byte) error

ValidateNextTx mocks base method

type MockstateWrapperMockRecorder added in v0.5.0

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

MockstateWrapperMockRecorder is the mock recorder for MockstateWrapper

func (*MockstateWrapperMockRecorder) BlockVRF added in v0.5.0

func (mr *MockstateWrapperMockRecorder) BlockVRF(blockHeader, height interface{}) *gomock.Call

BlockVRF indicates an expected call of BlockVRF

func (*MockstateWrapperMockRecorder) Height added in v0.5.0

Height indicates an expected call of Height

func (*MockstateWrapperMockRecorder) Mutex added in v0.5.0

Mutex indicates an expected call of Mutex

func (*MockstateWrapperMockRecorder) ResetValidationList added in v0.5.0

func (mr *MockstateWrapperMockRecorder) ResetValidationList() *gomock.Call

ResetValidationList indicates an expected call of ResetValidationList

func (*MockstateWrapperMockRecorder) TopBlock added in v0.5.0

func (mr *MockstateWrapperMockRecorder) TopBlock() *gomock.Call

TopBlock indicates an expected call of TopBlock

func (*MockstateWrapperMockRecorder) ValidateNextTx added in v0.5.0

func (mr *MockstateWrapperMockRecorder) ValidateNextTx(tx, currentTimestamp, parentTimestamp, version, vrf interface{}) *gomock.Call

ValidateNextTx indicates an expected call of ValidateNextTx

type NoOpValidator added in v0.5.0

type NoOpValidator struct {
}

func (NoOpValidator) Validate added in v0.5.0

func (a NoOpValidator) Validate(t 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) AddWithBytes

func (a *UtxImpl) AddWithBytes(t proto.Transaction, b []byte) error

func (*UtxImpl) AllTransactions added in v0.5.0

func (a *UtxImpl) AllTransactions() []*types.TransactionWithBytes

func (*UtxImpl) Count added in v0.5.0

func (a *UtxImpl) Count() int

func (*UtxImpl) CurSize added in v0.5.0

func (a *UtxImpl) CurSize() uint64

func (*UtxImpl) Exists

func (a *UtxImpl) Exists(t 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(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(state stateWrapper, tm types.Time) *ValidatorImpl

func (*ValidatorImpl) Validate added in v0.5.0

func (a *ValidatorImpl) Validate(t proto.Transaction) error

Jump to

Keyboard shortcuts

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