aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-03-10 18:53:02 +0800
committerMaran <maran.hidskes@gmail.com>2014-03-10 18:53:02 +0800
commitd5efeab8f92509dec3cafcafb36e1856bb084f12 (patch)
tree1d455afb8824391da15b2f537f17f87fb1678998 /ethereum.go
parentbe543a6d178063a60d404a373ced296ed6d4744c (diff)
downloadgo-tangerine-d5efeab8f92509dec3cafcafb36e1856bb084f12.tar
go-tangerine-d5efeab8f92509dec3cafcafb36e1856bb084f12.tar.gz
go-tangerine-d5efeab8f92509dec3cafcafb36e1856bb084f12.tar.bz2
go-tangerine-d5efeab8f92509dec3cafcafb36e1856bb084f12.tar.lz
go-tangerine-d5efeab8f92509dec3cafcafb36e1856bb084f12.tar.xz
go-tangerine-d5efeab8f92509dec3cafcafb36e1856bb084f12.tar.zst
go-tangerine-d5efeab8f92509dec3cafcafb36e1856bb084f12.zip
Initial smart-miner stuff
Diffstat (limited to 'ethereum.go')
-rw-r--r--ethereum.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ethereum.go b/ethereum.go
index 342f4f573..302f3c04f 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -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
}