Beispiel #1
0
        public static double getBalance(string pubkey)
        {
            double balance = 0.0;

            string[] files = System.IO.Directory.GetFiles(System.IO.Directory.GetCurrentDirectory() + "\\Chain\\");
            int      count = 0;

            foreach (string file in files)
            {
                string index = count.ToString("0000000000");
                Block  b     = Serialize.ReadBlock(index);
                Ledger l     = b.GetData();
                balance += l.getBalance(pubkey);
                count++;
            }

            return(balance);
        }