Geth version:
Geth
Version 1.4.18-stable-c72f5459
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.7
OS: Windows
GOPATH=
GOROOT=/usr/local/go
OS & Version: Windows7
Use the --datadir, --nodiscover, --rpc, rpcport "8080" flags, and more.
Every flag usage make geth return "flag provided but not defined:
Flags only have one hyphen ( "-datadir" ) in the error line.
geth init genesis.json --nodiscover --rpc --rpcport "8080" --datadir "\dir"
[backtrace]
The init subcommand is used to generate the blockchain with the genesis block as defined in genesis.json. There is no point in giving runtime options since it won't start the node. The only flag that is interesting is the datadir flag.
Steps to initialize and start a node are:
geth --datadir <my-dir> init genesis.json
geth --datadir <my-dir> -nodiscover --rpc --rpcport "8080"
Note, the flags need to come after geth and before init, as all flags currently are global and not subcommand specific. This is ugly we know, it will probably change in the future but that's outside of our development scope for now.
Most helpful comment
Note, the flags need to come after
gethand beforeinit, as all flags currently are global and not subcommand specific. This is ugly we know, it will probably change in the future but that's outside of our development scope for now.