0

I copied go ethereum source from heco git repository compiled and used following genesis.json file

{
    "config": {
    "chainId": 24,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "clique": {
      "period": 5,
      "epoch": 30000
    }
  },
  "difficulty": "1",
  "gasLimit": "8000000", " 
  "extradata":"",
  "alloc": {
     "7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "300000" },
     "f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "400000" }
  }
}

then applied following two commands

./geth --datadir data init data/genesis.json

and

./geth  --networkid 24 --rpc --rpccorsdomain "*" --rpcaddr 127.0.0.1 console

but when I checks balance of above mentioned account using the command below on geth console

eth.getBalance("0x7df9a875a174b3bc565e6424a0050ebc1b2d1d82")

it shows undefined means this account has no existance and no balance, so is my genesis block does not taking effect or I am missing any step, please explain my mistake and proper solution for it, Thanks

0

I figured it out as there was a need to put `--datadir' again while starting node and there must be write permission on that data folder to respective user who is starting the node

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.