eth/tracers/native: fix possible crash in prestate tracer #26351 (#1313)

This commit is contained in:
Daniel Liu 2025-09-09 09:52:13 +08:00 committed by GitHub
parent 2834be6131
commit dee4c985b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,7 +45,7 @@ type account struct {
}
func (a *account) exists() bool {
return a.Balance.Sign() != 0 || a.Nonce > 0 || len(a.Code) > 0 || len(a.Storage) > 0
return a.Nonce > 0 || len(a.Code) > 0 || len(a.Storage) > 0 || (a.Balance != nil && a.Balance.Sign() != 0)
}
type accountMarshaling struct {