Skip to content

Added encoding and decoding tests for BigSize #2078

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
merged 1 commit into from
Mar 8, 2023

Conversation

AdvaitPote
Copy link
Contributor

Fixes #2051

Tests have been added for the test vectors here for both Encoding and Decoding Parts.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheBlueMatt
Copy link
Collaborator

Please squash the commits down into one, otherwise LGTM.

@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2023

Codecov Report

Patch coverage: 94.73% and no project coverage change

Comparison is base (c5cc1ed) 91.14% compared to head (c13dca9) 91.14%.

❗ Current head c13dca9 differs from pull request most recent head c593383. Consider uploading reports for the commit c593383 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2078   +/-   ##
=======================================
  Coverage   91.14%   91.14%           
=======================================
  Files         101      101           
  Lines       48851    48874   +23     
  Branches    48851    48874   +23     
=======================================
+ Hits        44523    44547   +24     
+ Misses       4328     4327    -1     
Impacted Files Coverage Δ
lightning-block-sync/src/poll.rs 85.02% <50.00%> (ø)
lightning-invoice/src/lib.rs 80.59% <68.42%> (-0.03%) ⬇️
lightning-background-processor/src/lib.rs 78.29% <100.00%> (-0.13%) ⬇️
lightning-block-sync/src/init.rs 92.57% <100.00%> (ø)
lightning-block-sync/src/lib.rs 93.76% <100.00%> (ø)
lightning-block-sync/src/test_utils.rs 92.81% <100.00%> (ø)
lightning-invoice/src/de.rs 75.95% <100.00%> (-0.07%) ⬇️
lightning-invoice/src/payment.rs 80.76% <100.00%> (+0.76%) ⬆️
lightning-invoice/src/ser.rs 91.59% <100.00%> (ø)
lightning-invoice/src/utils.rs 96.90% <100.00%> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AdvaitPote
Copy link
Contributor Author

Apologies for the initial mixup. There was a bit of a confusion. I had accidentally picked some commits in my branch. I have dropped them and It's sorted now!

TheBlueMatt
TheBlueMatt previously approved these changes Mar 7, 2023
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Doesn't bother to correct that these match the upstream test case but either way it's fine.

@AdvaitPote
Copy link
Contributor Author

Thank you
Should I go ahead with the proposed changes now @TheBlueMatt @wpaulino

@TheBlueMatt
Copy link
Collaborator

Yes, please address wilmer's feedback. For a simple PR like this feel free to just squash the fixups as you go rather than adding new commits.

removed unnecessary debugging line

using io::Cursor in place of the std one

encoding/decoding tests added for BigSize

made the code concise

encoding/decoding tests added for BigSize
@TheBlueMatt TheBlueMatt merged commit dd11cae into lightningdevkit:main Mar 8, 2023
@AdvaitPote AdvaitPote deleted the bigsize_tests branch March 14, 2023 04:15
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.

Encoding/decoding test vectors for BigSize
4 participants