public CTemporaryBlock GetLastBlock() { //(!) Gestire i casi in cui le sidechain hanno la stessa lunghezza if (mChildren.Count <= 0) { return(mRoot); } else { CSideChainTree deepest = new CSideChainTree(); foreach (CSideChainTree sc in mChildren) { if (sc.RelativeDepth >= deepest.RelativeDepth) { deepest = sc; } } return(deepest.GetLastBlock()); } }
private CBlockChain() { Load(); mSideChain = new CSideChainTree(null, 5); }