message: Removed duplicate code and corrected block number tracking for Pull Request changes. GH
diff: @@ -226,7 +226,7 @@ class producer_plugin_impl : public std::enable_shared_from_this<producer_plugin
  }
  for (const auto& new_producer: new_producers) {
  - _producer_watermarks[new_producer] = hbn + 1;
  + _producer_watermarks[new_producer] = hbn;
  }
  }
  }
  @@ -1115,23 +1115,6 @@ void producer_plugin_impl::produce_block() {
  //idump((fc::time_point::now() - hbt));
  block_state_ptr new_bs = chain.head_block_state();
  - // for newly installed producers we can set their watermarks to the block they became
  - if (hbs->active_schedule.version != new_bs->active_schedule.version) {
  - flat_set<account_name> new_producers;
  - new_producers.reserve(new_bs->active_schedule.producers.size());
  - for( const auto& p: new_bs->active_schedule.producers) {
  - if (_producers.count(p.producer_name) > 0)
  - new_producers.insert(p.producer_name);
  - }
  -
  - for( const auto& p: hbs->active_schedule.producers) {
  - new_producers.erase(p.producer_name);
  - }
  -
  - for (const auto& new_producer: new_producers) {
  - _producer_watermarks[new_producer] = chain.head_block_num();
  - }
  - }
  _producer_watermarks[new_bs->header.producer] = chain.head_block_num();
  ilog("Produced block ${id}... #${n} @ ${t} signed by ${p} [trxs: ${count}, lib: ${lib}, confirmed: ${confs}]",
  