projects
/
invirt/third/libt4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Working on g++ compatibility
[invirt/third/libt4.git]
/
paxos.h
diff --git
a/paxos.h
b/paxos.h
index
426dfef
..
db18e6c
100644
(file)
--- a/
paxos.h
+++ b/
paxos.h
@@
-7,10
+7,9
@@
#include "log.h"
using prepareres = paxos_protocol::prepareres;
#include "log.h"
using prepareres = paxos_protocol::prepareres;
-
-using node_t = string;
-using nodes_t = vector<node_t>;
-using value_t = string;
+using node_t = paxos_protocol::node_t;
+using nodes_t = paxos_protocol::nodes_t;
+using value_t = paxos_protocol::value_t;
class paxos_change {
public:
class paxos_change {
public:
@@
-29,7
+28,7
@@
class proposer_acceptor {
paxos_change *delegate;
node_t me;
paxos_change *delegate;
node_t me;
- rpcs pxs = {(uint32_t)std::stoi(me)};
+ rpcs pxs{(in_port_t)stoi(me)};
bool break1 = false;
bool break2 = false;
bool break1 = false;
bool break2 = false;
@@
-46,7
+45,7
@@
class proposer_acceptor {
map<unsigned,value_t> values; // vals of each instance
friend class log;
map<unsigned,value_t> values; // vals of each instance
friend class log;
- log l = {this, me};
+ class log l = {this, me};
void commit(unsigned instance, const value_t & v);
void commit(unsigned instance, const value_t & v, lock & pxs_mutex_lock);
void commit(unsigned instance, const value_t & v);
void commit(unsigned instance, const value_t & v, lock & pxs_mutex_lock);