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

Improve LookupStateReference #545

Merged
merged 2 commits into from Oct 7, 2019

Conversation

@earlbread
Copy link
Member

earlbread commented Sep 30, 2019

To mitigate #447, this improves IStore.LookupStateReference() method by limiting the number of results.

@earlbread earlbread force-pushed the earlbread:improve-lookup-state-ref branch 3 times, most recently from 8964451 to 5c6bd13 Sep 30, 2019
@earlbread earlbread marked this pull request as ready for review Sep 30, 2019
@earlbread earlbread requested review from dahlia, longfin, limebell and moreal Sep 30, 2019
@earlbread earlbread self-assigned this Sep 30, 2019
@earlbread earlbread added this to the 0.6.0 milestone Sep 30, 2019
@earlbread earlbread added the bug label Sep 30, 2019
Copy link
Member

dahlia left a comment

We need to test added parameters.

Libplanet/Store/LiteDBStore.cs Show resolved Hide resolved
@@ -198,14 +198,20 @@ AddressStateMap states
/// </summary>
/// <param name="chainId">The chain ID.</param>
/// <param name="address">The <see cref="Address"/> to get state references.</param>
/// <param name="highestIndex">The highest index of state references to get.</param>
/// <param name="lowestIndex">The lowest index of state references to get.</param>
/// <param name="limit">The maximum number of state references to get.</param>

This comment has been minimized.

Copy link
@dahlia

dahlia Sep 30, 2019

Member

The docs should define what if these parameters take null.

This comment has been minimized.

Copy link
@earlbread

earlbread Sep 30, 2019

Author Member

I elaborated the docs.

This comment has been minimized.

Copy link
@dahlia

dahlia Oct 7, 2019

Member

Seems still the case of null is not explained.

This comment has been minimized.

Copy link
@earlbread

earlbread Oct 7, 2019

Author Member

The docs were missing during the rebase. I restored.

@earlbread earlbread force-pushed the earlbread:improve-lookup-state-ref branch from 5c6bd13 to b668c68 Sep 30, 2019
@codecov

This comment has been minimized.

Copy link

codecov bot commented Sep 30, 2019

Codecov Report

Merging #545 into master will decrease coverage by 0.05%.
The diff coverage is 95.06%.

@@            Coverage Diff             @@
##           master     #545      +/-   ##
==========================================
- Coverage   90.88%   90.83%   -0.06%     
==========================================
  Files         201      201              
  Lines       15172    15230      +58     
==========================================
+ Hits        13789    13834      +45     
- Misses       1100     1106       +6     
- Partials      283      290       +7
Impacted Files Coverage Δ
Libplanet/Store/BaseStore.cs 81.25% <ø> (ø) ⬆️
Libplanet.Tests/Store/StoreTracker.cs 57.14% <100%> (+0.3%) ⬆️
Libplanet/Store/StoreExtension.cs 94.73% <100%> (-0.82%) ⬇️
Libplanet/Store/LiteDBStore.cs 88.48% <81.25%> (-1.39%) ⬇️
Libplanet.Tests/Store/StoreTest.cs 99.05% <98.36%> (-0.09%) ⬇️
Libplanet/Net/Protocols/KademliaProtocol.cs 59.72% <0%> (-1.36%) ⬇️
@limebell limebell modified the milestones: 0.6.0, 0.7.0 Oct 1, 2019
Copy link
Member

dahlia left a comment

Could we have some tests for these added options?

CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
@earlbread earlbread force-pushed the earlbread:improve-lookup-state-ref branch from b668c68 to b862efb Oct 7, 2019
@earlbread earlbread requested review from limebell and dahlia Oct 7, 2019
@earlbread

This comment has been minimized.

Copy link
Member Author

earlbread commented Oct 7, 2019

I rebased this on the current master and added tests for new options.

Improve `IStore.LookupStateReference()` method by limiting the number of results
@earlbread earlbread dismissed stale reviews from longfin and limebell via e95acc3 Oct 7, 2019
@earlbread earlbread force-pushed the earlbread:improve-lookup-state-ref branch from b862efb to e95acc3 Oct 7, 2019
@dahlia
dahlia approved these changes Oct 7, 2019
@earlbread earlbread requested review from longfin and limebell Oct 7, 2019
@longfin
longfin approved these changes Oct 7, 2019
@moreal
moreal approved these changes Oct 7, 2019
@longfin longfin merged commit 2247b88 into planetarium:master Oct 7, 2019
18 checks passed
18 checks passed
dist
Details
docs
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 95.06% of diff hit (target 90.88%)
Details
codecov/project Absolute coverage decreased by -0.05% but relative coverage increased by +4.17% compared to 9f55530
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20191007.9 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_Benchmark) Windows_NETCore_Benchmark 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:improve-lookup-state-ref branch Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.