diff options
author | Florian Dold <florian.dold@gmail.com> | 2013-03-19 02:09:10 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2013-03-19 02:09:10 +0000 |
commit | de88db7fecd4651732563450070095a2309079b7 (patch) | |
tree | e732c2a10aa5fe1bcf149597394975c1ea4a0857 /src/include | |
parent | ca39427d26e560d3ca74580825e1635b1dae4166 (diff) | |
download | gnunet-de88db7fecd4651732563450070095a2309079b7.tar.gz gnunet-de88db7fecd4651732563450070095a2309079b7.zip |
fixed consensus for two peers, added log-rounds, started implementing freeze, multiple peers still buggy
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_consensus_service.h | 12 | ||||
-rw-r--r-- | src/include/gnunet_protocols.h | 19 |
2 files changed, 13 insertions, 18 deletions
diff --git a/src/include/gnunet_consensus_service.h b/src/include/gnunet_consensus_service.h index 4462144ea..f43cc1aa6 100644 --- a/src/include/gnunet_consensus_service.h +++ b/src/include/gnunet_consensus_service.h | |||
@@ -164,21 +164,12 @@ void | |||
164 | GNUNET_CONSENSUS_get_delta_cancel (struct GNUNET_CONSENSUS_DeltaRequest *dr); | 164 | GNUNET_CONSENSUS_get_delta_cancel (struct GNUNET_CONSENSUS_DeltaRequest *dr); |
165 | 165 | ||
166 | 166 | ||
167 | struct GNUNET_CONSENSUS_Group | ||
168 | { | ||
169 | unsigned int num_members; | ||
170 | uint64_t total_elements_in_group; | ||
171 | const struct GNUNET_PeerIdentity **members; | ||
172 | }; | ||
173 | |||
174 | |||
175 | /** | 167 | /** |
176 | * Called when a conclusion was successful. | 168 | * Called when a conclusion was successful. |
177 | * | 169 | * |
178 | * @param cls | 170 | * @param cls |
179 | * @param group | ||
180 | */ | 171 | */ |
181 | typedef void (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls, const struct GNUNET_CONSENSUS_Group *group); | 172 | typedef void (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls); |
182 | 173 | ||
183 | 174 | ||
184 | /** | 175 | /** |
@@ -194,7 +185,6 @@ typedef void (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls, const struct GNUNE | |||
194 | void | 185 | void |
195 | GNUNET_CONSENSUS_conclude (struct GNUNET_CONSENSUS_Handle *consensus, | 186 | GNUNET_CONSENSUS_conclude (struct GNUNET_CONSENSUS_Handle *consensus, |
196 | struct GNUNET_TIME_Relative timeout, | 187 | struct GNUNET_TIME_Relative timeout, |
197 | unsigned int min_group_size_in_consensus, | ||
198 | GNUNET_CONSENSUS_ConcludeCallback conclude, | 188 | GNUNET_CONSENSUS_ConcludeCallback conclude, |
199 | void *conclude_cls); | 189 | void *conclude_cls); |
200 | 190 | ||
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 1101359dd..dd655dd98 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -1726,19 +1726,24 @@ extern "C" | |||
1726 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ELEMENTS_REQUEST 544 | 1726 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ELEMENTS_REQUEST 544 |
1727 | 1727 | ||
1728 | /** | 1728 | /** |
1729 | * Elements that a peer misses locally. | ||
1730 | */ | ||
1731 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ELEMENTS_MISSING_LOCAL 545 | ||
1732 | |||
1733 | /** | ||
1734 | * Elements that a peer reports to be missing at the remote peer. | 1729 | * Elements that a peer reports to be missing at the remote peer. |
1735 | */ | 1730 | */ |
1736 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ELEMENTS_MISSING_REMOTE 546 | 1731 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ELEMENTS_REPORT 545 |
1737 | 1732 | ||
1738 | /* | 1733 | /* |
1739 | * Initialization message for consensus p2p communication. | 1734 | * Initialization message for consensus p2p communication. |
1740 | */ | 1735 | */ |
1741 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_HELLO 547 | 1736 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_HELLO 546 |
1737 | |||
1738 | /** | ||
1739 | * Report that the peer is synced with the partner after successfuly decoding the invertible bloom filter. | ||
1740 | */ | ||
1741 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_SYNCED 547 | ||
1742 | |||
1743 | /** | ||
1744 | * Interaction os over, got synched and reported all elements | ||
1745 | */ | ||
1746 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_FIN 548 | ||
1742 | 1747 | ||
1743 | 1748 | ||
1744 | /** | 1749 | /** |