From fa97788c757a07c0dd038db5ef1a05ee9158e2e6 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 13 Dec 2022 08:32:29 -0500 Subject: [PATCH] eth/tracers/native: fix possible crash in prestate tracer (#26351) --- eth/tracers/native/prestate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/tracers/native/prestate.go b/eth/tracers/native/prestate.go index 9313d07690..10008699bd 100644 --- a/eth/tracers/native/prestate.go +++ b/eth/tracers/native/prestate.go @@ -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 {