Skip to content

Commit

Permalink
GH-641 Check max-reversible-blocks is not zero
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Aug 27, 2024
1 parent 15ae10f commit 03c79ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/producer_plugin/producer_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ producer_plugin_impl::start_block_result producer_plugin_impl::start_block() {
("ov", _last_other_vote_received.load(std::memory_order_relaxed))("bt", _accepted_block_time));
_pending_block_mode = pending_block_mode::speculating;
not_producing_when_time = true;
} else if (head_block_num - head.irreversible_blocknum() >= _max_reversible_blocks) {
} else if (_max_reversible_blocks > 0 && head_block_num - head.irreversible_blocknum() > _max_reversible_blocks) {
fc_elog(_log, "Not producing block because max-reversible-blocks ${m} reached, head ${h}, lib ${l}.",
("m", _max_reversible_blocks)("h", head_block_num)("l", head.irreversible_blocknum()));
_pending_block_mode = pending_block_mode::speculating;
Expand Down

0 comments on commit 03c79ec

Please sign in to comment.