编译和运行

下载

通过 git 下载节点程序源代码

git clone https://github.com/DxChainNetwork/dxc.git

安装 Golang

// or in linux:
$ sudo snap install go --classic

编译

$ cd /path/to/dxc
$ make geth

编译之后的可执行程序位置在 build/bin 目录下。

执行 ./build/bin/geth --help 可以获取程序的相关用法,也可参考 command-line-options

注意:本文‘/path/to/dxc’ 指的是dxc的源码下载目录。

运行

运行配置

  • 进入工作目录 /path/to/dxc/build/bin:可执行程序geth所在的目录路径

  • 在工作目录中创建 config.toml

默认使用SyncMode = "snap" 节点同步模式,全节点同步切换至SyncMode = "full"

  • 在工作目录中创建start.sh

节点运行

网络

节点程序默认启动为 mainnet,若想启动测试网,可在运行时添加 --testnet 指令。

Last updated

Was this helpful?