TxsAvailable tests

This commit is contained in:
Ethan Buchman
2017-07-13 15:03:19 -04:00
parent 124032e3e9
commit 678a9a2e42
4 changed files with 132 additions and 24 deletions

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