diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-07 03:07:35 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-07 03:10:59 +0800 |
commit | 22b493a6ff3e9692676c17f8d766ff1117da9485 (patch) | |
tree | 3e39656fa5769b6bb36a07f21f5dc9a2c4566978 /core/block_processor_test.go | |
parent | cd856cb2133d390758bb24b88fa3b538bb7bc306 (diff) | |
download | go-tangerine-22b493a6ff3e9692676c17f8d766ff1117da9485.tar.gz go-tangerine-22b493a6ff3e9692676c17f8d766ff1117da9485.tar.zst go-tangerine-22b493a6ff3e9692676c17f8d766ff1117da9485.zip |
Fixed tests
Diffstat (limited to 'core/block_processor_test.go')
-rw-r--r-- | core/block_processor_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/block_processor_test.go b/core/block_processor_test.go index 35aeaa714..a031c2669 100644 --- a/core/block_processor_test.go +++ b/core/block_processor_test.go @@ -6,14 +6,15 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/pow/ezp" ) func proc() (*BlockProcessor, *ChainManager) { db, _ := ethdb.NewMemDatabase() var mux event.TypeMux - chainMan := NewChainManager(db, &mux) - return NewBlockProcessor(db, nil, chainMan, &mux), chainMan + chainMan := NewChainManager(db, db, &mux) + return NewBlockProcessor(db, ezp.New(), nil, chainMan, &mux), chainMan } func TestNumber(t *testing.T) { @@ -21,13 +22,13 @@ func TestNumber(t *testing.T) { block1 := chain.NewBlock(nil) block1.Header().Number = big.NewInt(3) - err := bp.ValidateBlock(block1, chain.Genesis()) + err := bp.ValidateHeader(block1.Header(), chain.Genesis().Header()) if err != BlockNumberErr { t.Errorf("expected block number error") } block1 = chain.NewBlock(nil) - err = bp.ValidateBlock(block1, chain.Genesis()) + err = bp.ValidateHeader(block1.Header(), chain.Genesis().Header()) if err == BlockNumberErr { t.Errorf("didn't expect block number error") } |