Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add new Block to blockchain
- public void AddBlock(Transaction[] transactions)
- {
- var lastBlock = GetLastBlock();
- var nextHeight = lastBlock.Height + 1;
- var prevHash = lastBlock.Hash;
- var timestamp = DateTime.Now.Ticks;
- var block = new Block(nextHeight, prevHash, transactions, "Admin");
- Blocks.Add(block);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement