mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
htlcswitch tests: add mockTicker struct
This commit is contained in:
parent
9b7b3fa3b6
commit
cc050f183f
1 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue