Commit e08ea8c4 authored by vipwzw's avatar vipwzw

auto ci

parent 66372814
......@@ -207,8 +207,8 @@ func (client *commitMsgClient) verifyTx(curTx *types.Transaction, verifyTxs map[
return true
}
//当前addType是回滚,则不计数,如果有累计则撤销上次累计次数,重新计数
if addType != types.AddBlock{
if client.checkTxCommitTimes > 0{
if addType != types.AddBlock {
if client.checkTxCommitTimes > 0 {
client.checkTxCommitTimes--
}
return false
......@@ -259,7 +259,7 @@ func (client *commitMsgClient) checkCommitTxSuccess(block *types.ParaTxDetail) b
return false
}
return client.verifyTx(curTx, txMap,block.Type)
return client.verifyTx(curTx, txMap, block.Type)
}
//如果共识高度一直没有追上发送高度,且当前发送高度已经上链,说明共识一直没达成,安全起见,超过停止次数后,重发
......
......@@ -341,7 +341,7 @@ func (client *client) requestTxsFromBlock(currSeq int64, preMainBlockHash []byte
func (client *client) requestFilterParaTxs(currSeq int64, count int64, preMainBlockHash []byte) (*types.ParaTxDetails, error) {
cfg := client.GetAPI().GetConfig()
req := &types.ReqParaTxByTitle{IsSeq: true, Start: currSeq, End: currSeq + count-1, Title: cfg.GetTitle()}
req := &types.ReqParaTxByTitle{IsSeq: true, Start: currSeq, End: currSeq + count - 1, Title: cfg.GetTitle()}
details, err := client.GetParaTxByTitle(req)
if err != nil {
return nil, err
......@@ -354,7 +354,7 @@ func (client *client) requestFilterParaTxs(currSeq int64, count int64, preMainBl
return nil, err
}
//至少应该返回1个
if len(details.Items) == 0{
if len(details.Items) == 0 {
plog.Error("requestFilterParaTxs ret nil", "curSeq", currSeq, "count", count, "preMainBlockHash", hex.EncodeToString(preMainBlockHash))
return nil, types.ErrNotFound
}
......
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