2017-08-15 02:05:02 -05:00
|
|
|
package main
|
|
|
|
|
2017-08-15 02:20:34 -05:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
2017-08-15 02:05:02 -05:00
|
|
|
func main() {
|
2017-08-15 02:28:18 -05:00
|
|
|
bc := NewBlockchain()
|
2017-08-15 02:20:34 -05:00
|
|
|
|
2017-08-15 02:28:18 -05:00
|
|
|
bc.AddBlock("Send 1 BTC to Ivan")
|
|
|
|
bc.AddBlock("Send 2 more BTC to Ivan")
|
|
|
|
|
|
|
|
for _, block := range bc.blocks {
|
2017-08-16 00:33:54 -05:00
|
|
|
fmt.Printf("%s - %x\n", block.Data, block.Hash)
|
2017-08-15 02:28:18 -05:00
|
|
|
}
|
2017-08-15 02:05:02 -05:00
|
|
|
}
|