私有链配置信息的解释

 

上图表示的在同一个区块链上进行的两种不同配置信息的设置
左边ethereum.toml的配置信息是:
geth --datadir data0 --networkid 1500 --ipcdisable --port 2345 --rpc --rpcapi ‘eth,net,web3,admin,personal,miner,debug,shh’ --nodiscover --rpccorsdomain '*' --rpcport 61910 dumpconfig > ./ethereum.toml

然后右边geth.toml的配置信息是:
geth --datadir data0 --networkid 1500 --port 61910 --rpc --rpcapi 'eth,net,web3,admin,personal,miner,debug' --rpccorsdomain '*' --rpcport 8201 dumpconfig > ./geth.toml  

然后我们从图中就可以看见两者配置后配置信息中很明显的差别了:
--ipcdisable :ethereum.toml中则无参数 IPCPath = “geth.ipc",不能使用IPC连接
—nodiscover:ethereum.toml则参数为 NoDiscovery = true,geth.toml没有设置这个,则为NoDiscovery = false,说明该节点能够被发现。只是能不能被发现的区别,都是可以被连接的

--rpcapi:后面设置的信息都会出现在参数HTTPModules 中,ethereum.toml比geth.toml多一个shh

--port 2345 : 设置的是参数 ListenAddr = “:2345”,即该进程在服务器中占用的端口
--rpcport 61910:设置的是参数 HTTPPort = 61910,即要通过http方式接入区块链的端口号

打开方式:
geth --config ./geth.toml console 2>>geth.log

posted @ 2018-08-27 16:16  慢行厚积  阅读(606)  评论(0编辑  收藏  举报