这里有很多进入geth平台的命令参数来确保你的链是私链
- nodiscover:不被其他节点发现,但是如果有相同创世块和networkid的节点可以连接进私链
--nodiscover
Use this to make sure that your node is not discoverable by people who do not manually add you. Otherwise, there is a chance that your node may be inadvertently added to a stranger's node if they have the same genesis file and network id.
- maxpeers 私链最大的界点数量
--maxpeers 0
Use maxpeers 0 if you do not want anyone else connecting to your test chain. Alternatively, you can adjust this number if you know exactly how many peers you want connecting to your private chain.
- rpc 一般是默认,用于节点提供rpc接口
--rpc
This will enable RPC interface on your node. This is generally enabled by default in Geth.
- rpcapi 通过rpc可以连接的API接口 ,一般默认有”db,eth,net,web3”
--rpcapi "db,eth,net,web3"
This dictates what APIs that are allowed to be accessed over RPC. By default, Geth enables the web3 interface over RPC.
IMPORTANT: Please note that offering an API over the RPC/IPC interface will gi