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: support Map parameter in invokefunction RPC handler #3329

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

AnnaShaleva
Copy link
Member

We have smartcontract.ParameterPair structure that can be properly marshalled and passed to RPC server as an element of smartcontract.Map structure. However, RPC server can't unmarshal map values properly without this change.

This change is compatible with C# node.

@AnnaShaleva AnnaShaleva added bug Something isn't working smartcontract Smart contracts and associated package rpc RPC server and client labels Feb 27, 2024
@AnnaShaleva AnnaShaleva added this to the v0.106.0 milestone Feb 27, 2024
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 84.87%. Comparing base (cc38221) to head (6de3e47).
Report is 3 commits behind head on master.

❗ Current head 6de3e47 differs from pull request most recent head 132531f. Consider uploading reports for the commit 132531f to get more accurate results

Files Patch % Lines
pkg/services/rpcsrv/params/txBuilder.go 83.14% 11 Missing and 4 partials ⚠️
pkg/services/rpcsrv/params/param.go 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3329      +/-   ##
==========================================
- Coverage   84.94%   84.87%   -0.08%     
==========================================
  Files         328      328              
  Lines       44789    44825      +36     
==========================================
- Hits        38048    38045       -3     
- Misses       5229     5267      +38     
- Partials     1512     1513       +1     

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

pkg/services/rpcsrv/params/param.go Outdated Show resolved Hide resolved
pkg/services/rpcsrv/params/txBuilder.go Outdated Show resolved Hide resolved
pkg/services/rpcsrv/params/param.go Outdated Show resolved Hide resolved
We have smartcontract.ParameterPair structure that can be properly
marshalled and passed to RPC server as an element of smartcontract.Map
structure. However, RPC server can't unmarshal map values properly
without this change.

This change is compatible with C# node.

Signed-off-by: Anna Shaleva <[email protected]>
@roman-khimov roman-khimov merged commit 9d7357c into master Feb 28, 2024
15 of 18 checks passed
@roman-khimov roman-khimov deleted the support-rpc-maps branch February 28, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rpc RPC server and client smartcontract Smart contracts and associated package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants