Skip to content

Use Default::default() to construct () as a test scoring param #2590

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

In bindings, we can't use unbounded generic types, and thus have to rip out the ScoreParams and replace them with static ProbabilisticScoringFeeParams universally. To make this easier, using Default::default() everywhere allows the type to change out from under the test without the test needing to change.

In bindings, we can't use unbounded generic types, and thus have to
rip out the `ScoreParams` and replace them with static
`ProbabilisticScoringFeeParams` universally. To make this easier,
using `Default::default()` everywhere allows the type to change out
from under the test without the test needing to change.
@TheBlueMatt TheBlueMatt added this to the 0.0.117 milestone Sep 21, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 99.16% and project coverage change: -0.03% ⚠️

Comparison is base (f2fe95e) 88.83% compared to head (6b0d94a) 88.81%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2590      +/-   ##
==========================================
- Coverage   88.83%   88.81%   -0.03%     
==========================================
  Files         113      113              
  Lines       84534    84534              
  Branches    84534    84534              
==========================================
- Hits        75097    75076      -21     
- Misses       7210     7222      +12     
- Partials     2227     2236       +9     
Files Changed Coverage Δ
lightning/src/ln/onion_route_tests.rs 97.51% <ø> (ø)
lightning/src/ln/functional_test_utils.rs 91.16% <50.00%> (ø)
lightning/src/ln/channelmanager.rs 81.14% <100.00%> (ø)
lightning/src/ln/functional_tests.rs 97.21% <100.00%> (ø)
lightning/src/ln/payment_tests.rs 98.04% <100.00%> (+0.02%) ⬆️
lightning/src/ln/shutdown_tests.rs 96.60% <100.00%> (ø)
lightning/src/routing/router.rs 93.62% <100.00%> (ø)

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TheBlueMatt TheBlueMatt merged commit c91debb into lightningdevkit:main Sep 21, 2023
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