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

Merged

Conversation

dahlia
Copy link
Contributor

@dahlia dahlia 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 Something isn't working label Apr 12, 2019
@dahlia dahlia self-assigned this Apr 12, 2019
Libplanet.Tests/Store/StoreTrackerTest.cs Outdated Show resolved Hide resolved
Libplanet.Tests/Store/StoreTracker.cs Outdated Show resolved Hide resolved
@dahlia dahlia force-pushed the fix-get-states-unnecessary-deep-down branch from 06f459b to e9025a2 Compare April 12, 2019 07:07
longfin
longfin previously approved these changes Apr 12, 2019
earlbread
earlbread previously approved these changes Apr 12, 2019
@dahlia dahlia dismissed stale reviews from earlbread and longfin via d447970 April 12, 2019 07:18
@dahlia dahlia force-pushed the fix-get-states-unnecessary-deep-down branch from e9025a2 to d447970 Compare April 12, 2019 07:18
@codecov
Copy link

codecov bot 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
limebell pushed a commit to limebell/libplanet that referenced this pull request Jul 7, 2021
OnedgeLee pushed a commit to OnedgeLee/libplanet that referenced this pull request Jan 31, 2023
…netarium#192)

* INTERNAL: update configmap-versions.yaml

* INTERNAL: update kustomization.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants