Skip to content
This repository was archived by the owner on Nov 15, 2021. It is now read-only.
This repository was archived by the owner on Nov 15, 2021. It is now read-only.

getaccountstate returns the wrong balance of NEO #578

@jseagrave21

Description

@jseagrave21

Current behavior

getaccounstate returns the wrong balance of NEO. NEO-cli returns the correct balance.
GAS balance seems to be correct

PM me on Discord if you want a specific address to query (I only figured this out because I queried one of my addresses)

Expected behavior

getaccountstate should return the correct balance of both NEO and GAS

How to reproduce

You can use this script in Python to test if the balances match:

import requests

url = "http://108.252.121.18:10332"
body = {"jsonrpc": "2.0","method": "getaccountstate","params": ["<address>"],"id": 2}

req = requests.post(url, json=body)
req = req.json()
data = req['result']

print('Python Data: ', data)

url = "http://18.197.197.10:10332"
body = {"jsonrpc": "2.0","method": "getaccountstate","params": ["<address>"],"id": 2}

req = requests.post(url, json=body)
req = req.json()
data = req['result']

print('NEO-cli: ', data)

Your environment

This is based on live RPC calls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions