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

[Neo Plugin RPCServer]fix getcontractstate #3282

Merged
merged 2 commits into from
May 28, 2024

Conversation

Jim8y
Copy link
Contributor

@Jim8y Jim8y commented May 27, 2024

Description

This pr fixes the syntax issue in the getcontractstate method of the rpcserver. The issue is because with the nullable symbol ?, the rpcerror will never be triggered.

Fixes # (issue) #3280

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • TestNotNull_Or

Test Configuration:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Jim8y Jim8y requested a review from a team May 27, 2024 12:01
@Jim8y Jim8y linked an issue May 27, 2024 that may be closed by this pull request
Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

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

LGTM, can you test @mialbu?

@mialbu
Copy link

mialbu commented May 27, 2024

LGTM, can you test @mialbu?

It works, I get Unknown contract as error message now. 💯

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -102,
        "message": "Unknown contract"
    }
}

@Jim8y Jim8y requested a review from a team May 27, 2024 13:40
@shargon shargon merged commit 7bb4900 into neo-project:master May 28, 2024
6 checks passed
@Jim8y Jim8y added this to the v3.7.5 milestone Jun 11, 2024
superboyiii added a commit to neo-project/neo-modules that referenced this pull request Jun 11, 2024
superboyiii added a commit to neo-project/neo-modules that referenced this pull request Jun 12, 2024
* fix patch from:
neo-project/neo#3261
and
neo-project/neo#3299

* add neo-project/neo#3282

* add neo-project/neo#3263

* v3.7.5 hotfix

* readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disimproved Error Message for RPC getcontractstate
4 participants