1

This is my account #1: http://ropsten.etherscan.io/address/0x6bc701e7c3b642fc12a3a6f7d1144b8200a26401

and I sent some ETH to account #2: https://ropsten.etherscan.io/address/0xb1862a4949553c993267054dfc10a8e76d83819b

Here's how I ran geth:

➜  voting_truffle geth --testnet --syncmode "fast" --rpc --rpcapi db,eth,net,web3,personal --cache=1024  --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303"

But why I'm still seeing 0 balance through the Truffle console?

truffle(development)> web3.personal.unlockAccount('0xb1862a4949553c993267054dfc10a8e76d83819b', 'somepass', 15000)
true
truffle(development)> web3.eth.getBalance('0xb1862a4949553c993267054dfc10a8e76d83819b').toString()
'0'
truffle(development)>

Here's few info about my env:

truffle(development)> version
Truffle v4.0.1 (core: 4.0.1)
Solidity v0.4.18 (solc-js)

Thoughts?

0xgoku
  • 471
  • 3
  • 5
  • 16
  • 1
    A thought, is your geth node synced? Incorrect balance is often caused by not being synced. – comodoro Nov 29 '17 at 08:06
  • @comodoro how do you check and make sure that my geth node is synced? I'm now seeing a lot of WARN [11-29|16:17:17] Synchronisation failed, dropping peer peer=573b6b30d1c97e7c err="retrieved ancestor is invalid" – 0xgoku Nov 29 '17 at 08:18
  • https://ethereum.stackexchange.com/questions/11233/how-to-check-my-sync-status-on-geth-1-5-5-raspberry-pi-3 might still be valid, i.e. enter geth console and enter eth.syncing. If there are errors, you might have to restart it or start from scratch. – comodoro Nov 29 '17 at 11:50
  • @comodoro still doesn't seem to work with me, see this: https://gist.github.com/glaksmono/c27def5f6407a5e8c34073d97d988a77 – 0xgoku Dec 01 '17 at 16:47
  • Etherscan.io (https://ropsten.etherscan.io/address/0x60a9e63750adfafc77bd0ba692a20e4dbe330c24) shows the transaction at 2179599, so you are just below it or already have it by now. Current block now is 2182087. – comodoro Dec 01 '17 at 20:03
  • I'm already above that block now, and I still don't see it: https://gist.github.com/glaksmono/74bbb320b686f0b99b03749adae3ca97 – 0xgoku Dec 02 '17 at 02:56
  • So I searched a bit and according to this geth --fast must be fully synced before showing any balance. – comodoro Dec 02 '17 at 09:31

1 Answers1

0

The reason why I don't see the Ropsten number in my geth console is because I don't have the block FULLY SYNCED.

Need to make sure that the block is fully synced before you execute web3.eth.getBalance('0xb1862a4949553c993267054dfc10a8e76d83819b')

> eth.syncing
false
> web3.personal.unlockAccount('0x60a9e63750adfafc77bd0ba692a20e4dbe330c24', '123456', 0)
true
> web3.eth.getBalance('0x60a9e63750adfafc77bd0ba692a20e4dbe330c24')
2000000000000000000
>
0xgoku
  • 471
  • 3
  • 5
  • 16