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

Make Setup.datadir a val #1837

Merged
merged 1 commit into from
Jun 7, 2021
Merged

Make Setup.datadir a val #1837

merged 1 commit into from
Jun 7, 2021

Conversation

akumaigorodski
Copy link
Contributor

This will allow plugins to know where the Eclair datadir is and look for their files in that dir. Fixes #1830

@codecov-commenter
Copy link

Codecov Report

Merging #1837 (56d9124) into master (dbecb28) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1837   +/-   ##
=======================================
  Coverage   89.38%   89.39%           
=======================================
  Files         145      145           
  Lines       10980    10980           
  Branches      442      442           
=======================================
+ Hits         9815     9816    +1     
+ Misses       1165     1164    -1     
Impacted Files Coverage Δ
...ir-core/src/main/scala/fr/acinq/eclair/Setup.scala 80.35% <ø> (ø)
...cala/fr/acinq/eclair/payment/relay/NodeRelay.scala 96.09% <0.00%> (-1.57%) ⬇️
...main/scala/fr/acinq/eclair/io/PeerConnection.scala 84.68% <0.00%> (-0.43%) ⬇️
...c/main/scala/fr/acinq/eclair/channel/Channel.scala 86.35% <0.00%> (+0.16%) ⬆️
...in/scala/fr/acinq/eclair/channel/TxPublisher.scala 98.21% <0.00%> (+1.19%) ⬆️

Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this changes anything?
It seems to me that the existing code already makes it a val.

@akumaigorodski
Copy link
Contributor Author

Setup is not a case class where all constructor parameters are vals by default, without adding a val explicitly datadir is not visible outside of Setup.

@t-bast
Copy link
Member

t-bast commented Jun 7, 2021

So it's for visibility, not immutability.
I thought it was to ensure that internally setup couldn't mutate that datadir.
For visibility that makes sense, LGTM.

@t-bast t-bast merged commit 2b6d564 into ACINQ:master Jun 7, 2021
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.

Location of plugin-resources
3 participants