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

order blocks stats after aspen hardfork rt one #2671

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

JakubFornadel
Copy link
Collaborator

@JakubFornadel JakubFornadel commented Jan 24, 2024

Purpose

Another solution would be to have both:

std::unordered_map<PbftPeriod, BlockStats> unordered_blocks_stats_;
std::map<PbftPeriod, BlockStats> ordered_blocks_stats_;

inside Stats class.

I would still need to use at least 1 lambda function + aspen hf would have to be checked inside multiple functions...
I prioritized this solution as it is simpler and to do extra sort on 100 items every 100th block does not affect performance...

How does the solution address the problem

Changes made

@JakubFornadel JakubFornadel force-pushed the fix_blocks_stats_ordering branch from 91b5f2f to 1c38032 Compare January 25, 2024 00:11
@JakubFornadel JakubFornadel force-pushed the fix_blocks_stats_ordering branch from 1c38032 to 01f71c4 Compare January 25, 2024 16:25
@JakubFornadel JakubFornadel force-pushed the fix_blocks_stats_ordering branch from 01f71c4 to 1800adf Compare January 25, 2024 16:29
@JakubFornadel JakubFornadel merged commit 75b0901 into develop Jan 25, 2024
1 check passed
@JakubFornadel JakubFornadel deleted the fix_blocks_stats_ordering branch January 25, 2024 18:08
@taraxadeploy
Copy link
Collaborator

prnet cleaned-up successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants