aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-18 19:18:19 +0800
committerobscuren <geffobscura@gmail.com>2014-12-18 19:18:19 +0800
commit590aace88dce9922d40fca71e87905383a71d12b (patch)
treefe5d253fc191791ae2226fe8d9f7c2bd63179c83
parent4b2f1f76282069007f2bc6d91a90924ac29fd238 (diff)
downloaddexon-590aace88dce9922d40fca71e87905383a71d12b.tar
dexon-590aace88dce9922d40fca71e87905383a71d12b.tar.gz
dexon-590aace88dce9922d40fca71e87905383a71d12b.tar.bz2
dexon-590aace88dce9922d40fca71e87905383a71d12b.tar.lz
dexon-590aace88dce9922d40fca71e87905383a71d12b.tar.xz
dexon-590aace88dce9922d40fca71e87905383a71d12b.tar.zst
dexon-590aace88dce9922d40fca71e87905383a71d12b.zip
Removed ethereum as dependency
-rw-r--r--core/block_manager.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/block_manager.go b/core/block_manager.go
index f6c73bc2c..98c6d006d 100644
--- a/core/block_manager.go
+++ b/core/block_manager.go
@@ -58,8 +58,8 @@ type BlockManager struct {
mem map[string]*big.Int
// Proof of work used for validating
Pow pow.PoW
- // The ethereum manager interface
- eth EthManager
+
+ txpool *TxPool
// The last attempted block is mainly used for debugging purposes
// This does not have to be a valid block and will be set during
@@ -71,13 +71,13 @@ type BlockManager struct {
eventMux *event.TypeMux
}
-func NewBlockManager(ethereum EthManager) *BlockManager {
+func NewBlockManager(txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockManager {
sm := &BlockManager{
mem: make(map[string]*big.Int),
Pow: ezp.New(),
- eth: ethereum,
- bc: ethereum.ChainManager(),
- eventMux: ethereum.EventMux(),
+ bc: chainManager,
+ eventMux: eventMux,
+ txpool: txpool,
}
return sm
@@ -240,7 +240,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
chainlogger.Infof("Processed block #%d (%x...)\n", block.Number, block.Hash()[0:4])
- sm.eth.TxPool().RemoveSet(block.Transactions())
+ sm.txpool.RemoveSet(block.Transactions())
return td, messages, nil
} else {