Skip to content

Score channels on payment (WIP) #625

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

Conversation

sourabhmarathe
Copy link
Contributor

No description provided.

sourabhmarathe and others added 4 commits May 18, 2020 17:07
This caused a bunch of cascading changes, including
passing loggers down to Channels in function calls
rather than having each Channel have a pointer to the
ChannelManager's Logger (which was a circular reference).
Other structs that the Channel had passed its Logger to also
had their loggers removed. Other newly unused Loggers were
also removed, especially when keeping them would've caused
a bunch of extra test changes to be necessary, e.g. with
the ChainWatchInterfaceUtil's Logger.
Also adds a test for de/serializing events
Add fn signature for scoring payment
@codecov
Copy link

codecov bot commented May 18, 2020

Codecov Report

Merging #625 into master will decrease coverage by 0.05%.
The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #625      +/-   ##
==========================================
- Coverage   91.29%   91.23%   -0.06%     
==========================================
  Files          35       35              
  Lines       20776    20792      +16     
==========================================
+ Hits        18967    18970       +3     
- Misses       1809     1822      +13     
Impacted Files Coverage Δ
lightning/src/routing/network_graph.rs 91.47% <84.21%> (-0.14%) ⬇️
lightning/src/ln/functional_tests.rs 97.12% <0.00%> (-0.20%) ⬇️
lightning/src/ln/reorg_tests.rs 98.94% <0.00%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4ad57b...464ade8. Read the comment docs.

@TheBlueMatt
Copy link
Collaborator

Looks like the current diff here includes a revert of #622?

@moneyball
Copy link
Contributor

Cool! I just skimmed through the code, but I am curious if this scoring would be backed up in case the node restarts? I see in a comment the scoring data is stored in DirectionalChannelInfo ... is that data already included in a backup?

@sourabhmarathe sourabhmarathe force-pushed the score-channels-on-payment branch from 700d8c8 to 20e3d70 Compare May 19, 2020 01:45
Also adds a test for de/serializing events
@sourabhmarathe
Copy link
Contributor Author

Looks like the current diff here includes a revert of #622?

Yes, it does. I think something went wrong with the timing of my the commits I had. I'm going to recreate this branch somewhere else and redo opening this draft PR in another location.

@sourabhmarathe
Copy link
Contributor Author

Cool! I just skimmed through the code, but I am curious if this scoring would be backed up in case the node restarts? I see in a comment the scoring data is stored in DirectionalChannelInfo ... is that data already included in a backup?

I think because DirectionalChannelInfo implements serialization, it would make sense to do so for ChannelScore as well. I did implement the Readable and Writeable traits for ChannelScore, but there might be more that is needed to make the struct serializable.

@sourabhmarathe sourabhmarathe deleted the score-channels-on-payment branch May 19, 2020 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants