Skip to content

Commit

Permalink
add networkid command flag usage in document (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiluge authored and laizy committed Jun 30, 2018
1 parent 395b345 commit de96efd
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 10 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,27 @@ You can download at [release page](https://github.com/ontio/ontology/releases).
### Select network
To run Ontology successfully, nodes can be deployed by three ways:

- Mainnet sync node deployment
- Public test network Polaris sync node deployment
- Single-host deployment
- Multi-hosts deployment

#### Mainnet sync node deployment

Run ontology straightly

```
./ontology --networkid 1
```

PS: There is no need of config.json file, will use the default setting.

#### Public test network Polaris sync node deployment

Run ontology straightly

```
./ontology
./ontology --networkid 2
```

PS: There is no need of config.json file, will use the default setting.
Expand All @@ -113,7 +124,7 @@ Create a directory on the host and store the following files in the directory:
- Node program + Node control program `ontology`
- Wallet file`wallet.dat`

Run command `$ ./ontology --testmode` can start single-host test net.
Run command `$ ./ontology --testmode --networkid 3` can start single-host test net.

Here's a example of single-host configuration:

Expand Down
13 changes: 11 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,25 @@ You can download at [release page](https://github.com/ontio/ontology/releases).
### 选择网络
ontology的运行支持以下三种方式

* 主网同步节点部署
* 公开测试网Polaris同步节点部署
* 单机部署
* 多机部署

#### 主网同步节点部署

直接启动Ontology,不需要钱包文件,也不需要配置文件

```
./ontology --networkid 1
```

#### 公开测试网Polaris同步节点部署

直接启动Ontology,不需要钱包文件,也不需要配置文件

```
./ontology
./ontology --networkid 2
```

#### 单机部署配置
Expand All @@ -110,7 +119,7 @@ ontology的运行支持以下三种方式
- 节点程序 + 节点控制程序 `ontology`
- 钱包文件`wallet.dat`

使用命令 `$ ./ontology --testmode` 即可启动单机版的测试网络。
使用命令 `$ ./ontology --testmode --networkid 3` 即可启动单机版的测试网络。

单机配置的例子如下:
- 目录结构
Expand Down
17 changes: 14 additions & 3 deletions docs/specifications/testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,27 @@ English | [中文](testnet_CN.md)
### Select network
To run Ontology successfully, nodes can be deployed by two ways:

- Mainnet sync node deployment
- Public test network(Polaris) sync node deployment
- Single-host deployment
- Multi-hosts deployment

#### Mainnet sync node deployment

Run ontology straightly

```
./ontology --networkid 1
```

PS: There is no need of config.json file, will use the default setting.

#### Public test network(Polaris) sync node deployment
Run ontology straightly

```
./ontology
./ontology --networkid 2
```

PS: There is no need of config.json file, will use the default setting.
Expand All @@ -47,7 +58,7 @@ Here's a example of single-host configuration:
Run ontology

```
./ontology --testmode
./ontology --testmode --networkid 3
```
#### Multi-hosts deployment configuration
Expand Down Expand Up @@ -178,7 +189,7 @@ Run `./ontology --help` for details.
### ONT transfer sample
--asset: asset type ["ont"|"ong"] ; - from: transfer from; - to: transfer to; - amount: amount;
```shell
./ontology asset transfer --amount=500 --from AYiToLDT2yZuNs3PZieXcdTpyC5VWQmfaN --to AeoBhZtS8AmGp3Zt4LxvCqhdU4eSGiK44M --password=xxx
./ontology asset transfer --amount=500 --from AYiToLDT2yZuNs3PZieXcdTpyC5VWQmfaN --to AeoBhZtS8AmGp3Zt4LxvCqhdU4eSGiK44M
```
If transfer asset successd, the result will show as follow:
```
Expand Down
15 changes: 12 additions & 3 deletions docs/specifications/testnet_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,25 @@
### 选择网络
ontology的运行支持以下3钟方式

* 主网同步节点部署
* 连接到公开测试网(Polaris)
* 单机部署
* 多机部署

#### 连接到公开测试网(Polaris)
#### 主网同步节点部署

直接启动Ontology,不需要钱包文件,也不需要配置文件

```
./ontology
./ontology --networkid 1
```

#### 公开测试网Polaris同步节点部署

直接启动Ontology,不需要钱包文件,也不需要配置文件

```
./ontology --networkid 2
```

#### 单机部署配置
Expand Down Expand Up @@ -158,7 +167,7 @@ ontology的运行支持以下3钟方式
### ONT转账调用示例
- asset: 资产类型["ont"|"ong"] - from: 转出地址; - to: 转入地址; - amount: 资产转移数量;
```shell
./ontology asset transfer --amount=500 --from AYiToLDT2yZuNs3PZieXcdTpyC5VWQmfaN --to AeoBhZtS8AmGp3Zt4LxvCqhdU4eSGiK44M --password=xxx
./ontology asset transfer --amount=500 --from AYiToLDT2yZuNs3PZieXcdTpyC5VWQmfaN --to AeoBhZtS8AmGp3Zt4LxvCqhdU4eSGiK44M
```
如果成功调用会返回如下event:
```
Expand Down

0 comments on commit de96efd

Please sign in to comment.