Skip to content

Commit 590aace

Browse files
committed
Removed ethereum as dependency
1 parent 4b2f1f7 commit 590aace

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/block_manager.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ type BlockManager struct {
5858
mem map[string]*big.Int
5959
// Proof of work used for validating
6060
Pow pow.PoW
61-
// The ethereum manager interface
62-
eth EthManager
61+
62+
txpool *TxPool
6363

6464
// The last attempted block is mainly used for debugging purposes
6565
// This does not have to be a valid block and will be set during
@@ -71,13 +71,13 @@ type BlockManager struct {
7171
eventMux *event.TypeMux
7272
}
7373

74-
func NewBlockManager(ethereum EthManager) *BlockManager {
74+
func NewBlockManager(txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockManager {
7575
sm := &BlockManager{
7676
mem: make(map[string]*big.Int),
7777
Pow: ezp.New(),
78-
eth: ethereum,
79-
bc: ethereum.ChainManager(),
80-
eventMux: ethereum.EventMux(),
78+
bc: chainManager,
79+
eventMux: eventMux,
80+
txpool: txpool,
8181
}
8282

8383
return sm
@@ -240,7 +240,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
240240

241241
chainlogger.Infof("Processed block #%d (%x...)\n", block.Number, block.Hash()[0:4])
242242

243-
sm.eth.TxPool().RemoveSet(block.Transactions())
243+
sm.txpool.RemoveSet(block.Transactions())
244244

245245
return td, messages, nil
246246
} else {

0 commit comments

Comments
 (0)