From a6198dab39362223656839fe94ff202ad99a88f3 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Wed, 15 Nov 2023 18:05:16 +0800 Subject: [PATCH] make big.Int/uint256.Int nil value be formatted as 'nil', not '' --- log/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log/handler.go b/log/handler.go index 97f3224511..1f28f8c264 100644 --- a/log/handler.go +++ b/log/handler.go @@ -188,13 +188,13 @@ func builtinReplace(_ []string, attr slog.Attr) slog.Attr { attr = slog.Any(attr.Key, v.Format(timeFormat)) case *big.Int: if v == nil { - attr.Value = slog.StringValue("") + attr.Value = slog.StringValue("nil") } else { attr.Value = slog.StringValue(v.String()) } case *uint256.Int: if v == nil { - attr.Value = slog.StringValue("") + attr.Value = slog.StringValue("nil") } else { attr.Value = slog.StringValue(v.Dec()) }