Beispiel #1
0
        private void createGenesisBlock1(ClientN1 client, DAO.Ticket daoTicket, DAO.Block daoBlock)
        {
            log.Debug("Creating Genesis Block for Node 1");
            DAO.Ticket t1       = daoTicket;
            var        reTicket = client.createTicket(t1);
            Block      block1   = new Block(null, t1);

            daoBlock.PreviousHash = block1.PreviousHash;
            daoBlock.Hash         = block1.Hash;
            daoBlock.Id           = 0;
            daoBlock.IdTicket     = block1.Ticket.Id;
            client.createBlock(daoBlock);
        }
Beispiel #2
0
        private void createBlock1(ClientN1 client, Block previous, DAO.Ticket ticket)
        {
            log.Debug("Adding Block to Node 1");
            var   reTicket = client.createTicket(ticket);
            Block block1   = new Block(previous.Hash, reTicket);

            log.Debug(string.Format("Adding ticket from user {0}", reTicket.CustomerName));
            DAO.Block dBlock1 = new DAO.Block()
            {
                PreviousHash = block1.PreviousHash, Hash = block1.Hash, Id = 0, IdTicket = block1.Ticket.Id
            };
            client.createBlock(dBlock1);
        }