aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/gnunet/voting/BallotTool.java
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2014-04-07 00:26:06 +0000
committerFlorian Dold <florian.dold@gmail.com>2014-04-07 00:26:06 +0000
commitd33161cddda663720ea93c483ed6e3e7511e995b (patch)
tree7413b2aace2d2673e083369b22126d731a8fabaf /src/main/java/org/gnunet/voting/BallotTool.java
parenta5a49ee6c7e87b0fb8abae6127713e8ef3c38edb (diff)
downloadgnunet-java-d33161cddda663720ea93c483ed6e3e7511e995b.tar.gz
gnunet-java-d33161cddda663720ea93c483ed6e3e7511e995b.zip
docs / fixed fixme in crypto
Diffstat (limited to 'src/main/java/org/gnunet/voting/BallotTool.java')
-rw-r--r--src/main/java/org/gnunet/voting/BallotTool.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/org/gnunet/voting/BallotTool.java b/src/main/java/org/gnunet/voting/BallotTool.java
index f5b4009..05b8e5a 100644
--- a/src/main/java/org/gnunet/voting/BallotTool.java
+++ b/src/main/java/org/gnunet/voting/BallotTool.java
@@ -28,7 +28,7 @@ import org.gnunet.identity.Identity;
28import org.gnunet.identity.IdentityCallback; 28import org.gnunet.identity.IdentityCallback;
29import org.gnunet.mesh.Mesh; 29import org.gnunet.mesh.Mesh;
30import org.gnunet.mesh.MeshRunabout; 30import org.gnunet.mesh.MeshRunabout;
31import org.gnunet.mesh.TunnelEndHandler; 31import org.gnunet.mesh.ChannelEndHandler;
32import org.gnunet.secretsharing.ThresholdPublicKey; 32import org.gnunet.secretsharing.ThresholdPublicKey;
33import org.gnunet.testbed.CompressedConfig; 33import org.gnunet.testbed.CompressedConfig;
34import org.gnunet.util.*; 34import org.gnunet.util.*;
@@ -161,7 +161,7 @@ public class BallotTool extends Program {
161 161
162 private RelativeTime tunnelReconnectBackoff = RelativeTime.STD_BACKOFF; 162 private RelativeTime tunnelReconnectBackoff = RelativeTime.STD_BACKOFF;
163 163
164 public class BallotTunnelEndHandler implements TunnelEndHandler { 164 public class BallotChannelEndHandler implements ChannelEndHandler {
165 @Override 165 @Override
166 public void onChannelEnd(final Mesh.Channel channel) { 166 public void onChannelEnd(final Mesh.Channel channel) {
167 // FIXME: just re-running 'doCommands' is a bit of a hack 167 // FIXME: just re-running 'doCommands' is a bit of a hack
@@ -320,8 +320,8 @@ public class BallotTool extends Program {
320 Random r = new Random(); 320 Random r = new Random();
321 currentAuthority = remainingAuthorities.get(r.nextInt(remainingAuthorities.size())); 321 currentAuthority = remainingAuthorities.get(r.nextInt(remainingAuthorities.size()));
322 System.out.println("registering ballot with authority " + currentAuthority.toString()); 322 System.out.println("registering ballot with authority " + currentAuthority.toString());
323 mesh = new Mesh(getConfiguration(), new BallotTunnelEndHandler(), new BallotRegisterReceiver()); 323 mesh = new Mesh(getConfiguration(), new BallotChannelEndHandler(), new BallotRegisterReceiver());
324 channel = mesh.createTunnel(currentAuthority, TallyAuthorityDaemon.MESH_PORT, true, true); 324 channel = mesh.createChannel(currentAuthority, TallyAuthorityDaemon.MESH_PORT, true, true);
325 BallotRegisterRequestMessage m = new BallotRegisterRequestMessage(); 325 BallotRegisterRequestMessage m = new BallotRegisterRequestMessage();
326 CompressedConfig ccfg = new CompressedConfig(ballot.toConfiguration()); 326 CompressedConfig ccfg = new CompressedConfig(ballot.toConfiguration());
327 m.compressedBallotConfig = ccfg.compressedData; 327 m.compressedBallotConfig = ccfg.compressedData;
@@ -365,8 +365,8 @@ public class BallotTool extends Program {
365 PeerIdentity authority = remainingAuthorities.get(r.nextInt(remainingAuthorities.size())); 365 PeerIdentity authority = remainingAuthorities.get(r.nextInt(remainingAuthorities.size()));
366 System.out.println("submitting to authority " + authority.toString()); 366 System.out.println("submitting to authority " + authority.toString());
367 currentAuthority = authority; 367 currentAuthority = authority;
368 mesh = new Mesh(cfg, new BallotTunnelEndHandler(), new SubmitReceiver()); 368 mesh = new Mesh(cfg, new BallotChannelEndHandler(), new SubmitReceiver());
369 channel = mesh.createTunnel(authority, TallyAuthorityDaemon.MESH_PORT, true, true, null); 369 channel = mesh.createChannel(authority, TallyAuthorityDaemon.MESH_PORT, true, true);
370 SubmitMessage m = new SubmitMessage(); 370 SubmitMessage m = new SubmitMessage();
371 if (ballot.voterPub == null) { 371 if (ballot.voterPub == null) {
372 throw new InvalidBallotException("no voter in ballot"); 372 throw new InvalidBallotException("no voter in ballot");
@@ -399,8 +399,8 @@ public class BallotTool extends Program {
399 Random r = new Random(); 399 Random r = new Random();
400 currentAuthority = remainingAuthorities.get(r.nextInt(remainingAuthorities.size())); 400 currentAuthority = remainingAuthorities.get(r.nextInt(remainingAuthorities.size()));
401 System.out.println("querying authority " + currentAuthority.toString()); 401 System.out.println("querying authority " + currentAuthority.toString());
402 mesh = new Mesh(cfg, new BallotTunnelEndHandler(), new QueryReceiver()); 402 mesh = new Mesh(cfg, new BallotChannelEndHandler(), new QueryReceiver());
403 channel = mesh.createTunnel(currentAuthority, TallyAuthorityDaemon.MESH_PORT, true, true, null); 403 channel = mesh.createChannel(currentAuthority, TallyAuthorityDaemon.MESH_PORT, true, true);
404 ResultQueryMessage m = new ResultQueryMessage(); 404 ResultQueryMessage m = new ResultQueryMessage();
405 m.ballotGuid = ballot.getBallotGuid(); 405 m.ballotGuid = ballot.getBallotGuid();
406 channel.send(m); 406 channel.send(m);
@@ -415,8 +415,8 @@ public class BallotTool extends Program {
415 Random r = new Random(); 415 Random r = new Random();
416 currentAuthority = remainingAuthorities.get(r.nextInt(remainingAuthorities.size())); 416 currentAuthority = remainingAuthorities.get(r.nextInt(remainingAuthorities.size()));
417 System.out.println("asking authority for key " + currentAuthority.toString()); 417 System.out.println("asking authority for key " + currentAuthority.toString());
418 mesh = new Mesh(cfg, new BallotTunnelEndHandler(), new PublicKeyReceiver()); 418 mesh = new Mesh(cfg, new BallotChannelEndHandler(), new PublicKeyReceiver());
419 channel = mesh.createTunnel(currentAuthority, TallyAuthorityDaemon.MESH_PORT, true, true, null); 419 channel = mesh.createChannel(currentAuthority, TallyAuthorityDaemon.MESH_PORT, true, true);
420 KeyQueryMessage m = new KeyQueryMessage(); 420 KeyQueryMessage m = new KeyQueryMessage();
421 m.ballotGuid = ballot.getBallotGuid(); 421 m.ballotGuid = ballot.getBallotGuid();
422 channel.send(m); 422 channel.send(m);