File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package xpoa
3
3
import (
4
4
"bytes"
5
5
"encoding/json"
6
- "strconv"
7
6
"time"
8
7
9
8
"github.com/xuperchain/xupercore/kernel/common/xcontext"
@@ -66,17 +65,13 @@ func NewXpoaConsensus(cCtx cctx.ConsensusCtx, cCfg def.ConsensusConfig) base.Con
66
65
cCtx .XLog .Error ("consensus:xpoa:NewXpoaConsensus: xpoa struct unmarshal error" , "error" , err )
67
66
return nil
68
67
}
69
- //兼容老版本配置文件
70
- if len (xconfig .Version ) < 1 {
71
- xconfig .Version = "0"
72
- }
73
- version , err := strconv .ParseInt (xconfig .Version , 10 , 64 )
68
+ version , err := ParseVersion (cCfg .Config )
74
69
if err != nil {
75
70
cCtx .XLog .Error ("consensus:xpoa:NewXpoaConsensus: version error" , "error" , err )
76
71
return nil
77
72
}
78
73
// create xpoaSchedule
79
- schedule := NewXpoaSchedule (xconfig , cCtx , cCfg .StartHeight )
74
+ schedule := NewXpoaSchedule (xconfig , cCtx , cCfg .StartHeight , version )
80
75
if schedule == nil {
81
76
cCtx .XLog .Error ("consensus:xpoa:NewXpoaSchedule error" )
82
77
return nil
You can’t perform that action at this time.
0 commit comments