forked from DecentralizedClimateFoundation/DCIPs
16 lines
816 B
Diff
16 lines
816 B
Diff
|
diff --git a/core/state_transition.go b/core/state_transition.go
|
||
|
index 18777d8d4..3b25155c6 100644
|
||
|
--- a/core/state_transition.go
|
||
|
+++ b/core/state_transition.go
|
||
|
@@ -219,6 +219,11 @@ func (st *StateTransition) preCheck() error {
|
||
|
st.msg.From().Hex(), msgNonce, stNonce)
|
||
|
}
|
||
|
}
|
||
|
+ // Make sure the sender is an EOA
|
||
|
+ if codeHash := st.state.GetCodeHash(st.msg.From()); codeHash != emptyCodeHash {
|
||
|
+ return fmt.Errorf("%w: address %v, codehash: %s", ErrSenderNoEOA,
|
||
|
+ st.msg.From().Hex(), codeHash)
|
||
|
+ }
|
||
|
// Make sure that transaction feeCap is greater than the baseFee (post london)
|
||
|
if st.evm.ChainConfig().IsLondon(st.evm.Context.BlockNumber) {
|
||
|
if l := st.feeCap.BitLen(); l > 256 {
|