public void Inicializar(DateTime fechatest) { BlockChain = new List <Bloque>(); this.i = 1; Bloque gen = new Bloque(0, "00000", "00000", "00000", "00000", fechatest); gen.ModHash(Hash256(gen)); BlockChain.Add(gen); }
public void AgregarBloque(string pnom, string pmot, string pfhash, DateTime pfech) { string prehash = GetBloqueIndice(GetI() - 1).GetHash(); Bloque block = new Bloque(GetI(), pnom, pmot, pfhash, prehash, pfech); string nhash = HashCondicional(block); block.ModHash(nhash); BlockChain.Add(block); Incrementar_i(); }