core/types: make blocks immutable
This commit is contained in:
committed by
Jeffrey Wilcke
parent
654564e164
commit
1d42888d30
@ -40,7 +40,10 @@ func createHashes(amount int, root common.Hash) (hashes []common.Hash) {
|
||||
|
||||
// createBlock assembles a new block at the given chain height.
|
||||
func createBlock(i int, parent, hash common.Hash) *types.Block {
|
||||
header := &types.Header{Number: big.NewInt(int64(i))}
|
||||
header := &types.Header{
|
||||
Hash: hash,
|
||||
Number: big.NewInt(int64(i))
|
||||
}
|
||||
block := types.NewBlockWithHeader(header)
|
||||
block.HeaderHash = hash
|
||||
block.ParentHeaderHash = parent
|
||||
|
Reference in New Issue
Block a user