Browse Source

change node#Mempool to return interface

pull/3524/head
Anton Kaliaev 6 years ago
parent
commit
00e9f2041f
No known key found for this signature in database GPG Key ID: 7B6881D965918214
2 changed files with 6 additions and 6 deletions
  1. +5
    -5
      mock/mempool.go
  2. +1
    -1
      node/node.go

+ 5
- 5
mock/mempool.go View File

@ -3,14 +3,14 @@ package mock
import (
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/clist"
"github.com/tendermint/tendermint/mempool"
mempl "github.com/tendermint/tendermint/mempool"
"github.com/tendermint/tendermint/types"
)
// Mempool is an empty implementation of a Mempool, useful for testing.
type Mempool struct{}
var _ mempool.Mempool = Mempool{}
var _ mempl.Mempool = Mempool{}
func (Mempool) Lock() {}
func (Mempool) Unlock() {}
@ -19,7 +19,7 @@ func (Mempool) CheckTx(_ types.Tx, _ func(*abci.Response)) error {
return nil
}
func (Mempool) CheckTxWithInfo(_ types.Tx, _ func(*abci.Response),
_ mempool.TxInfo) error {
_ mempl.TxInfo) error {
return nil
}
func (Mempool) ReapMaxBytesMaxGas(_, _ int64) types.Txs { return types.Txs{} }
@ -27,8 +27,8 @@ func (Mempool) ReapMaxTxs(n int) types.Txs { return types.Txs{} }
func (Mempool) Update(
_ int64,
_ types.Txs,
_ mempool.PreCheckFunc,
_ mempool.PostCheckFunc,
_ mempl.PreCheckFunc,
_ mempl.PostCheckFunc,
) error {
return nil
}


+ 1
- 1
node/node.go View File

@ -806,7 +806,7 @@ func (n *Node) MempoolReactor() *mempl.Reactor {
}
// Mempool returns the Node's mempool.
func (n *Node) Mempool() *mempl.CListMempool {
func (n *Node) Mempool() mempl.Mempool {
return n.mempool
}


Loading…
Cancel
Save