Skip to content

Commit

Permalink
Merge pull request #336 from pmconrad/issue_303
Browse files Browse the repository at this point in the history
Partial fix for issue 303
  • Loading branch information
oxarbitrage authored and yoyowd committed Nov 25, 2017
1 parent 0bcad4d commit eed5d13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions libraries/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,10 @@ void application::shutdown()
if( my->_p2p_network )
my->_p2p_network->close();
if( my->_chain_db )
{
my->_chain_db->close();
my->_chain_db = nullptr;
}
}

void application::initialize_plugins( const boost::program_options::variables_map& options )
Expand Down
1 change: 1 addition & 0 deletions libraries/chain/db_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ void database::close(bool rewind)
{
uint32_t cutoff = get_dynamic_global_properties().last_irreversible_block_num;

ilog( "Rewinding from ${head} to ${cutoff}", ("head",head_block_num())("cutoff",cutoff) );
while( head_block_num() > cutoff )
{
// elog("pop");
Expand Down
3 changes: 0 additions & 3 deletions tests/common/database_fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ database_fixture::~database_fixture()
verify_account_history_plugin_index();
BOOST_CHECK( db.get_node_properties().skip_flags == database::skip_nothing );
}

if( data_dir )
db.close();
return;
} FC_CAPTURE_AND_RETHROW() }

Expand Down

0 comments on commit eed5d13

Please sign in to comment.