This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Add event handlers for the things that can occur in the background during open, payment, and close.
Why
The agent receives messages from the other participant containing confirmations/responses to requests made by this recipient, and requests from the other participant. Some of these operations that take place in the background need to be made known to the application using the agent.
The agent will also monitor the state of the network for changes that require action, and once that logic is added we'll need to add events using the same pattern.
Close #226
Known Limitations
This change is somewhat limited because some of the change depends on ingestion having been integrated into the agent, but I'm deferring doing that integration until the integration and state changes have been finished in the state package. Because of that there are some TODOs, but I think it is worth merging this and revisiting it during the ingestion work.