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

fix filter bug

parent 255c98f2
...@@ -441,17 +441,10 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error ...@@ -441,17 +441,10 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error
} }
haveCrossTxs := len(commit.Status.CrossTxHashs) > 0 haveCrossTxs := len(commit.Status.CrossTxHashs) > 0
if commit.Status.Height > 0 && types.IsDappFork(commit.Status.MainBlockHeight, pt.ParaX, pt.ForkCommitTx) { if commit.Status.Height > 0 && types.IsDappFork(commit.Status.MainBlockHeight, pt.ParaX, pt.ForkCommitTx) && len(commit.Status.CrossTxHashs[0]) == 0{
clog.Info("paracross.Commit execCrossTx", "haveCrossTxs", haveCrossTxs, "crosstx", hex.EncodeToString(commit.Status.CrossTxHashs[0]))
if commit.Status.CrossTxHashs[0] == nil {
haveCrossTxs = false haveCrossTxs = false
} }
}
clog.Info("paracross.Commit execCrossTx", "height", commit.Status.Height, "haveCrossTxs", haveCrossTxs,
"fork", types.IsDappFork(commit.Status.MainBlockHeight, pt.ParaX, pt.ForkCommitTx), "forkheight", types.GetDappFork(pt.ParaX, pt.ForkCommitTx))
if enableParacrossTransfer && commit.Status.Height > 0 && haveCrossTxs { if enableParacrossTransfer && commit.Status.Height > 0 && haveCrossTxs {
clog.Debug("paracross.Commit commitDone", "do cross", "") clog.Debug("paracross.Commit commitDone", "do cross", "")
crossTxReceipt, err := a.execCrossTxs(commit) crossTxReceipt, err := a.execCrossTxs(commit)
......
...@@ -86,11 +86,9 @@ func FilterTxsForPara(title string, main *types.BlockDetail) []*types.Transactio ...@@ -86,11 +86,9 @@ func FilterTxsForPara(title string, main *types.BlockDetail) []*types.Transactio
continue continue
} }
//单独的paracross tx 如果主链执行失败也要排除 //单独的paracross tx 如果主链执行失败也要排除
if main.Block.Height >= forkHeight { if main.Block.Height >= forkHeight && !checkReceiptExecOk(main.Receipts[i]){
if types.IsMyParaExecName(string(tx.Execer)) && !checkReceiptExecOk(main.Receipts[i]) {
continue continue
} }
}
txs = append(txs, tx) txs = append(txs, tx)
} }
......
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