From 6a8b988a61198bcdce3c039778603aedd802b2e2 Mon Sep 17 00:00:00 2001 From: Ivan Kuznetsov Date: Wed, 16 Aug 2017 13:10:41 +0700 Subject: [PATCH] Fix empty byte array initialization --- block.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.go b/block.go index 6d8a074..07c1ef7 100644 --- a/block.go +++ b/block.go @@ -26,7 +26,7 @@ func (b *Block) SetHash() { // NewBlock creates and returns Block func NewBlock(data string, prevBlock []byte) *Block { - block := &Block{time.Now().Unix(), []byte(data), prevBlock, []byte("")} + block := &Block{time.Now().Unix(), []byte(data), prevBlock, []byte{}} block.SetHash() return block }