Пример #1
0
 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());
     }
 }
Пример #2
0
 private CBlockChain()
 {
     Load();
     mSideChain = new CSideChainTree(null, 5);
 }