Last active
January 18, 2019 13:28
-
-
Save fernandoporazzi/f378fdd02412aa0f9ec5d6e994f335d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package block | |
import ( | |
"time" | |
) | |
type Block struct { | |
Index int | |
PreviousHash string | |
Data string | |
Timestamp time.Time | |
Difficulty int | |
Hash string | |
Nonce int | |
} | |
func CreateBlock() Block { | |
var block Block | |
block.Timestamp = time.Now() | |
block.Nonce = 0 | |
return block | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment