public static void ImportChain() { if (File.Exists(Epicoin.blockchainfile)) { string chain = File.ReadAllText(Epicoin.blockchainfile); Blockchain.Blockchain c = Serialyze.UnserializeBlockchain(chain); Coin = c; } }
private Blockchain GetBlockchain(byte[] data) { string msgdata = Encoding.Default.GetString(data); try { return(Serialyze.UnserializeBlockchain(msgdata)); } catch { return(null); } }
private void GetBlockchain(byte[] data) { string msgdata = Encoding.Default.GetString(data); try { this.chain = Serialyze.UnserializeBlockchain(msgdata); } catch { this.Reset(); } }