forked from lightningdevkit/rust-lightning
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assert
peer_{dis,}connected
consistency across test handlers
This adds a `ConnectionTracker` test util which is used across `TestChannelMessageHandler`, `TestRoutingMessageHandler` and `TestCustomMessageHandler`, asserting that `peer_connected` and `peer_disconnected` methods are well-ordered. This expands test coverage from just `TestChannelMessageHandler` to cover all test handlers and adds some useful features which we'll use to test the fix in the next commit. This also adds an additional test which tests `peer_{dis,}connected` consistency when a handler refuses a connection by returning an `Err` from `peer_connected`.
- Loading branch information
1 parent
07148db
commit 4bc597a
Showing
2 changed files
with
134 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters