@Test public void testCopy() { GSFSignature p1 = new GSFSignature( new GSFSignature.GSFSignatureParameters(128, .75, 6, 10, 5, 10, .2, nb, nl)); GSFSignature p2 = p1.copy(); p1.init(); p2.init(); while (p1.network.time < 2000) { p1.network().runMs(1); p2.network().runMs(1); Assert.assertEquals(p1.network.msgs.size(), p2.network.msgs.size()); for (GSFSignature.GSFNode n1 : p1.network().allNodes) { GSFSignature.GSFNode n2 = p2.network().getNodeById(n1.nodeId); Assert.assertNotNull(n2); Assert.assertEquals(n1.doneAt, n2.doneAt); Assert.assertEquals(n1.verifiedSignatures, n2.verifiedSignatures); Assert.assertEquals(n1.toVerify.size(), n2.toVerify.size()); } } }
@Override public GSFSignature copy() { return new GSFSignature(params); }
GSFSignature implements Protocol { @Override public GSFSignature copy() { return new GSFSignature(params); } }
GSFSignature implements Protocol { @Override public GSFSignature copy() { return new GSFSignature(params); } GSFSignature(GSFSignatureParameters params); }
GSFSignature implements Protocol { @Override public GSFSignature copy() { return new GSFSignature(params); } GSFSignature(GSFSignatureParameters params); @Override String toString(); @Override GSFSignature copy(); void init(); @Override Network<GSFNode> network(); static void drawImgs(); static void sigsPerTime(); static void main(String... args); }
GSFSignature implements Protocol { @Override public GSFSignature copy() { return new GSFSignature(params); } GSFSignature(GSFSignatureParameters params); @Override String toString(); @Override GSFSignature copy(); void init(); @Override Network<GSFNode> network(); static void drawImgs(); static void sigsPerTime(); static void main(String... args);  }