Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement interactive tx construction protocol via `InteractiveTxCons…
…tructor` This implements the interactive construction protocol described at https://github.com/lightning/bolts/blob/78e5a6b066d3a8e235931dfc06aa325337874749/02-peer-protocol.md?plain=1#L92. Our implementation includes a state machine with typed states and transitions to ensure consumers have compile-time assurances that the protocol is upheld. States are tracked as in the `StateMachine` enum and can take on all possible states during the negotiation. The states are further divided into two categories, namely by the two traits they implement, either `ReceivedMsgState` or `SentMsgState`. The defined `StateTransitions` enforce the transitions that `ReceivedMsgState`, `SentMsgState`, and the `_TxComplete`s can go through. Co-authored-by: Wilmer Paulino <[email protected]> Co-authored-by: Duncan Dean <[email protected]> Co-authored-by: Jurvis Tan <[email protected]>
- Loading branch information