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

Fix GetStates bug when there are multiple addresses #346

Conversation

Projects
None yet
3 participants
@earlbread
Copy link
Member

commented Jul 11, 2019

This fixes a bug where GetStates method does not return the latest state when there are multiple addresses. And also this changes the return value of LookupStateReference() method to fix the bug.

@earlbread earlbread added the bug label Jul 11, 2019

@earlbread earlbread requested review from dahlia and longfin Jul 11, 2019

@earlbread earlbread self-assigned this Jul 11, 2019

@dahlia

This comment has been minimized.

Copy link
Member

commented Jul 11, 2019

IMHO as this fixes a bug made in the previous minor release, it should be merged into 0.*-maintenance instead of master.

@codecov

This comment has been minimized.

Copy link

commented Jul 11, 2019

Codecov Report

Merging #346 into 0.4-maintenance will increase coverage by 0.15%.
The diff coverage is 100%.

@@                 Coverage Diff                 @@
##           0.4-maintenance     #346      +/-   ##
===================================================
+ Coverage            87.57%   87.72%   +0.15%     
===================================================
  Files                  189      189              
  Lines                12777    12808      +31     
===================================================
+ Hits                 11189    11236      +47     
+ Misses                1336     1321      -15     
+ Partials               252      251       -1
Impacted Files Coverage Δ
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.78% <100%> (+0.14%) ⬆️
Libplanet/Blockchain/BlockChain.cs 95.61% <100%> (+0.02%) ⬆️
Libplanet.Tests/Store/StoreTest.cs 98.75% <100%> (ø) ⬆️
Libplanet.Tests/Store/StoreExtensionTest.cs 100% <100%> (ø) ⬆️
Libplanet/Store/StoreExtension.cs 89.47% <100%> (+3.75%) ⬆️
Libplanet/Net/Swarm.cs 77.25% <0%> (+0.4%) ⬆️
Libplanet/Crypto/PrivateKey.cs 85.58% <0%> (+0.9%) ⬆️
Libplanet.Tests/Net/SwarmTest.cs 92.38% <0%> (+1.18%) ⬆️

@earlbread earlbread changed the base branch from master to 0.4-maintenance Jul 11, 2019

@earlbread earlbread force-pushed the earlbread:fix-get-states-multiple-address branch from 9376498 to 3a1823e Jul 11, 2019

@earlbread

This comment has been minimized.

Copy link
Member Author

commented Jul 11, 2019

I changed the target branch to 0.4-maintenance. @dahlia

@earlbread earlbread force-pushed the earlbread:fix-get-states-multiple-address branch from 3a1823e to 13b8c25 Jul 11, 2019

@dahlia
Copy link
Member

left a comment

Shouldn't we add a regression test calling the GetStates() method?

Show resolved Hide resolved CHANGES.md Outdated
Show resolved Hide resolved CHANGES.md Outdated
Reword CHANGES.md
Co-Authored-By: Hong Minhee <hong.minhee@gmail.com>
@earlbread

This comment has been minimized.

Copy link
Member Author

commented Jul 11, 2019

Shouldn't we add a regression test calling the GetStates() method?

The regression test is added here.

@dahlia

dahlia approved these changes Jul 11, 2019

@earlbread earlbread merged commit 9e0b7fc into planetarium:0.4-maintenance Jul 11, 2019

16 checks passed

WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 100% of diff hit (target 87.57%)
Details
codecov/project 87.72% (+0.15%) compared to bd94d57
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190711.5 succeeded
Details
planetarium.libplanet (Linux_Mono) Linux_Mono succeeded
Details
planetarium.libplanet (Linux_NETCore) Linux_NETCore succeeded
Details
planetarium.libplanet (Windows_Mono) Windows_Mono succeeded
Details
planetarium.libplanet (Windows_NETCore) Windows_NETCore succeeded
Details
planetarium.libplanet (Windows_NETCore_coverage) Windows_NETCore_coverage succeeded
Details
planetarium.libplanet (Windows_NETFramework) Windows_NETFramework succeeded
Details
planetarium.libplanet (macOS_Mono) macOS_Mono succeeded
Details
planetarium.libplanet (macOS_NETCore) macOS_NETCore succeeded
Details
planetarium.libplanet (macOS_Unity) macOS_Unity succeeded
Details

@earlbread earlbread deleted the earlbread:fix-get-states-multiple-address branch Jul 11, 2019

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.