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

rpcsrv: fix findstorage if a contract state is not found #3385

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

AliceInHunterland
Copy link
Contributor

Close #3370

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.80%. Comparing base (e7a0ded) to head (893c8c8).

❗ Current head 893c8c8 differs from pull request most recent head fff25bd. Consider uploading reports for the commit fff25bd to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3385   +/-   ##
=======================================
  Coverage   84.80%   84.80%           
=======================================
  Files         331      331           
  Lines       44967    44969    +2     
=======================================
+ Hits        38133    38138    +5     
+ Misses       5325     5319    -6     
- Partials     1509     1512    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

@@ -1750,7 +1750,8 @@ func (s *Server) findStorageInternal(id int32, prefix []byte, start, take int, s
var (
i int
end = start + take
res = new(result.FindStorage)
// Results is an empty list if a contract state is not found as it is in C# implementation.
Copy link
Member

Choose a reason for hiding this comment

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

s/Results/res (if referring to a var) or s/Results is/Result is (if talking about generic operation result).

Previously findstorage returns null for the results key if a contract
state is not found. C# returns an empty list.

Close #3370

Signed-off-by: Ekaterina Pavlova <[email protected]>
@AnnaShaleva AnnaShaleva merged commit c5ba539 into master Apr 3, 2024
15 of 18 checks passed
@AnnaShaleva AnnaShaleva deleted the findstorage branch April 3, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

findstorage rpc response difference if state is not found
2 participants