- // Proposer state
- bool stable;
- prop_t my_n; // number of the last proposal used in this instance
-
- void setn();
- bool prepare(unsigned instance, std::vector<std::string> & accepts,
- const std::vector<std::string> & nodes,
- std::string & v);
- void accept(unsigned instance, std::vector<std::string> & accepts,
- const std::vector<std::string> & nodes, const std::string & v);
- void decide(unsigned instance, const std::vector<std::string> & accepts,
- const std::string & v);
+ void commit(unsigned instance, const value_t & v);
+ void commit(unsigned instance, const value_t & v, lock & pxs_mutex_lock);
+
+ paxos_protocol::status preparereq(prepareres & r, const node_t & src, unsigned instance, prop_t n);
+ paxos_protocol::status acceptreq(bool & r, const node_t & src, unsigned instance, prop_t n, const value_t & v);
+ paxos_protocol::status decidereq(int & r, const node_t & src, unsigned instance, const value_t & v);
+
+ bool prepare(unsigned instance, nodes_t & accepts, const nodes_t & nodes, value_t & v);
+ void accept(unsigned instance, nodes_t & accepts, const nodes_t & nodes, const value_t & v);
+ void decide(unsigned instance, const nodes_t & accepts, const value_t & v);