Fix empty byte array initialization

This commit is contained in:
Ivan Kuznetsov 2017-08-16 13:10:41 +07:00
parent cb8f5303dd
commit 6a8b988a61
1 changed files with 1 additions and 1 deletions

View File

@ -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
}