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
Contributor

@earlbread earlbread commented Sep 30, 2019

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

@earlbread earlbread force-pushed the improve-lookup-state-ref branch 3 times, most recently from 8964451 to 5c6bd13 Compare September 30, 2019 07:06
@earlbread earlbread marked this pull request as ready for review September 30, 2019 07:10
@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 Something isn't working label Sep 30, 2019
limebell
limebell previously approved these changes Sep 30, 2019
Copy link
Contributor

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs should define what if these parameters take null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I elaborated the docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems still the case of null is not explained.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs were missing during the rebase. I restored.

@codecov
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
Contributor

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

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

limebell
limebell previously approved these changes Oct 7, 2019
longfin
longfin previously approved these changes Oct 7, 2019
Improve `IStore.LookupStateReference()` method by limiting the number of results
@earlbread earlbread dismissed stale reviews from longfin and limebell via e95acc3 October 7, 2019 05:53
@longfin longfin merged commit 2247b88 into planetarium:master Oct 7, 2019
@earlbread earlbread deleted the improve-lookup-state-ref branch October 7, 2019 06:33
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.

5 participants