From bfba27dd079668ff899c4bc1c1a0ee614d8c2135 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 25 Jul 2025 10:34:28 +0800 Subject: [PATCH] guard create contract --- core/state/statedb.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/state/statedb.go b/core/state/statedb.go index e805885079..4d6911948a 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -656,6 +656,9 @@ func (s *StateDB) CreateAccount(addr common.Address) { // correctly handle EIP-6780 'delete-in-same-transaction' logic. func (s *StateDB) CreateContract(addr common.Address) { obj := s.getStateObject(addr) + if obj == nil { + return + } if !obj.newContract { obj.newContract = true s.journal.createContract(addr)