public static void ImportChain() { if (File.Exists(Epicoin.blockchainfile)) { string chain = File.ReadAllText(Epicoin.blockchainfile); Blockchain.Blockchain c = Serialyze.UnserializeBlockchain(chain); Coin = c; } }
public static void ImportChain() { if (!File.Exists(Epicoin.Blockchainfile)) { return; } string chain = File.ReadAllText(Epicoin.Blockchainfile); Blockchain.Blockchain c = Serialyze.Unserialize <Blockchain.Blockchain>(chain); Coin = c; }
public static void Init() { Coin = new Blockchain.Blockchain(Wallet.Address[0]); Coin.AddBlock(Coin.CreateGenesisBlock()); }