htlcswitch tests: add mockTicker struct

This commit is contained in:
Johan T. Halseth 2018-01-30 18:53:39 -05:00
parent 9b7b3fa3b6
commit cc050f183f
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -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() {
}