Fix it!
This commit is contained in:
parent
9104fae035
commit
cc4a2d8b43
4
block.go
4
block.go
|
@ -25,8 +25,8 @@ func (b *Block) SetHash() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewBlock creates and returns Block
|
// NewBlock creates and returns Block
|
||||||
func NewBlock(data string, prevBlock []byte) *Block {
|
func NewBlock(data string, prevBlockHash []byte) *Block {
|
||||||
block := &Block{time.Now().Unix(), []byte(data), prevBlock, []byte{}}
|
block := &Block{time.Now().Unix(), []byte(data), prevBlockHash, []byte{}}
|
||||||
block.SetHash()
|
block.SetHash()
|
||||||
return block
|
return block
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue