Skip to content
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

Make BlockChain<T>.GetStates() to only drill down until all requested addresses are found #192



None yet
3 participants
Copy link

commented Apr 12, 2019

This patch fixed a part of the issue #189. (For the case of nonexistent addresses, as it needs to change IStore interface to fix that, I am going to submit a separated patch to the master.)

The problem is that the condition to test if all requested addresses are satisfied had depended on the order of two sets of addresses, which is arbitrary. I wrote a regression test to reproduce this problem, which involves testing utilities like NullPolicy<T> and StoreTracker, and fixed it by replacing SequenceEquals() with SetEquals().

@dahlia dahlia added the bug label Apr 12, 2019

@dahlia dahlia requested review from longfin and earlbread Apr 12, 2019

@dahlia dahlia self-assigned this Apr 12, 2019

Show resolved Hide resolved Libplanet.Tests/Store/StoreTrackerTest.cs Outdated
Show resolved Hide resolved Libplanet.Tests/Store/StoreTracker.cs Outdated

@dahlia dahlia force-pushed the dahlia:fix-get-states-unnecessary-deep-down branch from 06f459b to e9025a2 Apr 12, 2019

@dahlia dahlia dismissed stale reviews from earlbread and longfin via d447970 Apr 12, 2019

@dahlia dahlia force-pushed the dahlia:fix-get-states-unnecessary-deep-down branch from e9025a2 to d447970 Apr 12, 2019


This comment has been minimized.

Copy link

commented Apr 12, 2019

Codecov Report

Merging #192 into 0.2-maintenance will decrease coverage by 3.1%.
The diff coverage is 100%.

@@                 Coverage Diff                 @@
##           0.2-maintenance     #192      +/-   ##
- Coverage            87.18%   84.07%   -3.11%     
  Files                   71       71              
  Lines                 3245     3246       +1     
- Hits                  2829     2729     -100     
- Misses                 416      517     +101
Impacted Files Coverage Δ
Libplanet/Blockchain/BlockChain.cs 99.19% <100%> (+0.81%) ⬆️
Libplanet/Net/IceServer.cs 0% <0%> (-100%) ⬇️
Libplanet/Net/IceServerException.cs 0% <0%> (-100%) ⬇️
Libplanet/Net/NetworkStreamProxy.cs 0% <0%> (-80.77%) ⬇️
Libplanet/Net/Swarm.cs 81.78% <0%> (-5.72%) ⬇️

@dahlia dahlia merged commit 952149e into planetarium:0.2-maintenance Apr 12, 2019

5 checks passed

Travis CI - Pull Request Build Passed
WIP Ready for review
changelog This contains self-describing changelog.
codecov/patch 100% of diff hit (target 87.18%)
codecov/project Absolute coverage decreased by -3.1% but relative coverage increased by +12.81% compared to c5366d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.