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

take cross tx in exec directly

parent 07ffb1d6
......@@ -679,15 +679,6 @@ func (client *client) addMinerTx(preStateHash []byte, block *types.Block, main *
MainBlockHeight: main.Detail.Block.Height,
}
//获取当前区块的所有原始tx hash 和跨链hash作为bitmap base hashs,因为有可能在执行过程中有些tx 执行error被剔除掉
if main.Detail.Block.Height >= mainForkParacrossCommitTx {
for _, tx := range txs {
status.TxHashs = append(status.TxHashs, tx.Hash())
}
txHashs := paraexec.FilterParaCrossTxHashes(types.GetTitle(), txs)
status.CrossTxHashs = append(status.CrossTxHashs, txHashs...)
}
tx, err := pt.CreateRawMinerTx(&pt.ParacrossMinerAction{
Status: status,
IsSelfConsensus: isParaSelfConsensusForked(status.MainBlockHeight),
......
......@@ -170,16 +170,16 @@ func setMinerTxResultFork(payload *pt.ParacrossMinerAction, txs []*types.Transac
hash := tx.Hash()
curTxHashs = append(curTxHashs, hash)
}
baseTxHashs := payload.Status.TxHashs
baseCrossTxHashs := payload.Status.CrossTxHashs
baseCrossTxHashs := FilterParaCrossTxHashes(types.GetTitle(), txs)
//主链自己过滤平行链tx, 对平行链执行失败的tx主链无法识别,主链和平行链需要获取相同的最初的tx map
//全部平行链tx结果
payload.Status.TxResult = util.CalcBitMap(baseTxHashs, curTxHashs, receipts)
payload.Status.TxResult = util.CalcBitMap(curTxHashs, curTxHashs, receipts)
//跨链tx结果
payload.Status.CrossTxResult = util.CalcBitMap(baseCrossTxHashs, curTxHashs, receipts)
payload.Status.TxHashs = [][]byte{CalcTxHashsHash(baseTxHashs)}
payload.Status.TxHashs = [][]byte{CalcTxHashsHash(curTxHashs)}
payload.Status.CrossTxHashs = [][]byte{CalcTxHashsHash(baseCrossTxHashs)}
}
......
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