lnwallet/chancloser: enforce pubkey binding for msg mapper

This commit is contained in:
Olaoluwa Osuntokun committed 2025-03-18 11:44:20 -05:00
1 parent ed8a672bd3
commit b2794b07cb
4 files changed
+22 -13

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ package protofsm
import (
"github.com/lightningnetwork/lnd/fn/v2"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/msgmux"
)
// MsgMapper is used to map incoming wire messages into a FSM event. This is
@@ -11,5 +11,5 @@ import (
type MsgMapper[Event any] interface {
// MapMsg maps a wire message into a FSM event. If the message is not
// mappable, then an None is returned.
MapMsg(msg lnwire.Message) fn.Option[Event]
MapMsg(msg msgmux.PeerMsg) fn.Option[Event]
}
+1 -1
View File
@@ -406,7 +406,7 @@ type dummyMsgMapper struct {
mock.Mock
}
func (d *dummyMsgMapper) MapMsg(wireMsg lnwire.Message) fn.Option[dummyEvents] {
func (d *dummyMsgMapper) MapMsg(wireMsg msgmux.PeerMsg) fn.Option[dummyEvents] {
args := d.Called(wireMsg)
//nolint:forcetypeassert