core/state: fix panic in state dumping #22225 (#1202)

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
Daniel Liu 2025-08-21 13:37:51 +08:00 committed by GitHub
parent 06d94520ba
commit da624be994
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,7 +138,7 @@ func (s *StateDB) DumpToCollector(c DumpCollector, excludeCode, excludeStorage,
account.SecureKey = it.Key
}
addr := common.BytesToAddress(addrBytes)
obj := newObject(nil, addr, data)
obj := newObject(s, addr, data)
if !excludeCode {
account.Code = common.Bytes2Hex(obj.Code(s.db))
}