Commit 12e3205e authored by mdj33's avatar mdj33 Committed by vipwzw

commit tx notify

parent 9214dcb2
......@@ -223,8 +223,8 @@ func (client *commitMsgClient) checkCommitTxSuccess(txs []*types.TxDetail) bool
txMap[string(tx.Tx.Hash())] = true
}
}
// committx是主链交易,需要向主链查询
} else {
// committx是主链交易,需要向主链查询,平行链获取到的只是过滤了的平行链交易
//如果正在追赶,则暂时不去主链查找,减少耗时
if !client.paraClient.isCaughtUp() {
return false
......
......@@ -51,7 +51,6 @@ func (client *client) createLocalBlock(lastBlock *pt.ParaLocalDbBlock, txs []*ty
if err != nil {
return err
}
client.commitMsgClient.commitTxCheckNotify(mainBlock.TxDetails)
return err
}
......@@ -553,6 +552,10 @@ out:
plog.Debug("para CreateBlock count not match", "count", count, "items", len(paraTxs.Items))
count = int64(len(paraTxs.Items))
}
//如果超过1个block,则认为当前正在追赶,暂不处理
if client.authAccount != "" && len(paraTxs.Items) == 1 {
client.commitMsgClient.commitTxCheckNotify(paraTxs.Items[0].TxDetails)
}
err = client.procLocalBlocks(paraTxs)
if err != 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