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

core: sync database based on bytes added, not blocks added #4204

Merged
merged 1 commit into from
Aug 23, 2018

Conversation

moneromooo-monero
Copy link
Collaborator

Blocks have a very wide range, whereas actual size is the relevant
quantity to consider when syncing

@@ -3877,11 +3877,13 @@ bool Blockchain::cleanup_handle_incoming_blocks(bool force_sync)
store_blockchain();
m_sync_counter = 0;
}
else if (m_db_blocks_per_sync && m_sync_counter >= m_db_blocks_per_sync)
else if ((m_db_sync_on_blocks && m_sync_counter >= m_db_sync_threshold) || (!m_db_sync_on_blocks && m_bytes_to_sync >= m_db_sync_threshold))
Copy link
Contributor

Choose a reason for hiding this comment

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

Since m_db_blocks_per_sync is now named as m_db_sync_threshold , shouldn't this if statement also check for m_db_sync_threshold && (...) in order to preserve the logic?

Blocks have a very wide range, whereas actual size is the relevant
quantity to consider when syncing
@moneromooo-monero
Copy link
Collaborator Author

I just bumped the default by 2.5, 300 MB is not that large and better performance.

@luigi1111 luigi1111 merged commit b278b83 into monero-project:master Aug 23, 2018
luigi1111 added a commit that referenced this pull request Aug 23, 2018
b278b83 core: sync database based on bytes added, not blocks added (moneromooo-monero)
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.

3 participants