Updated to work with the new config

This commit is contained in:
obscuren 2014-05-25 14:13:07 +01:00
parent 281559d427
commit 99fa9afaf1
2 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ func (tm *TestManager) Broadcast(msgType ethwire.MsgType, data []interface{}) {
} }
func NewTestManager() *TestManager { func NewTestManager() *TestManager {
ethutil.ReadConfig(".ethtest", ethutil.LogStd) ethutil.ReadConfig(".ethtest", ethutil.LogStd, "")
db, err := ethdb.NewMemDatabase() db, err := ethdb.NewMemDatabase()
if err != nil { if err != nil {
@ -74,7 +74,7 @@ func NewTestManager() *TestManager {
func (tm *TestManager) AddFakeBlock(blk []byte) error { func (tm *TestManager) AddFakeBlock(blk []byte) error {
block := NewBlockFromBytes(blk) block := NewBlockFromBytes(blk)
tm.Blocks = append(tm.Blocks, block) tm.Blocks = append(tm.Blocks, block)
err := tm.StateManager().ProcessBlock(tm.StateManager().CurrentState(), block, false) err := tm.StateManager().Process(block, false)
return err return err
} }
func (tm *TestManager) CreateChain1() error { func (tm *TestManager) CreateChain1() error {

View File

@ -9,7 +9,7 @@ import (
) )
func TestSync(t *testing.T) { func TestSync(t *testing.T) {
ethutil.ReadConfig("", ethutil.LogStd) ethutil.ReadConfig("", ethutil.LogStd, "")
db, _ := ethdb.NewMemDatabase() db, _ := ethdb.NewMemDatabase()
state := NewState(ethutil.NewTrie(db, "")) state := NewState(ethutil.NewTrie(db, ""))
@ -28,7 +28,7 @@ func TestSync(t *testing.T) {
} }
func TestObjectGet(t *testing.T) { func TestObjectGet(t *testing.T) {
ethutil.ReadConfig("", ethutil.LogStd) ethutil.ReadConfig("", ethutil.LogStd, "")
db, _ := ethdb.NewMemDatabase() db, _ := ethdb.NewMemDatabase()
ethutil.Config.Db = db ethutil.Config.Db = db