aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-13 22:35:54 +0800
committerobscuren <geffobscura@gmail.com>2015-02-13 22:35:54 +0800
commit76fa75b39439e6c8c83ebc03fb32aa615227cc44 (patch)
tree9b755296ae96dd5e4ced28d6de4d5abfdeb33915 /core
parent75d164037fb9bbf75def7c5501727fd634ef124f (diff)
parent32a9c0ca809508c1648b8f44f3e09725af7a80d3 (diff)
downloadgo-tangerine-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar
go-tangerine-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.gz
go-tangerine-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.bz2
go-tangerine-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.lz
go-tangerine-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.xz
go-tangerine-76fa75b39439e6c8c83ebc03fb32aa615227cc44.tar.zst
go-tangerine-76fa75b39439e6c8c83ebc03fb32aa615227cc44.zip
wip
Diffstat (limited to 'core')
-rw-r--r--core/block_processor.go13
-rw-r--r--core/helper_test.go8
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
}