Skip to content

Conversation

moneromooo-monero
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@0xFFFC0000 0xFFFC0000 left a comment

Choose a reason for hiding this comment

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

Other than one thing I didn't fully comprehend. All the other parts are correct.

{
const size_t rmsize = m_long_term_block_weights_cache_rolling_median.size();
if (count == rmsize || (count == rmsize + 1 && rmsize < CRYPTONOTE_LONG_TERM_BLOCK_WEIGHT_WINDOW_SIZE))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was reviewing this PR. All the other parts are okay and makes sense to me.

The only part I don't comprehend is (count == rmsize + 1 && rmsize < CRYPTONOTE_LONG_TERM_BLOCK_WEIGHT_WINDOW_SIZE) .

What is purpose of this added condition?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It matches the incremental case when the history has not yet reached CRYPTONOTE_LONG_TERM_BLOCK_WEIGHT_WINDOW_SIZE blocks. Since Monero is already past that, it could be removed.

Copy link
Collaborator

@0xFFFC0000 0xFFFC0000 left a comment

Choose a reason for hiding this comment

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

LGTM

@luigi1111 luigi1111 merged commit 1122fa5 into monero-project:master Dec 23, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants