htlcswitch tests: add mockTicker struct
This commit is contained in:
parent
9b7b3fa3b6
commit
cc050f183f
@ -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() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user