htlcswitch: add set of tests for the forwarding log
This commit is contained in:
4 files changed
+210
-14
No files matched your search
+12
-7
@@ -82,6 +82,7 @@ var _ lnwallet.FeeEstimator = (*mockFeeEstimator)(nil)
|
||||
|
||||
type mockForwardingLog struct {
|
||||
sync.Mutex
|
||||
|
||||
events map[time.Time]channeldb.ForwardingEvent
|
||||
}
|
||||
|
||||
@@ -124,13 +125,17 @@ func newMockServer(t testing.TB, name string) *mockServer {
|
||||
copy(id[:], h[:])
|
||||
|
||||
return &mockServer{
|
||||
t: t,
|
||||
id: id,
|
||||
name: name,
|
||||
messages: make(chan lnwire.Message, 3000),
|
||||
quit: make(chan struct{}),
|
||||
registry: newMockRegistry(),
|
||||
htlcSwitch: New(Config{}),
|
||||
t: t,
|
||||
id: id,
|
||||
name: name,
|
||||
messages: make(chan lnwire.Message, 3000),
|
||||
quit: make(chan struct{}),
|
||||
registry: newMockRegistry(),
|
||||
htlcSwitch: New(Config{
|
||||
FwdingLog: &mockForwardingLog{
|
||||
events: make(map[time.Time]channeldb.ForwardingEvent),
|
||||
},
|
||||
}),
|
||||
interceptorFuncs: make([]messageInterceptor, 0),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user