Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 778 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 778 Bytes

web3-blockchain-go

Blockchain example in Go: A hands-on project to explore the basics of blockchain technology.

Simulation Logic

The main.go file includes the following logic:

  1. Create Blockchain: The simulation starts by creating a new blockchain.
  2. Add Blocks: Two blocks are added to the blockchain, each with custom data.
  3. Print the Blockchain: The blockchain is printed to visualize its content.
  4. Validate the Blockchain: The blockchain is validated to ensure there has been no tampering.
  5. Invalidate the Blockchain: One of the blocks is intentionally altered to demonstrate how validation detects manipulation.

How to Run the Project

To run the simulation, simply use the following command in the terminal:

go run main.go