diff options
Diffstat (limited to 'ethereum.go')
-rw-r--r-- | ethereum.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ethereum.go b/ethereum.go index d04b08960..5fb3f2909 100644 --- a/ethereum.go +++ b/ethereum.go @@ -22,6 +22,7 @@ import ( "github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethwire" + "github.com/ethereum/eth-go/eventer" ) const ( @@ -58,7 +59,9 @@ type Ethereum struct { blockChain *ethchain.BlockChain // The block pool blockPool *BlockPool - // Peers (NYI) + // Eventer + eventer *eventer.EventMachine + // Peers peers *list.List // Nonce Nonce uint64 @@ -123,6 +126,7 @@ func New(db ethutil.Database, clientIdentity ethwire.ClientIdentity, keyManager filters: make(map[int]*ethchain.Filter), } ethereum.reactor = ethreact.New() + ethereum.eventer = eventer.New() ethereum.blockPool = NewBlockPool(ethereum) ethereum.txPool = ethchain.NewTxPool(ethereum) @@ -161,6 +165,9 @@ func (s *Ethereum) TxPool() *ethchain.TxPool { func (s *Ethereum) BlockPool() *BlockPool { return s.blockPool } +func (s *Ethereum) Eventer() *eventer.EventMachine { + return s.eventer +} func (self *Ethereum) Db() ethutil.Database { return self.db } @@ -387,6 +394,8 @@ func (s *Ethereum) ReapDeadPeerHandler() { func (s *Ethereum) Start(seed bool) { s.reactor.Start() s.blockPool.Start() + s.stateManager.Start() + // Bind to addr and port ln, err := net.Listen("tcp", ":"+s.Port) if err != nil { |