peer: update rbf close client logic w/ error and iteration awareness
We'll properly handle a protocol error due to user input by halting, and sending the error back to the user. When a user goes to issue a new update, based on which state we're in, we'll either kick off the shutdown, or attempt a new offer. This matches the new spec update where we'll only send `Shutdown` once per connection.
This commit is contained in:
1 parent
fbc67f7610
commit
80b48fb49b
2 files changed
+141
-63
No files matched your search
@@ -959,3 +959,7 @@ type RbfState = protofsm.State[ProtocolEvent, *Environment]
|
||||
|
||||
// RbfEvent is a type alias for the event type of the RBF channel closer.
|
||||
type RbfEvent = protofsm.EmittedEvent[ProtocolEvent]
|
||||
|
||||
// RbfStateSub is a type alias for the state subscription type of the RBF chan
|
||||
// closer.
|
||||
type RbfStateSub = protofsm.StateSubscriber[ProtocolEvent, *Environment]
|
||||
Reference in new issue
Block a user