So many changes. Broken.
[invirt/third/libt4.git] / include / paxos_protocol.h
similarity index 83%
rename from paxos_protocol.h
rename to include/paxos_protocol.h
index 3e1fbcd..f3c50e2 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef paxos_protocol_h
 #define paxos_protocol_h
 
-#include "types.h"
-#include "rpc/rpc.h"
+#include "include/types.h"
+#include "include/rpc/rpc.h"
 
 struct prop_t {
     unsigned n;
@@ -23,13 +23,14 @@ namespace paxos_protocol {
     };
     using node_t = string;
     using nodes_t = std::vector<node_t>;
+    using view_t = unsigned;
     using value_t = string;
 
     REMOTE_PROCEDURE_BASE(0x11000);
     REMOTE_PROCEDURE(1, preparereq, (prepareres &, node_t, unsigned, prop_t));
     REMOTE_PROCEDURE(2, acceptreq, (bool &, node_t, unsigned, prop_t, value_t));
     REMOTE_PROCEDURE(3, decidereq, (int &, node_t, unsigned, value_t));
-    REMOTE_PROCEDURE(4, heartbeat, (int &, string, unsigned));
+    REMOTE_PROCEDURE(4, heartbeat, (view_t &, string, view_t));
 }
 
 #endif