Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

BlockChain unit tests improvements #4436

Merged
merged 2 commits into from Sep 1, 2017
Merged

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Aug 31, 2017

  1. New test for new method BlockChain::insertWithoutParent()

  2. Make BlockChain unit tests use chain parameters with NoProof seal engine, which makes them faster and more isolated by skipping full mining

Copy link
Member

@pirapira pirapira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@gumb0 gumb0 force-pushed the insert-without-parent-test branch from c4c3867 to b612e15 Compare August 31, 2017 14:46
Copy link
Contributor

@winsvega winsvega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So now we could do a unit test with 100 blocks for ease ?

@gumb0
Copy link
Member Author

gumb0 commented Aug 31, 2017

@winsvega Yes, I think it should be reasonably fast

@codecov-io
Copy link

codecov-io commented Aug 31, 2017

Codecov Report

Merging #4436 into develop will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4436      +/-   ##
===========================================
+ Coverage    68.29%   68.38%   +0.09%     
===========================================
  Files          305      306       +1     
  Lines        23406    23419      +13     
===========================================
+ Hits         15985    16015      +30     
+ Misses        7421     7404      -17
Impacted Files Coverage Δ
test/unittests/libethereum/Block.cpp 95.4% <ø> (-0.06%) ⬇️
libethashseal/GenesisInfo.cpp 72% <100%> (+1.16%) ⬆️
...ethashseal/genesis/test/mainNetworkNoProofTest.cpp 100% <100%> (ø)
test/tools/libtesteth/BlockChainHelper.h 94.73% <100%> (+1.4%) ⬆️
test/unittests/libethereum/BlockChain.cpp 78.72% <100%> (+3.5%) ⬆️
test/tools/libtesteth/BlockChainHelper.cpp 77.65% <0%> (+0.57%) ⬆️
libethereum/BlockChain.cpp 70.55% <0%> (+1.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5eee2d4...b612e15. Read the comment docs.

@chfast
Copy link
Collaborator

chfast commented Aug 31, 2017

Holy f*ck, how fast is it now? Thanks for finding this...

@gumb0 gumb0 merged commit 08ffd89 into develop Sep 1, 2017
@gumb0 gumb0 deleted the insert-without-parent-test branch September 1, 2017 08:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants