-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Handle import failures in test_importRawBlock #5647
Conversation
fbac83d
to
75cc789
Compare
Codecov Report
@@ Coverage Diff @@
## master #5647 +/- ##
==========================================
+ Coverage 62.74% 62.78% +0.04%
==========================================
Files 348 348
Lines 29689 29709 +20
Branches 3345 3346 +1
==========================================
+ Hits 18627 18654 +27
+ Misses 9846 9841 -5
+ Partials 1216 1214 -2 |
@@ -729,7 +729,33 @@ BOOST_AUTO_TEST_CASE(test_importRawBlock) | |||
Json::Value ret; | |||
Json::Reader().parse(c_genesisConfigString, ret); | |||
rpcClient->test_setChainParams(ret); | |||
|
|||
string blockHash = rpcClient->test_importRawBlock( |
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.
This test actually failed to import the block (difficulty was wrong in that block after changing difficulty rules for NoProof), but test_importRawBlock
didn't report it.
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.
difficulty rules are still checked for NoProof.
nonce and mixHash are not checked.
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.
difficulty rules are still checked for NoProof.
that's the reason why this test worked incorrectly (block was invalid, I guess you created it when there were no difficulty check in NoProof yet)
I changed it now to have correct difficulty.
f9092c7
to
0473839
Compare
Fixes #5646