TxsAvailable tests

This commit is contained in:
Ethan Buchman
2017-07-28 22:11:45 -04:00
parent 124032e3e9
commit 678a9a2e42
4 changed files with 132 additions and 24 deletions
+2
View File
@@ -25,6 +25,7 @@ type Mempool interface {
Flush()
TxsAvailable() chan struct{}
FireOnTxsAvailable()
}
type MockMempool struct {
@@ -38,6 +39,7 @@ func (m MockMempool) Reap(n int) Txs { return Txs{
func (m MockMempool) Update(height int, txs Txs) {}
func (m MockMempool) Flush() {}
func (m MockMempool) TxsAvailable() chan struct{} { return make(chan struct{}) }
func (m MockMempool) FireOnTxsAvailable() {}
//------------------------------------------------------
// blockstore