diff options
author | Felix Lange <fjl@twurst.com> | 2014-10-14 08:01:46 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2014-10-17 00:51:21 +0800 |
commit | 20cdb73862c6ae5af10dbaceba34c5073148235d (patch) | |
tree | 15d78773fabbf114a87338736d807b592c0ce1bf /ethchain/helper_test.go | |
parent | 36cdab206849c7e363e0b9911553098c3e8ca644 (diff) | |
download | go-tangerine-20cdb73862c6ae5af10dbaceba34c5073148235d.tar.gz go-tangerine-20cdb73862c6ae5af10dbaceba34c5073148235d.tar.zst go-tangerine-20cdb73862c6ae5af10dbaceba34c5073148235d.zip |
ethchain: fix tests
Diffstat (limited to 'ethchain/helper_test.go')
-rw-r--r-- | ethchain/helper_test.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ethchain/helper_test.go b/ethchain/helper_test.go index 75d7771fc..2da01d8a6 100644 --- a/ethchain/helper_test.go +++ b/ethchain/helper_test.go @@ -6,16 +6,17 @@ import ( "github.com/ethereum/eth-go/ethcrypto" "github.com/ethereum/eth-go/ethdb" - "github.com/ethereum/eth-go/ethreact" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethwire" + "github.com/ethereum/eth-go/event" ) // Implement our EthTest Manager type TestManager struct { stateManager *StateManager - reactor *ethreact.ReactorEngine + eventMux *event.TypeMux + db ethutil.Database txPool *TxPool blockChain *BlockChain Blocks []*Block @@ -49,8 +50,8 @@ func (tm *TestManager) StateManager() *StateManager { return tm.stateManager } -func (tm *TestManager) Reactor() *ethreact.ReactorEngine { - return tm.reactor +func (tm *TestManager) EventMux() *event.TypeMux { + return tm.eventMux } func (tm *TestManager) Broadcast(msgType ethwire.MsgType, data []interface{}) { fmt.Println("Broadcast not implemented") @@ -63,7 +64,10 @@ func (tm *TestManager) KeyManager() *ethcrypto.KeyManager { return nil } -func (tm *TestManager) Db() ethutil.Database { return nil } +func (tm *TestManager) Db() ethutil.Database { + return tm.db +} + func NewTestManager() *TestManager { ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "ETH") @@ -75,8 +79,8 @@ func NewTestManager() *TestManager { ethutil.Config.Db = db testManager := &TestManager{} - testManager.reactor = ethreact.New() - + testManager.eventMux = new(event.TypeMux) + testManager.db = db testManager.txPool = NewTxPool(testManager) testManager.blockChain = NewBlockChain(testManager) testManager.stateManager = NewStateManager(testManager) |