Documentation
¶
Overview ¶
Package mempool is a generated GoMock package.
Index ¶
- Variables
- type Mempool
- type MockMempool
- func (m *MockMempool) Add(arg0 *txs.Tx) error
- func (m *MockMempool) DropExpiredStakerTxs(arg0 time.Time) []ids.ID
- func (m *MockMempool) EXPECT() *MockMempoolMockRecorder
- func (m *MockMempool) Get(arg0 ids.ID) (*txs.Tx, bool)
- func (m *MockMempool) GetDropReason(arg0 ids.ID) error
- func (m *MockMempool) Has(arg0 ids.ID) bool
- func (m *MockMempool) HasTxs() bool
- func (m *MockMempool) Iterate(arg0 func(*txs.Tx) bool)
- func (m *MockMempool) Len() int
- func (m *MockMempool) MarkDropped(arg0 ids.ID, arg1 error)
- func (m *MockMempool) Peek() (*txs.Tx, bool)
- func (m *MockMempool) PeekTxs(arg0 int) []*txs.Tx
- func (m *MockMempool) Remove(arg0 ...*txs.Tx)
- func (m *MockMempool) RequestBuildBlock(arg0 bool)
- type MockMempoolMockRecorder
- func (mr *MockMempoolMockRecorder) Add(arg0 any) *gomock.Call
- func (mr *MockMempoolMockRecorder) DropExpiredStakerTxs(arg0 any) *gomock.Call
- func (mr *MockMempoolMockRecorder) Get(arg0 any) *gomock.Call
- func (mr *MockMempoolMockRecorder) GetDropReason(arg0 any) *gomock.Call
- func (mr *MockMempoolMockRecorder) Has(arg0 any) *gomock.Call
- func (mr *MockMempoolMockRecorder) HasTxs() *gomock.Call
- func (mr *MockMempoolMockRecorder) Iterate(arg0 any) *gomock.Call
- func (mr *MockMempoolMockRecorder) Len() *gomock.Call
- func (mr *MockMempoolMockRecorder) MarkDropped(arg0, arg1 any) *gomock.Call
- func (mr *MockMempoolMockRecorder) Peek() *gomock.Call
- func (mr *MockMempoolMockRecorder) PeekTxs(arg0 any) *gomock.Call
- func (mr *MockMempoolMockRecorder) Remove(arg0 ...any) *gomock.Call
- func (mr *MockMempoolMockRecorder) RequestBuildBlock(arg0 any) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
var ( ErrCantIssueAdvanceTimeTx = errors.New("can not issue an advance time tx") ErrCantIssueRewardValidatorTx = errors.New("can not issue a reward validator tx") )
Functions ¶
This section is empty.
Types ¶
type Mempool ¶
type Mempool interface {
txmempool.Mempool[*txs.Tx]
// RequestBuildBlock notifies the consensus engine that a block should be
// built. If [emptyBlockPermitted] is true, the notification will be sent
// regardless of whether there are no transactions in the mempool. If not,
// a notification will only be sent if there is at least one transaction in
// the mempool.
RequestBuildBlock(emptyBlockPermitted bool)
// Additional methods for compatibility
HasTxs() bool
Has(txID ids.ID) bool
PeekTxs(n int) []*txs.Tx
DropExpiredStakerTxs(minStartTime time.Time) []ids.ID
}
func New ¶
func New( namespace string, registerer metric.Registerer, toEngine chan<- common.MessageType, ) (Mempool, error)
type MockMempool ¶ added in v1.1.11
type MockMempool struct {
// contains filtered or unexported fields
}
MockMempool is a mock of Mempool interface.
func NewMockMempool ¶ added in v1.1.11
func NewMockMempool(ctrl *gomock.Controller) *MockMempool
NewMockMempool creates a new mock instance.
func (*MockMempool) Add ¶ added in v1.1.11
func (m *MockMempool) Add(arg0 *txs.Tx) error
Add mocks base method.
func (*MockMempool) DropExpiredStakerTxs ¶ added in v1.1.11
func (m *MockMempool) DropExpiredStakerTxs(arg0 time.Time) []ids.ID
DropExpiredStakerTxs mocks base method.
func (*MockMempool) EXPECT ¶ added in v1.1.11
func (m *MockMempool) EXPECT() *MockMempoolMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMempool) GetDropReason ¶ added in v1.1.11
func (m *MockMempool) GetDropReason(arg0 ids.ID) error
GetDropReason mocks base method.
func (*MockMempool) Has ¶ added in v1.1.11
func (m *MockMempool) Has(arg0 ids.ID) bool
Has mocks base method.
func (*MockMempool) HasTxs ¶ added in v1.1.11
func (m *MockMempool) HasTxs() bool
HasTxs mocks base method.
func (*MockMempool) Iterate ¶ added in v1.1.11
func (m *MockMempool) Iterate(arg0 func(*txs.Tx) bool)
Iterate mocks base method.
func (*MockMempool) MarkDropped ¶ added in v1.1.11
func (m *MockMempool) MarkDropped(arg0 ids.ID, arg1 error)
MarkDropped mocks base method.
func (*MockMempool) Peek ¶ added in v1.1.11
func (m *MockMempool) Peek() (*txs.Tx, bool)
Peek mocks base method.
func (*MockMempool) PeekTxs ¶ added in v1.1.11
func (m *MockMempool) PeekTxs(arg0 int) []*txs.Tx
PeekTxs mocks base method.
func (*MockMempool) Remove ¶ added in v1.1.11
func (m *MockMempool) Remove(arg0 ...*txs.Tx)
Remove mocks base method.
func (*MockMempool) RequestBuildBlock ¶ added in v1.1.11
func (m *MockMempool) RequestBuildBlock(arg0 bool)
RequestBuildBlock mocks base method.
type MockMempoolMockRecorder ¶ added in v1.1.11
type MockMempoolMockRecorder struct {
// contains filtered or unexported fields
}
MockMempoolMockRecorder is the mock recorder for MockMempool.
func (*MockMempoolMockRecorder) Add ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) Add(arg0 any) *gomock.Call
Add indicates an expected call of Add.
func (*MockMempoolMockRecorder) DropExpiredStakerTxs ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) DropExpiredStakerTxs(arg0 any) *gomock.Call
DropExpiredStakerTxs indicates an expected call of DropExpiredStakerTxs.
func (*MockMempoolMockRecorder) Get ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) Get(arg0 any) *gomock.Call
Get indicates an expected call of Get.
func (*MockMempoolMockRecorder) GetDropReason ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) GetDropReason(arg0 any) *gomock.Call
GetDropReason indicates an expected call of GetDropReason.
func (*MockMempoolMockRecorder) Has ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) Has(arg0 any) *gomock.Call
Has indicates an expected call of Has.
func (*MockMempoolMockRecorder) HasTxs ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) HasTxs() *gomock.Call
HasTxs indicates an expected call of HasTxs.
func (*MockMempoolMockRecorder) Iterate ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) Iterate(arg0 any) *gomock.Call
Iterate indicates an expected call of Iterate.
func (*MockMempoolMockRecorder) Len ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) Len() *gomock.Call
Len indicates an expected call of Len.
func (*MockMempoolMockRecorder) MarkDropped ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) MarkDropped(arg0, arg1 any) *gomock.Call
MarkDropped indicates an expected call of MarkDropped.
func (*MockMempoolMockRecorder) Peek ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) Peek() *gomock.Call
Peek indicates an expected call of Peek.
func (*MockMempoolMockRecorder) PeekTxs ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) PeekTxs(arg0 any) *gomock.Call
PeekTxs indicates an expected call of PeekTxs.
func (*MockMempoolMockRecorder) Remove ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) Remove(arg0 ...any) *gomock.Call
Remove indicates an expected call of Remove.
func (*MockMempoolMockRecorder) RequestBuildBlock ¶ added in v1.1.11
func (mr *MockMempoolMockRecorder) RequestBuildBlock(arg0 any) *gomock.Call
RequestBuildBlock indicates an expected call of RequestBuildBlock.