public int nextProposalNumber(int PID,int cur_Pnum){
    int i=0;
    while(true){
      if(i<=cur_Pnum)
        i++;
      else{
        if(i%network.numProposers()==PID)
          return i;
        else
          i++;
      }
      if(i==MAX_PROPNUM)
        return -1;
    }
  }