1

So I've been using geth on windows in order to deploy my truffle project on the rinkeby testnet using an account where I have 9+ ether.

To get in sync with the chain I used (I previously added my account by using ./geth --rinkeby import account /pathoffile.txt):

./geth --rinkeby --rpc --rpcapi="db,eth,net,web3,personal" --unlock="0x940c04c8d13b7abfd4704fe8a55794f0d5d48827"

So geth got in sync with the chain and I unlocked my rinkeby account that has the current balance (FYI that contract deployement was through remix nothing to do with the rest): Metamask balance

But when I use the console to check the balance with :

./geth --rinkeby attach ipc:\\.\pipe\geth.ipc

and later using

eth.getBalance(eth.accounts[0])

I get a balance of 0 ...

I initially checked this because when I tried deploying my contract from truffle it said the gas limit has been exceeded but then I saw that the account that it was referencing had a balance of 0 so It could be because of that.

I could really need some help please, did I do somthing wrong ?

  • Are you sure it finished syncing? What does eth.blockNumber return? – Ismael Aug 26 '18 at 20:12
  • Pretty sure, it returned false – louis kleverman Aug 26 '18 at 20:20
  • There are some cases where it will return false before finishing for example if geth can't find peers. – Ismael Aug 26 '18 at 21:39
  • The block count was equal to the highest block (checked it compared to the rinkeby.io block) – louis kleverman Aug 26 '18 at 21:56
  • Sorry but I don't understand what is going on, if eth.accounts[0] is the correct address and your node si fully synced then it should show the correct balance. – Ismael Aug 27 '18 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.