Skip to content

Commit

Permalink
Merge pull request steemit#2393 from steemit/2205-fix-set_block_produ…
Browse files Browse the repository at this point in the history
…ction-call

change moment of p2p::set_block_production call in witness plugin
  • Loading branch information
Michael Vandeberg authored May 4, 2018
2 parents 10fce46 + 4bff5d5 commit df9206b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libraries/plugins/witness/witness_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,6 @@ void witness_plugin::plugin_initialize(const boost::program_options::variables_m
add_plugin_index< account_bandwidth_index >( my->_db );
add_plugin_index< reserve_ratio_index >( my->_db );

appbase::app().get_plugin< steem::plugins::p2p::p2p_plugin >().set_block_production( true );

if( my->_witnesses.size() && my->_private_keys.size() )
my->_chain_plugin.set_write_lock_hold_time( -1 );
} FC_LOG_AND_RETHROW() }
Expand All @@ -608,6 +606,7 @@ void witness_plugin::plugin_startup()
if( !my->_witnesses.empty() )
{
ilog( "Launching block production for ${n} witnesses.", ("n", my->_witnesses.size()) );
appbase::app().get_plugin< steem::plugins::p2p::p2p_plugin >().set_block_production( true );
if( my->_production_enabled )
{
if( d.head_block_num() == 0 )
Expand Down

0 comments on commit df9206b

Please sign in to comment.