-
Notifications
You must be signed in to change notification settings - Fork 667
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: Use VRFProof::consensus_serialize()
#4121
Conversation
660ba77
to
0b89af1
Compare
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.
LGTM. Just make sure that the codec tests for the Nakamoto-flavored coinbase continue to work.
Can you add a test with an explicit test vector? let test_vector = "013fab..";
assert_eq!(&to_hex(&payload.serialize_to_vec(), test_vector); |
VRFProof::consensus_deserialize()
VRFProof::consensus_serialize()
I ran the tests related to the NakamotoCoinbase tx and they are failing:
From the output, I see the created tx doesn't have this bytes sequence
|
There's already 3 tests that serialize/deserialize this struct:
This number is the length prefix for a vector, and since |
b76e351
to
396b34b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #4121 +/- ##
==========================================
- Coverage 72.02% 72.01% -0.01%
==========================================
Files 421 421
Lines 298095 298095
==========================================
- Hits 214700 214683 -17
- Misses 83395 83412 +17 ☔ View full report in Codecov by Sentry. |
Description
Use
VRFProof::consensus_serialize()
to serialize it rather than.to_bytes.to_vec()
Applicable issues