mempool

package
v1.7.17-rc.21 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: BSD-3-Clause Imports: 10 Imported by: 4

Documentation

Overview

Package mempool is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockTimer

type BlockTimer interface {
	// ResetBlockTimer schedules a timer to notify the consensus engine once
	// there is a block ready to be built. If a block is ready to be built when
	// this function is called, the engine will be notified directly.
	ResetBlockTimer()
}

type Mempool

type Mempool interface {
	// we may want to be able to stop valid transactions
	// from entering the mempool, e.g. during blocks creation
	EnableAdding()
	DisableAdding()

	Add(tx *txs.Tx) error
	Has(txID ids.ID) bool
	Get(txID ids.ID) *txs.Tx

	AddDecisionTx(tx *txs.Tx)
	AddProposalTx(tx *txs.Tx)

	HasDecisionTxs() bool
	HasProposalTx() bool

	RemoveDecisionTxs(txs []*txs.Tx)
	RemoveProposalTx(tx *txs.Tx)

	PopDecisionTxs(maxTxsBytes int) []*txs.Tx
	PopProposalTx() *txs.Tx

	// Note: dropped txs are added to droppedTxIDs but not
	// not evicted from unissued decision/proposal txs.
	// This allows previously dropped txs to be possibly
	// reissued.
	MarkDropped(txID ids.ID, reason string)
	GetDropReason(txID ids.ID) (string, bool)
}

func NewMempool

func NewMempool(
	namespace string,
	registerer prometheus.Registerer,
	blkTimer BlockTimer,
) (Mempool, error)

type MockMempool

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

MockMempool is a mock of Mempool interface

func NewMockMempool

func NewMockMempool(ctrl *gomock.Controller) *MockMempool

NewMockMempool creates a new mock instance

func (*MockMempool) Add

func (m *MockMempool) Add(arg0 *txs.Tx) error

Add mocks base method

func (*MockMempool) AddDecisionTx

func (m *MockMempool) AddDecisionTx(arg0 *txs.Tx)

AddDecisionTx mocks base method

func (*MockMempool) AddProposalTx

func (m *MockMempool) AddProposalTx(arg0 *txs.Tx)

AddProposalTx mocks base method

func (*MockMempool) DisableAdding

func (m *MockMempool) DisableAdding()

DisableAdding mocks base method

func (*MockMempool) EXPECT

func (m *MockMempool) EXPECT() *MockMempoolMockRecorder

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

func (*MockMempool) EnableAdding

func (m *MockMempool) EnableAdding()

EnableAdding mocks base method

func (*MockMempool) Get

func (m *MockMempool) Get(arg0 ids.ID) *txs.Tx

Get mocks base method

func (*MockMempool) GetDropReason

func (m *MockMempool) GetDropReason(arg0 ids.ID) (string, bool)

GetDropReason mocks base method

func (*MockMempool) Has

func (m *MockMempool) Has(arg0 ids.ID) bool

Has mocks base method

func (*MockMempool) HasDecisionTxs

func (m *MockMempool) HasDecisionTxs() bool

HasDecisionTxs mocks base method

func (*MockMempool) HasProposalTx

func (m *MockMempool) HasProposalTx() bool

HasProposalTx mocks base method

func (*MockMempool) MarkDropped

func (m *MockMempool) MarkDropped(arg0 ids.ID, arg1 string)

MarkDropped mocks base method

func (*MockMempool) PopDecisionTxs

func (m *MockMempool) PopDecisionTxs(arg0 int) []*txs.Tx

PopDecisionTxs mocks base method

func (*MockMempool) PopProposalTx

func (m *MockMempool) PopProposalTx() *txs.Tx

PopProposalTx mocks base method

func (*MockMempool) RemoveDecisionTxs

func (m *MockMempool) RemoveDecisionTxs(arg0 []*txs.Tx)

RemoveDecisionTxs mocks base method

func (*MockMempool) RemoveProposalTx

func (m *MockMempool) RemoveProposalTx(arg0 *txs.Tx)

RemoveProposalTx mocks base method

type MockMempoolMockRecorder

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

MockMempoolMockRecorder is the mock recorder for MockMempool

func (*MockMempoolMockRecorder) Add

func (mr *MockMempoolMockRecorder) Add(arg0 interface{}) *gomock.Call

Add indicates an expected call of Add

func (*MockMempoolMockRecorder) AddDecisionTx

func (mr *MockMempoolMockRecorder) AddDecisionTx(arg0 interface{}) *gomock.Call

AddDecisionTx indicates an expected call of AddDecisionTx

func (*MockMempoolMockRecorder) AddProposalTx

func (mr *MockMempoolMockRecorder) AddProposalTx(arg0 interface{}) *gomock.Call

AddProposalTx indicates an expected call of AddProposalTx

func (*MockMempoolMockRecorder) DisableAdding

func (mr *MockMempoolMockRecorder) DisableAdding() *gomock.Call

DisableAdding indicates an expected call of DisableAdding

func (*MockMempoolMockRecorder) EnableAdding

func (mr *MockMempoolMockRecorder) EnableAdding() *gomock.Call

EnableAdding indicates an expected call of EnableAdding

func (*MockMempoolMockRecorder) Get

func (mr *MockMempoolMockRecorder) Get(arg0 interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockMempoolMockRecorder) GetDropReason

func (mr *MockMempoolMockRecorder) GetDropReason(arg0 interface{}) *gomock.Call

GetDropReason indicates an expected call of GetDropReason

func (*MockMempoolMockRecorder) Has

func (mr *MockMempoolMockRecorder) Has(arg0 interface{}) *gomock.Call

Has indicates an expected call of Has

func (*MockMempoolMockRecorder) HasDecisionTxs

func (mr *MockMempoolMockRecorder) HasDecisionTxs() *gomock.Call

HasDecisionTxs indicates an expected call of HasDecisionTxs

func (*MockMempoolMockRecorder) HasProposalTx

func (mr *MockMempoolMockRecorder) HasProposalTx() *gomock.Call

HasProposalTx indicates an expected call of HasProposalTx

func (*MockMempoolMockRecorder) MarkDropped

func (mr *MockMempoolMockRecorder) MarkDropped(arg0, arg1 interface{}) *gomock.Call

MarkDropped indicates an expected call of MarkDropped

func (*MockMempoolMockRecorder) PopDecisionTxs

func (mr *MockMempoolMockRecorder) PopDecisionTxs(arg0 interface{}) *gomock.Call

PopDecisionTxs indicates an expected call of PopDecisionTxs

func (*MockMempoolMockRecorder) PopProposalTx

func (mr *MockMempoolMockRecorder) PopProposalTx() *gomock.Call

PopProposalTx indicates an expected call of PopProposalTx

func (*MockMempoolMockRecorder) RemoveDecisionTxs

func (mr *MockMempoolMockRecorder) RemoveDecisionTxs(arg0 interface{}) *gomock.Call

RemoveDecisionTxs indicates an expected call of RemoveDecisionTxs

func (*MockMempoolMockRecorder) RemoveProposalTx

func (mr *MockMempoolMockRecorder) RemoveProposalTx(arg0 interface{}) *gomock.Call

RemoveProposalTx indicates an expected call of RemoveProposalTx

Jump to

Keyboard shortcuts

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