diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-13 22:35:54 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-13 22:35:54 +0800 |
commit | 76fa75b39439e6c8c83ebc03fb32aa615227cc44 (patch) | |
tree | 9b755296ae96dd5e4ced28d6de4d5abfdeb33915 /core | |
parent | 75d164037fb9bbf75def7c5501727fd634ef124f (diff) | |
parent | 32a9c0ca809508c1648b8f44f3e09725af7a80d3 (diff) | |
download | dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.gz dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.bz2 dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.lz dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.xz dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.zst dexon-76fa75b39439e6c8c83ebc03fb32aa615227cc44.zip |
wip
Diffstat (limited to 'core')
-rw-r--r-- | core/block_processor.go | 13 | ||||
-rw-r--r-- | core/helper_test.go | 8 |
2 files changed, 13 insertions, 8 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index c360273da..8f5ee52b7 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -23,6 +23,19 @@ type PendingBlockEvent struct { var statelogger = logger.NewLogger("BLOCK") +type EthManager interface { + BlockProcessor() *BlockProcessor + ChainManager() *ChainManager + TxPool() *TxPool + PeerCount() int + IsMining() bool + IsListening() bool + Peers() []*p2p.Peer + KeyManager() *crypto.KeyManager + Db() ethutil.Database + EventMux() *event.TypeMux +} + type BlockProcessor struct { db ethutil.Database // Mutex for locking the block processor. Blocks can only be handled one at a time diff --git a/core/helper_test.go b/core/helper_test.go index 7b41b86f1..473576e3f 100644 --- a/core/helper_test.go +++ b/core/helper_test.go @@ -9,7 +9,6 @@ import ( "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/p2p" ) // Implement our EthTest Manager @@ -54,13 +53,6 @@ func (tm *TestManager) TxPool() *TxPool { func (tm *TestManager) EventMux() *event.TypeMux { return tm.eventMux } -func (tm *TestManager) Broadcast(msgType p2p.Msg, data []interface{}) { - fmt.Println("Broadcast not implemented") -} - -func (tm *TestManager) ClientIdentity() p2p.ClientIdentity { - return nil -} func (tm *TestManager) KeyManager() *crypto.KeyManager { return nil } |