fix set_node_state in PrePrepare reordering
@@ -861,9 +861,6 @@ class OrderingService:
self._timer.schedule(delay, func)
def _process_valid_preprepare(self, pre_prepare: PrePrepare, sender: str):
- if self._is_the_last_old_preprepare(pre_prepare.ppSeqNo):
- self._write_manager.future_primary_handler.set_node_state()
-
why_not_applied = None
# apply and validate applied PrePrepare if it's not odered yet
if not self._validator.has_already_ordered(pre_prepare.viewNo, pre_prepare.ppSeqNo):
@@ -878,6 +875,10 @@ class OrderingService:
else:
self._add_to_pre_prepares(pre_prepare)
+ if self._is_the_last_old_preprepare(pre_prepare.ppSeqNo):
+ self._write_manager.future_primary_handler.set_node_state()
+
+
return None
def _apply_and_validate_applied_pre_prepare(self, pre_prepare: PrePrepare, sender: str):
