diff options
author | Felix Lange <fjl@twurst.com> | 2015-06-16 18:41:50 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-30 00:51:47 +0800 |
commit | 1d42888d3047dabfb352c94a2051e7af14d2a509 (patch) | |
tree | 8ca68ca98bd697f26f2033a5480e78ccbf064162 /core/block_cache_test.go | |
parent | 654564e164b3b6f7f4ba1e8bbd6fcd64776068fa (diff) | |
download | go-tangerine-1d42888d3047dabfb352c94a2051e7af14d2a509.tar.gz go-tangerine-1d42888d3047dabfb352c94a2051e7af14d2a509.tar.zst go-tangerine-1d42888d3047dabfb352c94a2051e7af14d2a509.zip |
core/types: make blocks immutable
Diffstat (limited to 'core/block_cache_test.go')
-rw-r--r-- | core/block_cache_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/block_cache_test.go b/core/block_cache_test.go index 43ab847f9..80d118599 100644 --- a/core/block_cache_test.go +++ b/core/block_cache_test.go @@ -11,12 +11,12 @@ import ( func newChain(size int) (chain []*types.Block) { var parentHash common.Hash for i := 0; i < size; i++ { - block := types.NewBlock(parentHash, common.Address{}, common.Hash{}, new(big.Int), 0, nil) - block.Header().Number = big.NewInt(int64(i)) + head := &types.Header{ParentHash: parentHash, Number: big.NewInt(int64(i))} + block := types.NewBlock(head, nil, nil, nil) chain = append(chain, block) parentHash = block.Hash() } - return + return chain } func insertChainCache(cache *BlockCache, chain []*types.Block) { |