htlcswitch tests: add mockTicker struct

This commit is contained in:
Johan T. Halseth committed 2018-02-02 21:16:37 -05:00
1 parent 9b7b3fa3b6
commit cc050f183f
1 file changed
+12
+12
View File
@@ -6,6 +6,7 @@ import (
"fmt"
"sync"
"testing"
"time"
"io"
"sync/atomic"
@@ -617,3 +618,14 @@ func (m *mockNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint) (*chainntnfs.S
Spend: make(chan *chainntnfs.SpendDetail),
}, nil
}
type mockTicker struct {
ticker <-chan time.Time
}
func (m *mockTicker) Start() <-chan time.Time {
return m.ticker
}
func (m *mockTicker) Stop() {
}