aboutsummaryrefslogtreecommitdiffstats
path: root/core/block_validator_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-03-06 02:00:01 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-03-09 22:50:14 +0800
commit567d41d9363706b4b13ce0903804e8acf214af49 (patch)
tree8c091f0385589074573df3f7964c99417c5950ee /core/block_validator_test.go
parent3b00a77de57ab2737a7887521c192ce004c721e3 (diff)
downloadgo-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.tar.gz
go-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.tar.zst
go-tangerine-567d41d9363706b4b13ce0903804e8acf214af49.zip
all: swap out the C++ ethash to the pure Go one (mining todo)
Diffstat (limited to 'core/block_validator_test.go')
-rw-r--r--core/block_validator_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/block_validator_test.go b/core/block_validator_test.go
index 01931efd2..c13aa83db 100644
--- a/core/block_validator_test.go
+++ b/core/block_validator_test.go
@@ -28,6 +28,7 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/params"
+ "github.com/ethereum/go-ethereum/pow"
)
func testChainConfig() *params.ChainConfig {
@@ -40,7 +41,7 @@ func proc() (Validator, *BlockChain) {
var mux event.TypeMux
WriteTestNetGenesisBlock(db)
- blockchain, err := NewBlockChain(db, testChainConfig(), thePow(), &mux, vm.Config{})
+ blockchain, err := NewBlockChain(db, testChainConfig(), pow.NewTestEthash(), &mux, vm.Config{})
if err != nil {
fmt.Println(err)
}
@@ -54,13 +55,13 @@ func TestNumber(t *testing.T) {
cfg := testChainConfig()
header := makeHeader(cfg, chain.Genesis(), statedb)
header.Number = big.NewInt(3)
- err := ValidateHeader(cfg, FakePow{}, header, chain.Genesis().Header(), false, false)
+ err := ValidateHeader(cfg, pow.FakePow{}, header, chain.Genesis().Header(), false, false)
if err != BlockNumberErr {
t.Errorf("expected block number error, got %q", err)
}
header = makeHeader(cfg, chain.Genesis(), statedb)
- err = ValidateHeader(cfg, FakePow{}, header, chain.Genesis().Header(), false, false)
+ err = ValidateHeader(cfg, pow.FakePow{}, header, chain.Genesis().Header(), false, false)
if err == BlockNumberErr {
t.Errorf("didn't expect block number error")
}