blockchain_simulator

command
v0.0.0-...-3122d86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 14 Imported by: 0

README

Blockchain_simulator

This a simple blockchain simulator to illustrate how blockhain works. It uses structure to store the data of each block in memory and later writes it to a file in a json format to keep track of the longest chain. It also validates newly added blocks and follows longest valid chain protocol.

To use it -

go run .

Go to localhost/8080 to view the blocks

Use postman to send a post request to localhost/8080 with {Key:(any integer value)} in the request body to add new blocks. It automatically appends the newly added blocks to the file.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL