static void proposer_handle_prepare_ack(struct evproposer* p, prepare_ack* ack) { prepare_req pr; int preempted = proposer_receive_prepare_ack(p->state, ack, &pr); if (preempted) send_prepares(p, &pr); }
/*proposer对prepare ack的处理和响应*/ static void proposer_handle_prepare_ack(struct evproposer* p, prepare_ack* ack) { prepare_req pr; if(proposer_receive_prepare_ack(p->state, ack, &pr)) /*对prepare ack的响应处理,判断返回值是否是需要重新发起第一阶段*/ send_prepares(p, &pr); }