Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
share
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄刚
share
Commits
72255a2b
Commit
72255a2b
authored
Nov 08, 2018
by
黄刚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
52dd9a95
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
共识模块.md
共识模块.md
+3
-1
No files found.
共识模块.md
View file @
72255a2b
# 共识模
块
# 共识模
块
...
@@ -115,6 +115,7 @@ type subConfig struct {
...
@@ -115,6 +115,7 @@ type subConfig struct {
}
}
```
```
> 定义共识模块子配置结构体,用于从配置文件中获取配置信息。创世地址和创始区块时间会在Miner接口的CreateGenesisTx()和GetGenesisBlockTime()中用到,可以使用consensus配置项中的配置,也可以在子配置中添加配置使用,推荐在子配置中添加。
> 定义共识模块子配置结构体,用于从配置文件中获取配置信息。创世地址和创始区块时间会在Miner接口的CreateGenesisTx()和GetGenesisBlockTime()中用到,可以使用consensus配置项中的配置,也可以在子配置中添加配置使用,推荐在子配置中添加。
```
go
```
go
type
Client
struct
{
type
Client
struct
{
//父类对象指针
//父类对象指针
...
@@ -124,6 +125,7 @@ type Client struct {
...
@@ -124,6 +125,7 @@ type Client struct {
}
}
```
```
> 定义实现Module接口的Client结构体。
> 定义实现Module接口的Client结构体。
### 4.3 配置
### 4.3 配置
1.
修改配置文件chain33.toml,修改
[
consensus
]
项中的name键为"numberdecide"。
1.
修改配置文件chain33.toml,修改
[
consensus
]
项中的name键为"numberdecide"。
2.
新增
[
consensus.sub.numberdecide
]
配置项,增加genesis,genesisBlockTime,nodeId,nodes项。
2.
新增
[
consensus.sub.numberdecide
]
配置项,增加genesis,genesisBlockTime,nodeId,nodes项。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment