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.
This commit is contained in:
Zach Kelling
2025-12-10 18:59:17 -08:00
parent 1760ba5f50
commit 6f62fb8301
+14 -6
View File
@@ -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