Skip to content

Add PeerReadyNotifier actor - #2464

Merged
t-bast merged 2 commits into
masterfrom
peer-ready-notifier
Dec 21, 2022
Merged

t-bast merged 2 commits into
masterfrom
peer-ready-notifier

Conversation

@t-bast

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

Copy link
Copy Markdown
Member

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.

@t-bast
t-bast force-pushed the peer-ready-notifier branch from 4048d86 to ea3f097 Compare October 24, 2022 08:21
@codecov-commenter

codecov-commenter commented Oct 24, 2022

Copy link
Copy Markdown

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
t-bast force-pushed the peer-ready-notifier branch from ea3f097 to ffd49aa Compare November 22, 2022 16:16
@t-bast

t-bast commented Nov 22, 2022

Copy link
Copy Markdown
Member Author

@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

@remyers remyers left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread eclair-core/src/main/scala/fr/acinq/eclair/io/PeerReadyNotifier.scala Outdated
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.

@remyers remyers left a comment

Copy link
Copy Markdown
Contributor

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