Skip to content

Commit

Permalink
修改冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
springrain committed Nov 18, 2021
2 parents a1550e8 + e9bc306 commit ca9185d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bcs/consensus/xpoa/xpoa.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package xpoa
import (
"bytes"
"encoding/json"
"strconv"
"time"

"github.com/xuperchain/xupercore/kernel/common/xcontext"
Expand Down Expand Up @@ -66,17 +65,13 @@ func NewXpoaConsensus(cCtx cctx.ConsensusCtx, cCfg def.ConsensusConfig) base.Con
cCtx.XLog.Error("consensus:xpoa:NewXpoaConsensus: xpoa struct unmarshal error", "error", err)
return nil
}
//兼容老版本配置文件
if len(xconfig.Version) < 1 {
xconfig.Version = "0"
}
version, err := strconv.ParseInt(xconfig.Version, 10, 64)
version, err := ParseVersion(cCfg.Config)
if err != nil {
cCtx.XLog.Error("consensus:xpoa:NewXpoaConsensus: version error", "error", err)
return nil
}
// create xpoaSchedule
schedule := NewXpoaSchedule(xconfig, cCtx, cCfg.StartHeight)
schedule := NewXpoaSchedule(xconfig, cCtx, cCfg.StartHeight, version)
if schedule == nil {
cCtx.XLog.Error("consensus:xpoa:NewXpoaSchedule error")
return nil
Expand Down

0 comments on commit ca9185d

Please sign in to comment.