Commit d6d4b15b authored by mdj33's avatar mdj33 Committed by vipwzw

remove empty interval

parent 7910a9d5
...@@ -216,6 +216,7 @@ superManager=[ ...@@ -216,6 +216,7 @@ superManager=[
] ]
[exec.sub.paracross] [exec.sub.paracross]
nodeGroupFrozenCoins=0 nodeGroupFrozenCoins=0
paraConsensusStopBlocks=100 #平行链共识停止后主链等待的高度
paraConsensusStopBlocks=30000
...@@ -383,7 +383,7 @@ func (a *action) superManagerVoteProc(title string) error { ...@@ -383,7 +383,7 @@ func (a *action) superManagerVoteProc(title string) error {
consensHeight := data.(*pt.ParacrossStatus).Height consensHeight := data.(*pt.ParacrossStatus).Height
//如果group建立后一直没有共识,则从approve时候开始算 //如果group建立后一直没有共识,则从approve时候开始算
if consensHeight == -1 { if consensHeight == -1 {
consensMainHeight = status.MainHeight consensMainHeight = status.Height
} else { } else {
stat, err := a.exec.paracrossGetStateTitleHeight(title, consensHeight) stat, err := a.exec.paracrossGetStateTitleHeight(title, consensHeight)
if err != nil { if err != nil {
...@@ -393,10 +393,9 @@ func (a *action) superManagerVoteProc(title string) error { ...@@ -393,10 +393,9 @@ func (a *action) superManagerVoteProc(title string) error {
consensMainHeight = stat.(*pt.ParacrossHeightStatus).MainHeight consensMainHeight = stat.(*pt.ParacrossHeightStatus).MainHeight
} }
//return err to stop tx pass to para chain //return err to stop tx pass to para chain
if a.exec.GetMainHeight() <= consensMainHeight+confStopBlocks*int64(status.EmptyBlockInterval) { if a.height <= consensMainHeight + confStopBlocks {
clog.Error("superManagerVoteProc, super manager height not reach", "currHeight", a.exec.GetMainHeight(), return errors.Wrapf(pt.ErrParaConsensStopBlocksNotReach,
"consensHeight", consensHeight, "mainHeight", consensMainHeight, "confHeight", confStopBlocks, "interval", status.EmptyBlockInterval) "supermanager height not reach,current:%d less consens:%d plus confStopBlocks:%s", a.height,consensMainHeight,confStopBlocks)
return pt.ErrParaConsensStopBlocksNotReach
} }
return nil return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment