6

I'm using Geth to set up a private ethereum network and this is the command:

$ geth --identity "MyTestNode" --datadir "SomeDir" init genesis.json --rpc --rpcaddr "localhost" --rpcport "8000" --rpccorsdomain "*" --port "30303" --nodiscover --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "db,eth,net,web3" --autodag --networkid 1900 --nat "any" console 

But I'm getting that -rpc is provided but not defined and I don't know if everything else is correct.

2
  • 4
    The init and console are geth commands, you can only use once per geth invocation. You should split your command in two invocations: geth [params] init genesis.json, and then geth [other params] console
    – Ismael
    Commented Jul 3, 2017 at 17:33
  • 2
    The above comment is correct and should be submitted as an answer. Commented Jul 3, 2017 at 17:35

2 Answers 2

1

In GETH service the init and console are commands, you can't execute them togueter. you should use the init first then the console

i left a image about the geth structure

geth-structure

0

rpc is replaced by http in stable version

With all rpc options replaced by their http equivalent:

--rpc => --http

--rpcapi => --http.api

--rpccorsdomain => --http.corsdomain

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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