aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index a7f6ca36c..c406dd0b4 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -322,7 +322,7 @@ namespace cryptonote
const std::string filename = folder.string();
// default to fast:async:1
- blockchain_db_sync_mode sync_mode = db_async;
+ blockchain_db_sync_mode sync_mode = db_defaultsync;
uint64_t blocks_per_sync = 1;
try
@@ -355,11 +355,15 @@ namespace cryptonote
sync_mode = db_nosync;
}
else if(options[0] == "fast")
+ {
db_flags = DBF_FAST;
+ sync_mode = db_async;
+ }
else if(options[0] == "fastest")
{
db_flags = DBF_FASTEST;
blocks_per_sync = 1000; // default to fastest:async:1000
+ sync_mode = db_async;
}
else
db_flags = DEFAULT_FLAGS;
@@ -1039,6 +1043,11 @@ namespace cryptonote
m_miner.on_synchronized();
}
//-----------------------------------------------------------------------------------------------
+ void core::safesyncmode(const bool onoff)
+ {
+ m_blockchain_storage.safesyncmode(onoff);
+ }
+ //-----------------------------------------------------------------------------------------------
bool core::add_new_block(const block& b, block_verification_context& bvc)
{
return m_blockchain_storage.add_new_block(b, bvc);