Skip to content

Commit 32d2b4b

Browse files
authored
Merge pull request #233 from eosnetworkfoundation/fix_exit_on_db_smaller_than_snapshot
cleaned up handling of failed startup from snapshot
2 parents c8bad63 + bc0313a commit 32d2b4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/chain/controller.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,12 @@ struct controller_impl {
569569
ilog( "database initialized with hash: ${hash}", ("hash", hash) );
570570

571571
init(check_shutdown);
572+
ilog( "Finished initialization from snapshot" );
572573
} catch (boost::interprocess::bad_alloc& e) {
573-
elog( "db storage not configured to have enough storage for the provided snapshot, please increase and retry snapshot" );
574-
throw e;
574+
elog( "Failed initialization from snapshot - db storage not configured to have enough storage for the provided snapshot, please increase and retry snapshot" );
575+
shutdown();
575576
}
576577

577-
ilog( "Finished initialization from snapshot" );
578578
}
579579

580580
void startup(std::function<void()> shutdown, std::function<bool()> check_shutdown, const genesis_state& genesis) {

0 commit comments

Comments
 (0)