From 533f35a714894ac06ec75809ae4609a8e2f21457 Mon Sep 17 00:00:00 2001 From: jiangpeng <11565373+bysomeone@users.noreply.github.com> Date: Tue, 31 Jan 2023 11:43:54 +0800 Subject: [PATCH] [[FIX]] add return for get evm tx recevier --- plugin/dapp/evm/executor/exec.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/dapp/evm/executor/exec.go b/plugin/dapp/evm/executor/exec.go index 67a1b0d210..abe8fd28f5 100644 --- a/plugin/dapp/evm/executor/exec.go +++ b/plugin/dapp/evm/executor/exec.go @@ -279,8 +279,8 @@ func (evm *EVMExecutor) GetMessage(tx *types.Transaction, index int, fromPtr *co from = *fromPtr } - addressFork := evm.GetAPI().GetConfig().IsDappFork(evm.GetHeight(), "evm", evmtypes.ForkEVMMixAddress) - to := getReceiver(&action, addressFork) + mixAddressFork := evm.GetAPI().GetConfig().IsDappFork(evm.GetHeight(), "evm", evmtypes.ForkEVMMixAddress) + to := getReceiver(&action, mixAddressFork) if to == nil { return msg, types.ErrInvalidAddress } @@ -366,12 +366,12 @@ func getCaller(tx *types.Transaction) common.Address { } // 从交易信息中获取交易目标地址,在创建合约交易中,此地址为空 -func getReceiver(action *evmtypes.EVMContractAction, addressFork bool) *common.Address { +func getReceiver(action *evmtypes.EVMContractAction, mixAddressFork bool) *common.Address { if action.ContractAddr == "" { return nil } - if addressFork { - common.StringToAddress(action.ContractAddr) + if mixAddressFork { + return common.StringToAddress(action.ContractAddr) } return common.StringToAddressLegacy(action.ContractAddr) }