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

add para support remote main node switch

parent 7af54530
This diff is collapsed.
......@@ -543,30 +543,3 @@ out:
}
}
func checkMinerTx(current *types.BlockDetail) error {
//检查第一个笔交易的execs, 以及执行状态
if len(current.Block.Txs) == 0 {
return types.ErrEmptyTx
}
baseTx := current.Block.Txs[0]
//判断交易类型和执行情况
var action paracross.ParacrossAction
err := types.Decode(baseTx.GetPayload(), &action)
if err != nil {
return err
}
if action.GetTy() != paracross.ParacrossActionMiner {
return paracross.ErrParaMinerTxType
}
//判断交易执行是否OK
if action.GetMiner() == nil {
return paracross.ErrParaEmptyMinerTx
}
//判断exec 是否成功
if current.Receipts[0].Ty != types.ExecOk {
return paracross.ErrParaMinerExecErr
}
return nil
}
......@@ -83,6 +83,7 @@ emptyBlockInterval=50
authAccount=""
#等待平行链共识消息在主链上链并成功的块数,超出会重发共识消息,最小是2
waitBlocks4CommitMsg=2
searchHashMatchedBlockDepth=100
[mver.consensus]
......
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