- Building Blockchain Projects
- Narayan Prusty
- 124字
- 2021-07-02 23:45:16
Connecting to the mainnet network
Nodes in the Ethereum network, by default, communicate using 30303 port. But nodes are also free to listen on some other port numbers.
To connect to the mainnet network, you just need to run the geth command. Here is an example of how to specify the network ID explicitly and specify a custom directory where geth will store the downloaded blockchain:
geth --datadir "/users/packt/ethereum" --networkid 1
The --datadir option is used to specify where to store the blockchain. If it's not provided, the default path is $HOME/.ethereum.
--networkid is used to specify the network ID. 1 is the ID of the mainnet network. If it's not provided, the default value is 1. The network ID of testnet is 2.
推薦閱讀
- 小新說運(yùn)營:B端產(chǎn)品運(yùn)營體系解析
- 購房活地圖王佳教你如何買到房:以北京地區(qū)為例解讀樓盤之優(yōu)劣
- 淘寶網(wǎng)店頁面設(shè)計(jì)、布局、配色、裝修一本就夠(最新實(shí)戰(zhàn)版)
- 淘寶網(wǎng)店運(yùn)營指南:6個月升級金牌賣家
- 去淘寶網(wǎng)開店賺錢
- 榨干百度谷歌
- 直播技巧:實(shí)力圈粉就這么簡單
- 微信電商,這樣做就對了!
- 微商:運(yùn)營策略、技巧、工具、思維與實(shí)戰(zhàn)
- 電子商務(wù)理論與實(shí)務(wù)(第2版)
- 一本書讀懂微信公眾營銷
- E-learning with Camtasia Studio
- 成為淘寶創(chuàng)業(yè)的超級畢業(yè)生
- 網(wǎng)站運(yùn)營直通車:7天精通SEO(白金版)
- 從零開始學(xué)運(yùn)營