@Test public void testCopy() { CasperIMD p1 = new CasperIMD(new CasperIMD.CasperParemeters(5, false, 5, 80, 1000, 1, null, null)); CasperIMD p2 = p1.copy(); p1.init(); p2.init(); while (p1.network.time < 20000) { p1.network().runMs(10); p2.network().runMs(10); for (CasperIMD.CasperNode n1 : p1.network().allNodes) { CasperIMD.CasperNode n2 = p2.network().getNodeById(n1.nodeId); Assert.assertNotNull(n2); Assert.assertEquals(n1.doneAt, n2.doneAt); Assert.assertEquals(n1.isDown(), n2.isDown()); Assert.assertEquals(n1.head.proposalTime, n2.head.proposalTime); Assert.assertEquals(n1.attestationsByHead.size(), n2.attestationsByHead.size()); Assert.assertEquals(n1.getMsgReceived(), n2.getMsgReceived()); } } }
public CasperIMD copy() { return new CasperIMD(params); }
CasperIMD implements Protocol { public CasperIMD copy() { return new CasperIMD(params); } }
CasperIMD implements Protocol { public CasperIMD copy() { return new CasperIMD(params); } CasperIMD(CasperParemeters params); }
CasperIMD implements Protocol { public CasperIMD copy() { return new CasperIMD(params); } CasperIMD(CasperParemeters params); CasperIMD copy(); BlockChainNetwork<CasperBlock, CasperNode> network(); @Override void init(); static void main(String... args); }
CasperIMD implements Protocol { public CasperIMD copy() { return new CasperIMD(params); } CasperIMD(CasperParemeters params); CasperIMD copy(); BlockChainNetwork<CasperBlock, CasperNode> network(); @Override void init(); static void main(String... args);  }