Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
eef26eea
Commit
eef26eea
authored
Apr 25, 2019
by
vipwzw
Committed by
33cn
Apr 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mver
parent
fc23c4db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
config_mver.go
vendor/github.com/33cn/chain33/types/config_mver.go
+7
-1
local.mvertest.toml
...ithub.com/33cn/chain33/types/testdata/local.mvertest.toml
+6
-0
No files found.
vendor/github.com/33cn/chain33/types/config_mver.go
View file @
eef26eea
...
...
@@ -111,8 +111,14 @@ func (v *versionList) addItem(forkid int64, key, forkname string) error {
if
len
(
v
.
forkname
)
==
0
{
v
.
forkname
=
make
(
map
[
int64
]
string
)
}
//这里要允许替换: 有时候会有相同的fork高度
if
_
,
ok
:=
v
.
forkname
[
forkid
];
ok
{
return
fmt
.
Errorf
(
key
+
" same fork height is set: old name is '"
+
v
.
forkname
[
forkid
]
+
"' new name is '"
+
forkname
+
"'"
)
//以字母顺序替换
if
strings
.
Compare
(
forkname
,
v
.
forkname
[
forkid
])
>
0
{
tlog
.
Warn
(
key
+
" same fork height is set: old name is '"
+
v
.
forkname
[
forkid
]
+
"' new name is '"
+
forkname
+
"'"
)
v
.
forkname
[
forkid
]
=
forkname
}
return
nil
}
v
.
forkname
[
forkid
]
=
forkname
v
.
data
=
append
(
v
.
data
,
forkid
)
...
...
vendor/github.com/33cn/chain33/types/testdata/local.mvertest.toml
View file @
eef26eea
...
...
@@ -82,6 +82,12 @@ name2="ticket-bityuan"
[mver.consensus.ForkMinerTime]
name2
=
"ticket-bityuanv5"
[mver.consensus.ForkChainParamV1]
name2
=
"ticket-bityuanv1"
[mver.consensus.ForkChainParamV2]
name2
=
"ticket-bityuanv2"
[consensus.sub.ticket]
genesisBlockTime
=
1526486816
[[consensus.sub.ticket.genesis]]
...
...
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