Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Clean up code to fix build warning #5955

Merged
merged 2 commits into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion libraries/chain/include/eosio/chain/controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ namespace eosio { namespace chain {
const account_object& get_account( account_name n )const;
const global_property_object& get_global_properties()const;
const dynamic_global_property_object& get_dynamic_global_properties()const;
const permission_object& get_permission( const permission_level& level )const;
const resource_limits_manager& get_resource_limits_manager()const;
resource_limits_manager& get_mutable_resource_limits_manager();
const authorization_manager& get_authorization_manager()const;
Expand Down
16 changes: 9 additions & 7 deletions plugins/producer_plugin/producer_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1357,15 +1357,17 @@ bool producer_plugin_impl::maybe_produce_block() {
});

try {
produce_block();
return true;
} catch ( const guard_exception& e ) {
app().get_plugin<chain_plugin>().handle_guard_exception(e);
return false;
} catch ( boost::interprocess::bad_alloc& ) {
try {
produce_block();
return true;
} catch ( const guard_exception& e ) {
app().get_plugin<chain_plugin>().handle_guard_exception(e);
return false;
} FC_LOG_AND_DROP();
} catch ( boost::interprocess::bad_alloc&) {
raise(SIGUSR1);
return false;
} FC_LOG_AND_DROP();
}

fc_dlog(_log, "Aborting block due to produce_block error");
chain::controller& chain = app().get_plugin<chain_plugin>().chain();
Expand Down