diff options
author | Felix Lange <fjl@twurst.com> | 2015-06-19 07:57:16 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-30 00:51:47 +0800 |
commit | ceaf1c080b4047c26d433e778d4d3142f4e29d24 (patch) | |
tree | 5f1f5b8cfad997ac3be2070e7a6a0c9876d8d5d9 /core/block_processor_test.go | |
parent | 1d42888d3047dabfb352c94a2051e7af14d2a509 (diff) | |
download | go-tangerine-ceaf1c080b4047c26d433e778d4d3142f4e29d24.tar.gz go-tangerine-ceaf1c080b4047c26d433e778d4d3142f4e29d24.tar.zst go-tangerine-ceaf1c080b4047c26d433e778d4d3142f4e29d24.zip |
core: add GenerateChain, GenesisBlockForTesting
Diffstat (limited to 'core/block_processor_test.go')
-rw-r--r-- | core/block_processor_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/block_processor_test.go b/core/block_processor_test.go index bd77a2fc2..5931a5f5e 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -27,16 +27,17 @@ func proc() (*BlockProcessor, *ChainManager) { func TestNumber(t *testing.T) { pow := ezp.New() + _, chain := proc() - bp, chain := proc() - header := makeHeader(chain.Genesis(), 0, bp.db, 0) + statedb := state.New(chain.Genesis().Root(), chain.stateDb) + header := makeHeader(chain.Genesis(), statedb) header.Number = big.NewInt(3) err := ValidateHeader(pow, header, chain.Genesis().Header(), false) if err != BlockNumberErr { t.Errorf("expected block number error, got %q", err) } - header = makeHeader(chain.Genesis(), 0, bp.db, 0) + header = makeHeader(chain.Genesis(), statedb) err = ValidateHeader(pow, header, chain.Genesis().Header(), false) if err == BlockNumberErr { t.Errorf("didn't expect block number error") |