Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ require (
pgregory.net/rapid v1.2.0
)

require github.com/lightningnetwork/lnd/actor v0.0.1-alpha

require (
dario.cat/mergo v1.0.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
Expand Down Expand Up @@ -213,6 +215,9 @@ replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
// allows us to specify that as an option.
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display

// Use the local actor module for development.
replace github.com/lightningnetwork/lnd/actor => ./actor

// If you change this please also update docs/INSTALL.md and GO_VERSION in
// Makefile (then run `make lint` to see where else it needs to be updated as
// well).
Expand Down
6 changes: 6 additions & 0 deletions protofsm/state_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ type EmittedEvent[Event any] struct {
// ExternalEvent is an optional external event that is to be sent to
// the daemon for dispatch. Usually, this is some form of I/O.
ExternalEvents DaemonEventSet

// Outbox is an optional set of events that are accumulated during event
// processing and returned to the caller for processing into the main
// state machine. This enables nested state machines to emit events that
// bubble up to their parent.
Outbox []Event
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Outbox events should be a new type, similiar to DaemonEvents

}

// StateTransition is a state transition type. It denotes the next state to go
Expand Down