Skip to content

Make expect_payment_failed_conditions a function #1496

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

This reduces macro generated code in tests a good bit, and moves us
one step further away from using macros everywhere when we don't
need to.

Did this in an earlier version of #1495 but didn't need it, figured it was still worth upstreaming.

@codecov-commenter
Copy link

codecov-commenter commented May 25, 2022

Codecov Report

Merging #1496 (4671a08) into main (8e5cf75) will increase coverage by 0.60%.
The diff coverage is 93.54%.

❗ Current head 4671a08 differs from pull request most recent head 70acdf9. Consider uploading reports for the commit 70acdf9 to get more accurate results

@@            Coverage Diff             @@
##             main    #1496      +/-   ##
==========================================
+ Coverage   90.93%   91.53%   +0.60%     
==========================================
  Files          80       80              
  Lines       43386    48432    +5046     
  Branches    43386    48432    +5046     
==========================================
+ Hits        39451    44331    +4880     
- Misses       3935     4101     +166     
Impacted Files Coverage Δ
lightning/src/ln/functional_test_utils.rs 96.08% <91.30%> (+0.66%) ⬆️
lightning/src/ln/functional_tests.rs 97.34% <100.00%> (+0.11%) ⬆️
lightning/src/ln/onion_route_tests.rs 97.51% <100.00%> (ø)
lightning/src/ln/payment_tests.rs 99.24% <100.00%> (-0.01%) ⬇️
lightning/src/ln/priv_short_conf_tests.rs 96.60% <100.00%> (ø)
lightning/src/util/events.rs 40.18% <0.00%> (-1.81%) ⬇️
lightning/src/chain/onchaintx.rs 93.98% <0.00%> (-0.93%) ⬇️
lightning/src/ln/reorg_tests.rs 100.00% <0.00%> (ø)
... and 12 more

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 8e5cf75...70acdf9. Read the comment docs.

arik-so
arik-so previously approved these changes May 27, 2022
Copy link
Contributor

@arik-so arik-so left a comment

Choose a reason for hiding this comment

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

go, go, go, go, go!

@tnull
Copy link
Contributor

tnull commented Jun 6, 2022

Needs a rebase it seems, other than that LGTM!

@TheBlueMatt TheBlueMatt force-pushed the 2022-05-macro-function-bonus branch from bdcf9e0 to cdaa0fd Compare June 6, 2022 17:26
@TheBlueMatt
Copy link
Collaborator Author

Rebased and fixed a nonsense variable name introduced when this commit wasn't intended for upstream.

@TheBlueMatt TheBlueMatt force-pushed the 2022-05-macro-function-bonus branch from 8e2b93f to 4671a08 Compare June 7, 2022 10:28
@tnull
Copy link
Contributor

tnull commented Jun 7, 2022

LGTM, feel free to squash to fix the failing check_commits test.

This reduces macro generated code in tests a good bit, and moves us
one step further away from using macros everywhere when we don't
need to.
@TheBlueMatt TheBlueMatt force-pushed the 2022-05-macro-function-bonus branch from 4671a08 to 70acdf9 Compare June 9, 2022 11:35
@TheBlueMatt
Copy link
Collaborator Author

Squashed without changes, should be good to go:

$ git diff-tree -U5 4671a088 70acdf93
$

@arik-so arik-so merged commit 22dc964 into lightningdevkit:main Jun 9, 2022
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.

5 participants