Skip to content

Commit 533f35a

Browse files
bysomeonemdj33
authored andcommitted
[[FIX]] add return for get evm tx recevier
1 parent bc97fc6 commit 533f35a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugin/dapp/evm/executor/exec.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ func (evm *EVMExecutor) GetMessage(tx *types.Transaction, index int, fromPtr *co
279279
from = *fromPtr
280280
}
281281

282-
addressFork := evm.GetAPI().GetConfig().IsDappFork(evm.GetHeight(), "evm", evmtypes.ForkEVMMixAddress)
283-
to := getReceiver(&action, addressFork)
282+
mixAddressFork := evm.GetAPI().GetConfig().IsDappFork(evm.GetHeight(), "evm", evmtypes.ForkEVMMixAddress)
283+
to := getReceiver(&action, mixAddressFork)
284284
if to == nil {
285285
return msg, types.ErrInvalidAddress
286286
}
@@ -366,12 +366,12 @@ func getCaller(tx *types.Transaction) common.Address {
366366
}
367367

368368
// 从交易信息中获取交易目标地址,在创建合约交易中,此地址为空
369-
func getReceiver(action *evmtypes.EVMContractAction, addressFork bool) *common.Address {
369+
func getReceiver(action *evmtypes.EVMContractAction, mixAddressFork bool) *common.Address {
370370
if action.ContractAddr == "" {
371371
return nil
372372
}
373-
if addressFork {
374-
common.StringToAddress(action.ContractAddr)
373+
if mixAddressFork {
374+
return common.StringToAddress(action.ContractAddr)
375375
}
376376
return common.StringToAddressLegacy(action.ContractAddr)
377377
}

0 commit comments

Comments
 (0)