-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PeerReadyNotifier
actor
#2464
Conversation
4048d86
to
ea3f097
Compare
Codecov Report
@@ Coverage Diff @@
## master #2464 +/- ##
==========================================
- Coverage 84.99% 84.89% -0.10%
==========================================
Files 199 200 +1
Lines 15801 15884 +83
Branches 666 681 +15
==========================================
+ Hits 13430 13485 +55
- Misses 2371 2399 +28
|
We add an actor that waits for a given peer to be connected and ready to process payments. This is useful in the context of async payments for the receiver's LSP.
ea3f097
to
ffd49aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Straight forward and easy to understand.
I had a question about the waitForChannelsReady
state possibly spawning actors and one about async-payments
.
eclair-core/src/main/scala/fr/acinq/eclair/io/PeerReadyNotifier.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/test/scala/fr/acinq/eclair/io/PeerReadyNotifierSpec.scala
Show resolved
Hide resolved
If the peer disconnects while we're waiting for channel states, we should go back to wiating for them to connect. We also should avoid creating too many channel state collectors, we only need to keep the last one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! looking forward to rebasing async-payments onto it.
We add an actor that waits for a given peer to be connected and ready to process payments.
This is useful in the context of async payments for the receiver's LSP.
@remyers you can start building the mechanism to trigger a pending async payment on top of that branch.