mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 07:00:55 +02:00
msgmux: fix arg expectation for mock in unit test
This commit is contained in:
2
log.go
2
log.go
@@ -44,6 +44,7 @@ import (
|
|||||||
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
|
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet/rpcwallet"
|
"github.com/lightningnetwork/lnd/lnwallet/rpcwallet"
|
||||||
"github.com/lightningnetwork/lnd/monitoring"
|
"github.com/lightningnetwork/lnd/monitoring"
|
||||||
|
"github.com/lightningnetwork/lnd/msgmux"
|
||||||
"github.com/lightningnetwork/lnd/netann"
|
"github.com/lightningnetwork/lnd/netann"
|
||||||
"github.com/lightningnetwork/lnd/peer"
|
"github.com/lightningnetwork/lnd/peer"
|
||||||
"github.com/lightningnetwork/lnd/peernotifier"
|
"github.com/lightningnetwork/lnd/peernotifier"
|
||||||
@@ -202,6 +203,7 @@ func SetupLoggers(root *build.SubLoggerManager, interceptor signal.Interceptor)
|
|||||||
)
|
)
|
||||||
AddV1SubLogger(root, graphdb.Subsystem, interceptor, graphdb.UseLogger)
|
AddV1SubLogger(root, graphdb.Subsystem, interceptor, graphdb.UseLogger)
|
||||||
AddSubLogger(root, chainio.Subsystem, interceptor, chainio.UseLogger)
|
AddSubLogger(root, chainio.Subsystem, interceptor, chainio.UseLogger)
|
||||||
|
AddSubLogger(root, msgmux.Subsystem, interceptor, msgmux.UseLogger)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddSubLogger is a helper method to conveniently create and register the
|
// AddSubLogger is a helper method to conveniently create and register the
|
||||||
|
@@ -244,7 +244,7 @@ func (p *MultiMsgRouter) msgRouter(ctx context.Context) {
|
|||||||
var err error
|
var err error
|
||||||
if !couldSend {
|
if !couldSend {
|
||||||
log.Tracef("MsgRouter: unable to route "+
|
log.Tracef("MsgRouter: unable to route "+
|
||||||
"msg %T", msg)
|
"msg %T", msg.Message)
|
||||||
|
|
||||||
err = ErrUnableToRouteMsg
|
err = ErrUnableToRouteMsg
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,7 @@ func (m *mockEndpoint) CanHandle(msg PeerMsg) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *mockEndpoint) SendMessage(ctx context.Context, msg PeerMsg) bool {
|
func (m *mockEndpoint) SendMessage(ctx context.Context, msg PeerMsg) bool {
|
||||||
args := m.Called(msg)
|
args := m.Called(ctx, msg)
|
||||||
|
|
||||||
return args.Bool(0)
|
return args.Bool(0)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user