diff options
author | Howard Chu <hyc@symas.com> | 2017-08-19 19:36:51 +0100 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2017-08-20 16:30:28 +0100 |
commit | 9a859844f496158b8237bbd08ff0f608dc5a6385 (patch) | |
tree | 01b471ca8a5f334112bd777a10962853aedbffe3 /src/blockchain_db/blockchain_db.h | |
parent | DB cleanup (diff) | |
download | monero-9a859844f496158b8237bbd08ff0f608dc5a6385.tar.xz |
Toggle SAFE syncmode on and off automatically
If monerod is started with default sync mode, set it to SAFE after
synchronization completes. Set it back to FAST if synchronization
restarts (e.g. because another peer has a longer blockchain).
If monerod is started with an explicit sync mode, none of this
automation takes effect.
Diffstat (limited to 'src/blockchain_db/blockchain_db.h')
-rw-r--r-- | src/blockchain_db/blockchain_db.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 3efb8c3c3..ad246d85e 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -606,6 +606,13 @@ public: virtual void sync() = 0; /** + * @brief toggle safe syncs for the DB + * + * Used to switch DBF_SAFE on or off after starting up with DBF_FAST. + */ + virtual void safesyncmode(const bool onoff) = 0; + + /** * @brief Remove everything from the BlockchainDB * * This function should completely remove all data from a BlockchainDB. |