diff --git a/core/parallel_executor.go b/core/parallel_executor.go index 630d437198..fb90727dd5 100644 --- a/core/parallel_executor.go +++ b/core/parallel_executor.go @@ -174,7 +174,11 @@ func (exe *Executor) executeParallelTx(ctx *ParallelContext, idx int, intrinsicG // Make sure the sender is an EOA if codeHash := fromObj.GetCodeHash(); codeHash != emptyCodeHash && codeHash != (common.Hash{}) { - log.Error("Sender not an eoa", "from", msg.From().Hex(), "to", msg.To().Hex(), "err", ErrSenderNoEOA.Error()) + if msg.To() != nil { + log.Error("Sender not an eoa", "from", msg.From().Hex(), "to", msg.To().Hex(), "err", ErrSenderNoEOA.Error()) + } else { + log.Error("Sender not an eoa", "from", msg.From().Hex(), "err", ErrSenderNoEOA.Error()) + } } mgval := new(big.Int).Mul(new(big.Int).SetUint64(tx.Gas()), tx.GasPrice()) diff --git a/core/state_transition.go b/core/state_transition.go index 8a687228b6..aa2b756457 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -226,7 +226,11 @@ func (st *StateTransition) preCheck() error { } // Make sure the sender is an EOA if codeHash := st.state.GetCodeHash(st.msg.From()); codeHash != emptyCodeHash && codeHash != (common.Hash{}) { - log.Error("Sender not an eoa", "from", st.msg.From().Hex(), "to", st.msg.To().Hex(), "err", ErrSenderNoEOA.Error()) + if st.msg.To() != nil { + log.Error("Sender not an eoa", "from", st.msg.From().Hex(), "to", st.msg.To().Hex(), "err", ErrSenderNoEOA.Error()) + } else { + log.Error("Sender not an eoa", "from", st.msg.From().Hex(), "err", ErrSenderNoEOA.Error()) + } } return st.buyGas() }