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

Fixing the CLN feature bit parsing #209

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

bjohnson5
Copy link
Collaborator

Resolves Issue #208 by flipping the feature bits before parsing them.

@bjohnson5 bjohnson5 requested a review from carlaKC December 3, 2024 16:53
Comment on lines 91 to 92
features.node.reverse();
NodeFeatures::from_le_bytes(features.node)
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to use NodeFeatures::from_be_bytes if I'm not mistaken. I PRd a change to make that public on LDK a while ago but it looks like we forgot to apply the changes downstream

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah even better. I will switch both calls to use from_be_bytes. Thanks!

@bjohnson5 bjohnson5 force-pushed the 208-feature-bits-fix branch from b696eff to 5f802c9 Compare December 6, 2024 19:32
@bjohnson5 bjohnson5 requested a review from sr-gi December 6, 2024 19:40
Copy link
Contributor

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

utACK

@carlaKC carlaKC merged commit 8834888 into bitcoin-dev-project:main Dec 18, 2024
2 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