diff --git a/signature-aggregator/aggregator/aggregator.go b/signature-aggregator/aggregator/aggregator.go index 6878a744..a284c224 100644 --- a/signature-aggregator/aggregator/aggregator.go +++ b/signature-aggregator/aggregator/aggregator.go @@ -601,7 +601,7 @@ func (s *SignatureAggregator) marshalRequest( justification []byte, sourceSubnet ids.ID, ) ([]byte, error) { - if !s.etnaTime.IsZero() && s.etnaTime.Before(time.Now()) { + if s.etnaActivated() { // Post-Etna case messageBytes, err := proto.Marshal( &sdk.SignatureRequest{ @@ -633,7 +633,7 @@ func (s *SignatureAggregator) marshalRequest( } func (s *SignatureAggregator) unmarshalResponse(responseBytes []byte) (blsSignatureBuf, error) { - if !s.etnaTime.IsZero() && s.etnaTime.Before(time.Now()) { + if s.etnaActivated() { // Post-Etna case var sigResponse sdk.SignatureResponse err := proto.Unmarshal(responseBytes, &sigResponse) @@ -651,3 +651,7 @@ func (s *SignatureAggregator) unmarshalResponse(responseBytes []byte) (blsSignat return sigResponse.Signature, nil } } + +func (s *SignatureAggregator) etnaActivated() bool { + return !s.etnaTime.IsZero() && s.etnaTime.Before(time.Now()) +} diff --git a/tests/utils/utils.go b/tests/utils/utils.go index 0ab69f80..70974a4b 100644 --- a/tests/utils/utils.go +++ b/tests/utils/utils.go @@ -228,7 +228,7 @@ func CreateDefaultSignatureAggregatorConfig( ) // Construct the config values for each subnet return signatureaggregatorcfg.Config{ - LogLevel: logging.Debug.LowerString(), + LogLevel: logging.Info.LowerString(), PChainAPI: &config.APIConfig{ BaseURL: sourceSubnetsInfo[0].NodeURIs[0], },