aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.h
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-08-22 20:43:51 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-08-22 20:43:51 -0500
commit4a4ea78ecd753e1ab6be7309ab549417d8d84d6d (patch)
treedab9aa6e74b8d9419f621d246b9399e7f6390742 /src/cryptonote_core/blockchain.h
parentMerge pull request #4202 (diff)
parentcore: sync database based on bytes added, not blocks added (diff)
downloadmonero-4a4ea78ecd753e1ab6be7309ab549417d8d84d6d.tar.xz
Merge pull request #4204
b278b83 core: sync database based on bytes added, not blocks added (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r--src/cryptonote_core/blockchain.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h
index 238867c18..2292ffbf3 100644
--- a/src/cryptonote_core/blockchain.h
+++ b/src/cryptonote_core/blockchain.h
@@ -729,11 +729,12 @@ namespace cryptonote
* @brief sets various performance options
*
* @param maxthreads max number of threads when preparing blocks for addition
- * @param blocks_per_sync number of blocks to cache before syncing to database
+ * @param sync_on_blocks whether to sync based on blocks or bytes
+ * @param sync_threshold number of blocks/bytes to cache before syncing to database
* @param sync_mode the ::blockchain_db_sync_mode to use
* @param fast_sync sync using built-in block hashes as trusted
*/
- void set_user_options(uint64_t maxthreads, uint64_t blocks_per_sync,
+ void set_user_options(uint64_t maxthreads, bool sync_on_blocks, uint64_t sync_threshold,
blockchain_db_sync_mode sync_mode, bool fast_sync);
/**
@@ -1017,11 +1018,13 @@ namespace cryptonote
bool m_fast_sync;
bool m_show_time_stats;
bool m_db_default_sync;
- uint64_t m_db_blocks_per_sync;
+ bool m_db_sync_on_blocks;
+ uint64_t m_db_sync_threshold;
uint64_t m_max_prepare_blocks_threads;
uint64_t m_fake_pow_calc_time;
uint64_t m_fake_scan_time;
uint64_t m_sync_counter;
+ uint64_t m_bytes_to_sync;
std::vector<uint64_t> m_timestamps;
std::vector<difficulty_type> m_difficulties;
uint64_t m_timestamps_and_difficulties_height;