Skip to content
Simple blockchain logic in Go
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
.gitattributes
.gitignore
LICENSE
README.md
gopherchain.go

README.md

gopherchain

This is a very simple usage of a Go list to add hashed blocks and append a hash to each block that points to the hash of the previous block. You can use it to learn and visualize how a blockchain links the blocks and how a block can be set up to contain any kind of data we wish.

It's easier to think of a blockchain as blocks stacked on top of each other such as so:

            |-----------------|
            |     index       |
            |     data        |
            |     time        |
            |     SHA256      |
            |-----------------|
                    ^
                   / \
                    |
                    |
            |-----------------|
            |     index       |
            |     data        |
            |     time        |
            |     SHA256      |
            |-----------------|
You can’t perform that action at this time.