fix _validate_3pc()
@@ -122,7 +122,11 @@ class OrderingServiceMsgValidator:
if pp_seq_no is not None and pp_seq_no > self._data.high_watermark:
return STASH_WATERMARKS, OUTSIDE_WATERMARKS
- if self._data.prev_view_prepare_cert is None and self.has_already_ordered(view_no, pp_seq_no):
+ # Allow re-order already ordered if we are re-ordering in new view
+ # (below prepared certificate from the previous view).
+ if self.has_already_ordered(view_no, pp_seq_no):
+ if self._data.prev_view_prepare_cert is None or (
+ self._data.prev_view_prepare_cert is not None and pp_seq_no > self._data.prev_view_prepare_cert):
return DISCARD, ALREADY_ORDERED
# PROCESS
