-
Notifications
You must be signed in to change notification settings - Fork 412
[Ready for Review] Add msgs serialization tests #292
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
[Ready for Review] Add msgs serialization tests #292
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. If you're gonna add round-trip serialization tests, why not test all the messages? Also, the fuzz tests probably have reasonable coverage for round-trips, why not test some expected encoded values ala the other tests in msgs?.
src/ln/msgs.rs
Outdated
use secp256k1::{Secp256k1, Message}; | ||
|
||
use rand::{Rng, thread_rng}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra \n.
src/ln/msgs.rs
Outdated
|
||
#[test] | ||
fn test_serialization_bolt7_msgs() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra \n.
b9f69f1
to
149821f
Compare
WIP, more in the way of already there encoding_announcement_signatures |
eaa82a2
to
282dac8
Compare
Rebased |
0272dcd
to
931d8b0
Compare
Good, tests for the 23 types of messages (bolt7 query-thing messages except) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Its probably a bit overkill but it should get us there on coverage.
931d8b0
to
c5d730b
Compare
Hmm seems fail is due to travis issue, thread exists forcefully and first time I see these warnings : "Your glibc version:'2.19' will most likely result in malloc()-related deadlocks. Min. version 2.24 (Or, Ubuntu's 2.23-0ubuntu6) suggested. See https://sourceware.org/bugzilla/show_bug.cgi?id=19431 for explanation. Using clone() instead of fork()" ? |
No description provided.