From bc0313a8b64a987de35bc0a14d9bdc5442d9e3ca Mon Sep 17 00:00:00 2001 From: Chris Gundlach Date: Fri, 13 May 2022 09:16:44 -0500 Subject: [PATCH] cleaned up handling of failed startup from snapshot --- libraries/chain/controller.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index f83102d540..ede753ac28 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -571,12 +571,12 @@ struct controller_impl { ilog( "database initialized with hash: ${hash}", ("hash", hash) ); init(check_shutdown); + ilog( "Finished initialization from snapshot" ); } catch (boost::interprocess::bad_alloc& e) { - elog( "db storage not configured to have enough storage for the provided snapshot, please increase and retry snapshot" ); - throw e; + elog( "Failed initialization from snapshot - db storage not configured to have enough storage for the provided snapshot, please increase and retry snapshot" ); + shutdown(); } - ilog( "Finished initialization from snapshot" ); } void startup(std::function shutdown, std::function check_shutdown, const genesis_state& genesis) {