mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-26 21:51:27 +02:00
protofsm: add a Name() method to the env
This'll be used later to uniquely identify state machines for routing/dispatch purposes.
This commit is contained in:
@@ -220,6 +220,11 @@ func (s *StateMachine[Event, Env]) CanHandle(msg lnwire.Message) bool {
|
||||
})
|
||||
}
|
||||
|
||||
// Name returns the name of the state machine's environment.
|
||||
func (s *StateMachine[Event, Env]) Name() string {
|
||||
return s.cfg.Env.Name()
|
||||
}
|
||||
|
||||
// SendMessage attempts to send a wire message to the state machine. If the
|
||||
// message can be mapped using the default message mapper, then true is
|
||||
// returned indicating that the message was processed. Otherwise, false is
|
||||
|
Reference in New Issue
Block a user