Skip to content

Instantly share code, notes, and snippets.

@fernandoporazzi
Created January 18, 2019 14:10
Show Gist options
  • Save fernandoporazzi/f4f14b7764c7c5ed8f7cc5be7152c60a to your computer and use it in GitHub Desktop.
Save fernandoporazzi/f4f14b7764c7c5ed8f7cc5be7152c60a to your computer and use it in GitHub Desktop.
package blockchain
import (
"github.com/fernandoporazzi/blockchain-golang/block"
)
type Blockchain struct {
Blocks []block.Block
Index int
Difficulty int
}
func CreateBlockchain() Blockchain {
var b Blockchain
b.Index = 0
b.Difficulty = 3
return b
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment