Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
iansuvak committed Sep 5, 2024
1 parent 2ba7b61 commit 576a375
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions signature-aggregator/aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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)
Expand All @@ -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())
}
2 changes: 1 addition & 1 deletion tests/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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],
},
Expand Down

0 comments on commit 576a375

Please sign in to comment.