diff --git a/libdevcore/DBFactory.cpp b/libdevcore/DBFactory.cpp index 54b391ef4..1d2e95f85 100644 --- a/libdevcore/DBFactory.cpp +++ b/libdevcore/DBFactory.cpp @@ -140,8 +140,9 @@ std::unique_ptr< DatabaseFace > DBFactory::createHistoric( DatabaseKind _kind, fs::path const& _path ) { switch ( _kind ) { case DatabaseKind::LevelDB: - return std::unique_ptr< DatabaseFace >( new LevelDB( _path, LevelDB::defaultReadOptions(), - LevelDB::defaultWriteOptions(), LevelDB::defaultDBOptions(), s_reopenPeriodMs ) ); + return std::unique_ptr< DatabaseFace >( + new LevelDB( _path, LevelDB::defaultSnapshotReadOptions(), + LevelDB::defaultWriteOptions(), LevelDB::defaultDBOptions(), s_reopenPeriodMs ) ); break; default: assert( false ); diff --git a/libethereum/Client.cpp b/libethereum/Client.cpp index faf04ec7d..46fd4f568 100644 --- a/libethereum/Client.cpp +++ b/libethereum/Client.cpp @@ -255,6 +255,7 @@ void Client::initStateFromDiskOrGenesis() { m_state.mutableHistoricState().db().setCommitOnEveryInsert( true ); m_state.populateHistoricStateFromSkaleState(); m_state.mutableHistoricState().db().setCommitOnEveryInsert( false ); + exit( 0 ); } #endif } diff --git a/libskale/State.cpp b/libskale/State.cpp index 405eb2c69..3c26b3e58 100644 --- a/libskale/State.cpp +++ b/libskale/State.cpp @@ -222,7 +222,8 @@ skale::OverlayDB State::openDB( fs::path state_path = path / fs::path( "state" ); try { - m_orig_db.reset( new db::DBImpl( state_path ) ); + m_orig_db.reset( new db::DBImpl( state_path, dev::db::LevelDB::defaultSnapshotReadOptions(), + dev::db::LevelDB::defaultWriteOptions(), dev::db::LevelDB::defaultDBOptions() ) ); std::unique_ptr< batched_io::batched_db > bdb = make_unique< batched_io::batched_db >(); bdb->open( m_orig_db ); assert( bdb->is_open() );