Commit daf81456 authored by suyanlong's avatar suyanlong

fix paracross exec address bug

parent cce2ea5c
......@@ -714,7 +714,7 @@ func (p *Paracross) SubmitIBTP(ibtp *pb.IBTP) (*pb.SubmitIBTPResponse, error) {
if event.Payload.EventType == types.EventType_Burn {
// 用户在联盟链一侧发起销毁。
// 第一次提交。
tx, err := p.CreateRawAssetTransferTxExt(p.chainID, p.MinTxFeeRate, &types33.CreateTx{
tx, err := p.CreateRawAssetTransferTxExt(&types33.CreateTx{
To: event.Payload.BurnAddress,
Amount: event.Payload.BurnAmount,
Fee: p.MinTxFeeRate,
......@@ -752,7 +752,7 @@ func (p *Paracross) SubmitIBTP(ibtp *pb.IBTP) (*pb.SubmitIBTPResponse, error) {
return nil, errors.New("ibtp error")
}
func (p *Paracross) CreateRawAssetTransferTxExt(chainID int32, minFee int64, param *types33.CreateTx) (*types33.Transaction, error) {
func (p *Paracross) CreateRawAssetTransferTxExt(param *types33.CreateTx) (*types33.Transaction, error) {
// 跨链交易需要在主链和平行链上执行, 所以应该可以在主链和平行链上构建
if !types33.IsParaExecName(param.GetExecName()) {
return nil, types33.ErrInvalidParam
......@@ -778,7 +778,7 @@ func (p *Paracross) CreateRawAssetTransferTxExt(chainID int32, minFee int64, par
To: p.execAddress,
Fee: param.Fee,
}
tx, err := types33.FormatTxExt(chainID, true, minFee, param.GetExecName(), rawtx)
tx, err := p.FormatTx(rawtx)
if err != nil {
return nil, err
}
......
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