|
|
@ -299,6 +299,9 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo |
|
|
|
var cxReceipt *types.CXReceipt |
|
|
|
var cxReceipt *types.CXReceipt |
|
|
|
// Do not create cxReceipt if EVM call failed
|
|
|
|
// Do not create cxReceipt if EVM call failed
|
|
|
|
if txType == types.SubtractionOnly && !failedExe { |
|
|
|
if txType == types.SubtractionOnly && !failedExe { |
|
|
|
|
|
|
|
if vmenv.CXReceipt != nil { |
|
|
|
|
|
|
|
return nil, nil, nil, 0, errors.New("cannot have cross shard receipt via precompile and directly") |
|
|
|
|
|
|
|
} |
|
|
|
cxReceipt = &types.CXReceipt{ |
|
|
|
cxReceipt = &types.CXReceipt{ |
|
|
|
TxHash: tx.Hash(), |
|
|
|
TxHash: tx.Hash(), |
|
|
|
From: msg.From(), |
|
|
|
From: msg.From(), |
|
|
@ -307,9 +310,6 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo |
|
|
|
ToShardID: tx.ToShardID(), |
|
|
|
ToShardID: tx.ToShardID(), |
|
|
|
Amount: msg.Value(), |
|
|
|
Amount: msg.Value(), |
|
|
|
} |
|
|
|
} |
|
|
|
if vmenv.CXReceipt != nil { |
|
|
|
|
|
|
|
return nil, nil, nil, 0, errors.New("cannot have cross shard receipt via precompile and directly") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if !failedExe { |
|
|
|
if !failedExe { |
|
|
|
if vmenv.CXReceipt != nil { |
|
|
|
if vmenv.CXReceipt != nil { |
|
|
|