X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/ebd5aef6dc92accb509b1cc67eaf72159f35cdfa..3efa02fb3a9f0a0566a7f3c99a1efb94e30ea4a6:/paxos_protocol.h diff --git a/paxos_protocol.h b/paxos_protocol.h index 30a3d2c..3e1fbcd 100644 --- a/paxos_protocol.h +++ b/paxos_protocol.h @@ -12,20 +12,17 @@ struct prop_t { LEXICOGRAPHIC_COMPARISON(prop_t) }; -MARSHALLABLE_STRUCT(prop_t) - namespace paxos_protocol { enum status : rpc_protocol::status { OK, ERR }; struct prepareres { - bool oldinstance; - bool accept; + enum { reject, oldinstance, accept } type; prop_t n_a; string v_a; - MEMBERS(oldinstance, accept, n_a, v_a) + MEMBERS(type, n_a, v_a) }; using node_t = string; - using nodes_t = vector; + using nodes_t = std::vector; using value_t = string; REMOTE_PROCEDURE_BASE(0x11000); @@ -35,6 +32,4 @@ namespace paxos_protocol { REMOTE_PROCEDURE(4, heartbeat, (int &, string, unsigned)); } -MARSHALLABLE_STRUCT(paxos_protocol::prepareres) - #endif