From 6f62fb8301852be59401a7bec27396d1c22c766f Mon Sep 17 00:00:00 2001 From: Zach Kelling Date: Wed, 10 Dec 2025 18:59:17 -0800 Subject: [PATCH] fix(aggregated): use log package-level field functions Use log.Uint8, log.Bool, etc. as package-level field constructors instead of calling them as methods on the Logger instance. --- aggregated/signature_aggregator.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/aggregated/signature_aggregator.go b/aggregated/signature_aggregator.go index 2769877..038aba5 100644 --- a/aggregated/signature_aggregator.go +++ b/aggregated/signature_aggregator.go @@ -16,6 +16,14 @@ import ( "github.com/luxfi/crypto/bls" ) +// Import log field helpers +var ( + logUint8 = log.Uint8 + logUint64 = log.Uint64 + logBool = log.Bool + logString = log.String +) + // SignatureType represents the type of aggregated signature type SignatureType uint8 @@ -126,12 +134,12 @@ func NewSignatureAggregator(config SignatureConfig, log log.Logger) (*SignatureA sa.feeCollector = NewFeeCollector() log.Info("Signature aggregator initialized", - log.Uint8("preferredType", uint8(config.PreferredType)), - log.Bool("blsEnabled", config.EnableBLS), - log.Bool("coronaEnabled", config.EnableCorona), - log.Bool("cggmp21Enabled", config.EnableCGGMP21), - log.Uint64("blsFee", config.BLSFee), - log.Uint64("coronaFee", config.CoronaFee), + logUint8("preferredType", uint8(config.PreferredType)), + logBool("blsEnabled", config.EnableBLS), + logBool("coronaEnabled", config.EnableCorona), + logBool("cggmp21Enabled", config.EnableCGGMP21), + logUint64("blsFee", config.BLSFee), + logUint64("coronaFee", config.CoronaFee), ) return sa, nil