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.
This commit is contained in:
@@ -1318,6 +1318,11 @@ void BlockchainLMDB::sync()
|
||||
}
|
||||
}
|
||||
|
||||
void BlockchainLMDB::safesyncmode(const bool onoff)
|
||||
{
|
||||
mdb_env_set_flags(m_env, MDB_NOSYNC|MDB_MAPASYNC, !onoff);
|
||||
}
|
||||
|
||||
void BlockchainLMDB::reset()
|
||||
{
|
||||
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
|
||||
|
||||
Reference in New Issue
Block a user