@Test public void testNewOrphanChain() { assertNotNull(chainManager); Block block = createBlock(); chainManager.newOrphanChain(block); assertEquals(1, chainManager.getOrphanChains().size()); }
public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); }
ChainManager { public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); } }
ChainManager { public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); } ChainManager(); }
ChainManager { public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); } ChainManager(); void newOrphanChain(Block block); boolean checkIsBeforeOrphanChainAndAdd(Block block); boolean checkIsAfterOrphanChainAndAdd(Block block); long getBestBlockHeight(); void clear(); ChainContainer getMasterChain(); void setMasterChain(ChainContainer masterChain); List<ChainContainer> getChains(); Block getBestBlock(); List<ChainContainer> getOrphanChains(); }
ChainManager { public void newOrphanChain(Block block) { Chain orphanChain = new Chain(); orphanChain.initData(block); ChainContainer orphanChainContainer = new ChainContainer(orphanChain); orphanChains.add(orphanChainContainer); } ChainManager(); void newOrphanChain(Block block); boolean checkIsBeforeOrphanChainAndAdd(Block block); boolean checkIsAfterOrphanChainAndAdd(Block block); long getBestBlockHeight(); void clear(); ChainContainer getMasterChain(); void setMasterChain(ChainContainer masterChain); List<ChainContainer> getChains(); Block getBestBlock(); List<ChainContainer> getOrphanChains();  }