Use EthManager interface instead

This commit is contained in:
obscuren 2014-05-13 12:42:24 +02:00
parent cc341b8734
commit cac9562c05
1 changed files with 6 additions and 4 deletions

View File

@ -6,16 +6,18 @@ import (
) )
type PEthereum struct { type PEthereum struct {
manager ethchain.EthManager
stateManager *ethchain.StateManager stateManager *ethchain.StateManager
blockChain *ethchain.BlockChain blockChain *ethchain.BlockChain
txPool *ethchain.TxPool txPool *ethchain.TxPool
} }
func NewPEthereum(sm *ethchain.StateManager, bc *ethchain.BlockChain, txp *ethchain.TxPool) *PEthereum { func NewPEthereum(manager ethchain.EthManager) *PEthereum {
return &PEthereum{ return &PEthereum{
sm, manager,
bc, manager.StateManager(),
txp, manager.BlockChain(),
manager.TxPool(),
} }
} }