lnwallet/chancloser: enforce pubkey binding for msg mapper

This commit is contained in:
Olaoluwa Osuntokun
2025-02-07 18:10:45 -08:00
parent ed8a672bd3
commit b2794b07cb
4 changed files with 22 additions and 13 deletions

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]
}

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