Skip to content

Make funding_transaction_generated take a ChannelId by value #3214

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
Aug 12, 2024

Conversation

TheBlueMatt
Copy link
Collaborator

ChannelId is just a 32-byte array, so there's not a lot of value in passing it by reference to funding_transaction_generated, which we fix here.

This is also nice for bindings as languages like Java can better analyze whether the ChannelManager ends up with a reference to the ChannelId.

@TheBlueMatt TheBlueMatt force-pushed the 2024-07-chan-by-val branch 2 times, most recently from a2ea38d to 110a1e9 Compare August 1, 2024 16:49
@valentinewallace
Copy link
Contributor

CI is sad. LGTM otherwise.

@TheBlueMatt TheBlueMatt force-pushed the 2024-07-chan-by-val branch from 110a1e9 to 003b8ee Compare August 1, 2024 17:04
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.75%. Comparing base (8c1b3d1) to head (1ff2495).

Files Patch % Lines
lightning/src/ln/channelmanager.rs 92.30% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3214   +/-   ##
=======================================
  Coverage   89.75%   89.75%           
=======================================
  Files         122      122           
  Lines      101791   101791           
  Branches   101791   101791           
=======================================
+ Hits        91360    91366    +6     
+ Misses       7748     7745    -3     
+ Partials     2683     2680    -3     

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

@valentinewallace
Copy link
Contributor

Fuzz is failing

@vincenzopalazzo
Copy link
Contributor

Outside of the call convention change looks like that we need also #3216 to make the build happy

See error: package tokio v1.39.2 cannot be built because it requires rustc 1.70 or newer, while the currently active rustc version is 1.63.0

@TheBlueMatt TheBlueMatt force-pushed the 2024-07-chan-by-val branch from 003b8ee to 88b4d42 Compare August 4, 2024 17:52
`ChannelId` is just a 32-byte array, so there's not a lot of value
in passing it by reference to `funding_transaction_generated`,
which we fix here.

This is also nice for bindings as languages like Java can better
analyze whether the `ChannelManager` ends up with a reference to
the `ChannelId`.
@TheBlueMatt TheBlueMatt force-pushed the 2024-07-chan-by-val branch from 88b4d42 to 1ff2495 Compare August 4, 2024 18:16
@TheBlueMatt
Copy link
Collaborator Author

The fuzz test failures are just a (very extended) CI outage. Landing as the change is trivial, even if the patch isn't tiny.

@TheBlueMatt TheBlueMatt merged commit 4950f3c into lightningdevkit:main Aug 12, 2024
13 of 19 checks passed
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.

3 participants