revert requestor logic in message_handlers.py
Because primary node will not contains PrePrepare in sentPrePrepares, only in getPrePrepare
@@ -131,7 +131,8 @@ class PreprepareHandler(BaseHandler):
return pp
def requestor(self, params: Dict[str, Any]) -> Optional[PrePrepare]:
- return self.node.replicas[params['inst_id']].sentPrePrepares(
+ if self.node.replicas[params['inst_id']].isPrimary:
+ return self.node.replicas[params['inst_id']].getPrePrepare(
params['view_no'], params['pp_seq_no'])
def processor(self, validated_msg: PrePrepare, params: Dict[str, Any], frm: str) -> None:
