Fix empty byte array initialization
This commit is contained in:
parent
cb8f5303dd
commit
6a8b988a61
2
block.go
2
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue