@Test public void testCopy() { Slush p1 = new Slush(new Slush.SlushParameters(60, 5, 7, 4.0 / 7.0, nb, nl)); Slush p2 = p1.copy(); p1.init(); p1.network().runMs(200); p2.init(); p2.network().runMs(200); for (Slush.SlushNode n1 : p1.network().allNodes) { Slush.SlushNode n2 = p2.network().getNodeById(n1.nodeId); Assert.assertNotNull(n2); Assert.assertEquals(n1.myColor, n2.myColor); Assert.assertEquals(n1.myQueryNonce, n2.myQueryNonce); Assert.assertEquals(n1.round, n2.round); } }
@Override public Slush copy() { return new Slush(params); }
Slush implements Protocol { @Override public Slush copy() { return new Slush(params); } }
Slush implements Protocol { @Override public Slush copy() { return new Slush(params); } Slush(SlushParameters params); }
Slush implements Protocol { @Override public Slush copy() { return new Slush(params); } Slush(SlushParameters params); @Override void init(); @Override Network<SlushNode> network(); @Override Slush copy(); @Override String toString(); static void main(String... args); }
Slush implements Protocol { @Override public Slush copy() { return new Slush(params); } Slush(SlushParameters params); @Override void init(); @Override Network<SlushNode> network(); @Override Slush copy(); @Override String toString(); static void main(String... args);  }