Skip to content
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

Merged
merged 2 commits into from
Dec 21, 2022
Merged

Add PeerReadyNotifier actor #2464

merged 2 commits into from
Dec 21, 2022

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Oct 24, 2022

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.

@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2022

Codecov Report

Merging #2464 (ffd49aa) into master (37a3911) will decrease coverage by 0.09%.
The diff coverage is 73.25%.

@@            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     
Impacted Files Coverage Δ
...n/scala/fr/acinq/eclair/json/JsonSerializers.scala 95.12% <ø> (ø)
...n/scala/fr/acinq/eclair/io/PeerReadyNotifier.scala 72.28% <72.28%> (ø)
...c/main/scala/fr/acinq/eclair/io/MessageRelay.scala 96.00% <100.00%> (ø)
...-core/src/main/scala/fr/acinq/eclair/io/Peer.scala 89.47% <100.00%> (ø)
...ala/fr/acinq/eclair/balance/ChannelsListener.scala 93.10% <0.00%> (-3.45%) ⬇️
...air-core/src/main/scala/fr/acinq/eclair/Logs.scala 83.33% <0.00%> (-3.34%) ⬇️
...q/eclair/channel/publish/ReplaceableTxFunder.scala 85.18% <0.00%> (-3.09%) ⬇️
...cala/fr/acinq/eclair/payment/relay/NodeRelay.scala 96.55% <0.00%> (-1.38%) ⬇️
...in/scala/fr/acinq/eclair/channel/fsm/Channel.scala 86.16% <0.00%> (-0.12%) ⬇️
...fr/acinq/eclair/channel/InteractiveTxBuilder.scala 85.38% <0.00%> (ø)
... and 2 more

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.
@t-bast
Copy link
Member Author

t-bast commented Nov 22, 2022

@remyers I updated the PR to allow ommitting the timeout if you want to rebase #2491

@t-bast t-bast marked this pull request as ready for review December 2, 2022 12:55
@t-bast t-bast requested review from pm47 and remyers December 2, 2022 12:55
Copy link
Contributor

@remyers remyers left a 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.

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.
Copy link
Contributor

@remyers remyers left a 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.

@t-bast t-bast merged commit c2eb357 into master Dec 21, 2022
@t-bast t-bast deleted the peer-ready-notifier branch December 21, 2022 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants