Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add etnaActivationTime #2373

Merged
merged 7 commits into from
Nov 25, 2024
Merged

add etnaActivationTime #2373

merged 7 commits into from
Nov 25, 2024

Conversation

arturrez
Copy link
Collaborator

@arturrez arturrez commented Nov 25, 2024

Why this should be merged

provides correct etna activation time for devnet and fuji

How this works

uses map and default 0,0 value

How this was tested

e2e + regulat etna flow PoA/PoS

How is this documented

n/a

@arturrez arturrez requested a review from a team as a code owner November 25, 2024 20:28
@@ -153,7 +153,11 @@ func NewSignatureAggregator(
logging.JSON.ConsoleEncoder(),
),
)
return initSignatureAggregator(peerNetwork, logger, registerer, subnetID, quorumPercentage)
etnaTime := time.Unix(0, 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should use time.Unix(0,0) at all here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since IsZero() returns false for that time. Instead we should just use the default time.Time

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree. much better way. fixed

Comment on lines 156 to 159
etnaTime := time.Unix(0, 0)
if t, ok := constants.EtnaActivationTime[network.ID]; ok {
etnaTime = t
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
etnaTime := time.Unix(0, 0)
if t, ok := constants.EtnaActivationTime[network.ID]; ok {
etnaTime = t
}
etnaTime := constants.EtnaActivationTime[network.ID]

This will use a default (i.e. zero) time.Time instance if the key is not in the map

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totally agree. fixed

@sukantoraymond sukantoraymond merged commit df2d5e2 into main Nov 25, 2024
33 of 35 checks passed
@sukantoraymond sukantoraymond deleted the etna-activation-map branch November 25, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants