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

BlockChain unit tests improvements #4436

Merged
merged 2 commits into from Sep 1, 2017

Conversation

Projects
None yet
6 participants
@gumb0
Member

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

@gumb0 gumb0 added needs review and removed in progress labels Aug 31, 2017

@gumb0 gumb0 requested review from pirapira, chfast and winsvega Aug 31, 2017

@pirapira

Looks good to me.

@winsvega

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

@gumb0

This comment has been minimized.

Show comment
Hide comment
@gumb0

gumb0 Aug 31, 2017

Member

@winsvega Yes, I think it should be reasonably fast

Member

gumb0 commented Aug 31, 2017

@winsvega Yes, I think it should be reasonably fast

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io 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.

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

This comment has been minimized.

Show comment
Hide comment
@chfast

chfast Aug 31, 2017

Collaborator

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

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

5 of 6 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
codecov/patch 100% of diff hit (target 50%)
Details
codecov/project 68.38% (+0.09%) compared to 5eee2d4
Details
codecov/project/app 63.05% (+0.06%) compared to 5eee2d4
Details
codecov/project/tests 78.19% (+0.12%) compared to 5eee2d4
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@chriseth chriseth removed the needs review label Sep 1, 2017

@gumb0 gumb0 deleted the insert-without-parent-test branch Sep 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment