Initial smart-miner stuff
This commit is contained in:
@ -60,6 +60,8 @@ type Ethereum struct {
|
||||
|
||||
// Specifies the desired amount of maximum peers
|
||||
MaxPeers int
|
||||
|
||||
reactor *ethutil.ReactorEngine
|
||||
}
|
||||
|
||||
func New(caps Caps, usePnp bool) (*Ethereum, error) {
|
||||
@ -89,6 +91,8 @@ func New(caps Caps, usePnp bool) (*Ethereum, error) {
|
||||
serverCaps: caps,
|
||||
nat: nat,
|
||||
}
|
||||
ethereum.reactor = ethutil.NewReactorEngine()
|
||||
|
||||
ethereum.txPool = ethchain.NewTxPool(ethereum)
|
||||
ethereum.blockChain = ethchain.NewBlockChain(ethereum)
|
||||
ethereum.stateManager = ethchain.NewStateManager(ethereum)
|
||||
@ -99,6 +103,10 @@ func New(caps Caps, usePnp bool) (*Ethereum, error) {
|
||||
return ethereum, nil
|
||||
}
|
||||
|
||||
func (s *Ethereum) Reactor() *ethutil.ReactorEngine {
|
||||
return s.reactor
|
||||
}
|
||||
|
||||
func (s *Ethereum) BlockChain() *ethchain.BlockChain {
|
||||
return s.blockChain
|
||||
}
|
||||
|
Reference in New Issue
Block a user