core: fix tests
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/ethereum/go-ethereum/pow/ezp"
|
||||
@@ -19,7 +20,7 @@ func proc() (*BlockProcessor, *ChainManager) {
|
||||
|
||||
func TestNumber(t *testing.T) {
|
||||
bp, chain := proc()
|
||||
block1 := chain.NewBlock(nil)
|
||||
block1 := chain.NewBlock(common.Address{})
|
||||
block1.Header().Number = big.NewInt(3)
|
||||
|
||||
err := bp.ValidateHeader(block1.Header(), chain.Genesis().Header())
|
||||
@@ -27,7 +28,7 @@ func TestNumber(t *testing.T) {
|
||||
t.Errorf("expected block number error")
|
||||
}
|
||||
|
||||
block1 = chain.NewBlock(nil)
|
||||
block1 = chain.NewBlock(common.Address{})
|
||||
err = bp.ValidateHeader(block1.Header(), chain.Genesis().Header())
|
||||
if err == BlockNumberErr {
|
||||
t.Errorf("didn't expect block number error")
|
||||
|
Reference in New Issue
Block a user