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

Something wrong with getBlock #973

Closed
lipangit opened this issue Jul 28, 2018 · 13 comments
Closed

Something wrong with getBlock #973

lipangit opened this issue Jul 28, 2018 · 13 comments

Comments

@lipangit
Copy link

  • Version: 4.4.1
  • Python: 3.7.0
  • OS: osx

When I connect my local geth --rpc

image

and I get the result

image

But I use web3.js to connect the same rpc in my local server

image

I get the result

image

I thing web3.py is wrong What can I do ?

@lipangit
Copy link
Author

and web3.eth.getBalance(address) every address's ballance are 0

@voith
Copy link
Contributor

voith commented Jul 29, 2018

is your node synced? what does web3.eth.syncing say?

@lipangit
Copy link
Author

AttributeDict({'currentBlock': 6050271, 'highestBlock': 6050347, 'knownStates': 0, 'pulledStates': 0, 'startingBlock': 6050271})

@lipangit
Copy link
Author

run the scrpt again 20min later, I got the same result

@lipangit
Copy link
Author

geth --rpc

That is the commend to start rpc server

@voith
Copy link
Contributor

voith commented Jul 29, 2018

@lipangit your node is syncing. w3.eth.syncing will return false once the node is in sync.
Once your node is in sync, all operations will work as expected.

@lipangit
Copy link
Author

Do you mean I just wait untill w3.eth.syncing = false ?

@lipangit
Copy link
Author

but why eth.getBanlance() every address is = 0

@lipangit
Copy link
Author

What can I do next

@voith
Copy link
Contributor

voith commented Jul 29, 2018

but why eth.getBanlance() every address is = 0

Balance is something that is queried from the state trie. Till your state trie gets synced your balance will be shown as zero! read this.

@lipangit
Copy link
Author

@voith I will collect that issue and learn It carefully

@lipangit
Copy link
Author

Thank you

@carver
Copy link
Collaborator

carver commented Jul 30, 2018

Closing because it's not a bug, but feel free to continue to comment for support.

@carver carver closed this as completed Jul 30, 2018
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

No branches or pull requests

3 participants