htlcswitch tests: add mockTicker struct
This commit is contained in:
parent
9b7b3fa3b6
commit
cc050f183f
@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"io"
|
"io"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
@ -617,3 +618,14 @@ func (m *mockNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint) (*chainntnfs.S
|
|||||||
Spend: make(chan *chainntnfs.SpendDetail),
|
Spend: make(chan *chainntnfs.SpendDetail),
|
||||||
}, nil
|
}, 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