Code Monkey home page Code Monkey logo

lab7-blockchain's Introduction

Mini-Project 7: Blockchains

Author: Tony Li, Trung Le, Vivien Yan.

Overview:

Practice working with linked structures by developing our simple implementation of blockchains.

Feature:

  • Hash class is a wrapper class that wraps up a byte array along with some operations we would like to perform on it.
  • Block class contained each node of the blockchain.
  • BlockChain is a class of linked structure consisit of all block.
  • BlockChaindriver allows us to interact with our BlockChain.

The main method creates a blockchain with the initial dollar amount and then repeatedly:

  1. Prints out the contents of the blockchain.
  2. Reads in a command from the user.
  3. Executes that command, potentially updating the blockchain and reporting back to the user.

valid command include:

  • mine: discovers the nonce for a given transaction
  • append: appends a new block onto the end of the chain
  • remove: removes the last block from the end of the chain
  • check: checks that the block chain is valid
  • report: reports the balances of Alexis and Blake
  • help: prints this list of commands
  • quit: quits the program

Acknowlegment: lab on doubliy linked list, eboards, Danny Wen.

lab7-blockchain's People

Contributors

vivienyan avatar trungle15 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.