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

Fix monitor version parsing #763

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Fix monitor version parsing #763

merged 1 commit into from
Sep 19, 2023

Conversation

benthecarman
Copy link
Collaborator

@benthecarman benthecarman commented Sep 19, 2023

Previous we were parsing the version number wrong, we had been parsing one of the version bytes as part of update_id bytes. This fixes it and adds an debug_assert to test it in any debug build.

Fixes #721

@benthecarman benthecarman added bug Something isn't working LDK labels Sep 19, 2023
@TonyGiorgio
Copy link
Contributor

Is this testable at all?

@benthecarman
Copy link
Collaborator Author

benthecarman commented Sep 19, 2023

The debug_asserts will in a in a debug build. Can add unit tests as well.

We had some tests already, just with fake data. We can add ones with real world data, that'd be better.

@benthecarman
Copy link
Collaborator Author

Okay tests now use real monitors from a signet node I made

@TonyGiorgio TonyGiorgio merged commit 29bb34c into master Sep 19, 2023
9 checks passed
@TonyGiorgio TonyGiorgio deleted the fix-monitor-parsing branch September 19, 2023 16:38
@benthecarman benthecarman mentioned this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error reading from storage when local channel monitor is stale
2 participants