mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user