Skip to content

Instantly share code, notes, and snippets.

@fernandoporazzi
Created January 18, 2019 14:42
Show Gist options
  • Save fernandoporazzi/d6b386c3d13356f8c1ff8b578bcb0698 to your computer and use it in GitHub Desktop.
Save fernandoporazzi/d6b386c3d13356f8c1ff8b578bcb0698 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/fernandoporazzi/blockchain-golang/blockchain"
)
func main() {
blockchain := blockchain.CreateBlockchain()
blockchain.CreateGenesisBlock()
blockchain.AddBlock("second block")
blockchain.AddBlock("third block")
blockchain.AddBlock("fourth block")
for i := 0; i < len(blockchain.Blocks); i++ {
fmt.Println(blockchain.Blocks[i])
fmt.Println("")
fmt.Println("")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment