初始化私链

配置私链

geth.exe同目录下创建个文件夹,名字随意,我的叫sloweth

新建文件夹

sloweth文件夹下创建一个名为genesis.json的配置文件

新建配置文件

配置文件的内容为

{
	"config":{
		"chainId": 666
	},
	"difficulty": "0x20000",
	"gasLimit": "0x2fefd8",
	"alloc":{}
}

到这里简单的私链就配置好了。

初始化

geth.exe同目录下打开命令行窗口
输入下面的语句

geth --datadir sloweth init sloweth/genesis.json

回车就能初始化私链

初始化私链

初始化完成后sloweth文件夹下会生成gethkeystore两个文件夹

初始化完成

它们保存着私链的数据。

posted on 2020-04-22 19:56  iknow的笔记本  阅读(130)  评论(0编辑  收藏  举报

导航