-
Notifications
You must be signed in to change notification settings - Fork 69
[nemesis-generator]: fix issues with nemesis tests failing #397
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
Conversation
problem: couple nemesis tests with new nemesis generated
1. test expects the previous block hash to be zeros
2. block verify was failing due using unsigned transactions
solution: update the generator
1. use zero hash for the previous block hash
2. use signed transactions when creating the block signature.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #397 +/- ##
===========================================
+ Coverage 97.88% 100.00% +2.11%
===========================================
Files 17 3 -14
Lines 379 218 -161
Branches 36 0 -36
===========================================
- Hits 371 218 -153
+ Misses 8 0 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| writer.write_int(Hash256.SIZE + 4, 4) # needed to deserialize the previous block hash object | ||
| writer.write_int(Hash256.SIZE, 4) | ||
| writer.write_bytes(self.generation_hash.bytes) | ||
| previous_block_hash = Hash256.zero() |
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.
would move this to init
Jaguar0625
left a comment
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.
👍
AnthonyLaw
left a comment
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.
👍🏼
problem: couple nemesis tests with new nemesis generated
1. test expects the previous block hash to be zeros
2. block verify was failing due using unsigned transactions
solution: update the generator
1. use zero hash for the previous block hash
2. use signed transactions when creating the block signature.