+ friend class log;
+ log l = {this, me};
+
+ 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);
+
+ void breakpoint1();
+ void breakpoint2();
+
+ public:
+ proposer_acceptor(paxos_change *delegate, bool _first, const node_t & _me, const value_t & _value);
+ unsigned instance() { return instance_h; }
+ const value_t & value(unsigned instance) { return values[instance]; }
+ string dump() { return l.dump(); }
+ void restore(const string &s) { l.restore(s); l.logread(); }
+ rpcs *get_rpcs() { return &pxs; }
+
+ bool run(unsigned instance, const nodes_t & cnodes, const value_t & v);
+ bool isrunning() { lock ml(proposer_mutex); return !stable; }
+ void breakpoint(int b);
+};