mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
fsm: add event context to notification struct
This commit is contained in:
parent
0ab40fe5d0
commit
93413ffbbb
1 changed files with 3 additions and 0 deletions
|
|
@ -76,6 +76,8 @@ type Notification struct {
|
|||
NextState StateType
|
||||
// Event is the event that was processed.
|
||||
Event EventType
|
||||
// EventContext is the event context that was processed.
|
||||
EventContext EventContext
|
||||
// LastActionError is the error returned by the last action executed.
|
||||
LastActionError error
|
||||
}
|
||||
|
|
@ -222,6 +224,7 @@ func (s *StateMachine) SendEvent(event EventType, eventCtx EventContext) error {
|
|||
PreviousState: s.previous,
|
||||
NextState: s.current,
|
||||
Event: event,
|
||||
EventContext: eventCtx,
|
||||
LastActionError: s.LastActionError,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue