diff --git a/libraries/chain/db_maint.cpp b/libraries/chain/db_maint.cpp index b88111ec..962aeec1 100644 --- a/libraries/chain/db_maint.cpp +++ b/libraries/chain/db_maint.cpp @@ -130,7 +130,11 @@ void database::pay_workers( share_type& budget ) void database::update_active_witnesses() { try { assert( _witness_count_histogram_buffer.size() > 0 ); - share_type stake_target = _total_voting_stake / 2; + share_type stake_target = (_total_voting_stake-_witness_count_histogram_buffer[0]) / 2; + +#warning HARDFORK - remove this code after Oct 2 testnet is over. + if( head_block_time() < fc::time_point_sec(1443900665) ) + stake_target = _total_voting_stake/2; /// accounts that vote for 0 or 1 witness do not get to express an opinion on /// the number of witnesses to have (they abstain and are non-voting accounts) @@ -211,7 +215,13 @@ void database::update_active_witnesses() void database::update_active_committee_members() { try { assert( _committee_count_histogram_buffer.size() > 0 ); - uint64_t stake_target = _total_voting_stake / 2; + share_type stake_target = (_total_voting_stake-_witness_count_histogram_buffer[0]) / 2; + +#warning HARDFORK - remove this code after Oct 2 testnet is over. + if( head_block_time() < fc::time_point_sec(1443900665) ) + stake_target = _total_voting_stake/2; + + /// accounts that vote for 0 or 1 witness do not get to express an opinion on /// the number of witnesses to have (they abstain and are non-voting accounts) uint64_t stake_tally = 0; // _committee_count_histogram_buffer[0];