aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-04 06:13:42 +0800
committerobscuren <geffobscura@gmail.com>2014-07-04 06:13:42 +0800
commitd3d043dba0956840115fcbb3cd4bb6f2f22113ab (patch)
treefea61eddff425f3d48c0e7bfdc6e1a1a2e0ad86e /ethereum.go
parentcb7ebdf821adb4b022adcaea0973c8c7da2e2923 (diff)
parentdb60ebbbd72c5cfb852b37c8b9a37a7d81d79fb0 (diff)
downloadgo-tangerine-d3d043dba0956840115fcbb3cd4bb6f2f22113ab.tar
go-tangerine-d3d043dba0956840115fcbb3cd4bb6f2f22113ab.tar.gz
go-tangerine-d3d043dba0956840115fcbb3cd4bb6f2f22113ab.tar.bz2
go-tangerine-d3d043dba0956840115fcbb3cd4bb6f2f22113ab.tar.lz
go-tangerine-d3d043dba0956840115fcbb3cd4bb6f2f22113ab.tar.xz
go-tangerine-d3d043dba0956840115fcbb3cd4bb6f2f22113ab.tar.zst
go-tangerine-d3d043dba0956840115fcbb3cd4bb6f2f22113ab.zip
Merge branch 'ethersphere-feature/clientid' into develop
Diffstat (limited to 'ethereum.go')
-rw-r--r--ethereum.go25
1 files changed, 16 insertions, 9 deletions
diff --git a/ethereum.go b/ethereum.go
index b78b0658f..35d98e831 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -76,9 +76,11 @@ type Ethereum struct {
RpcServer *ethrpc.JsonRpcServer
keyManager *ethcrypto.KeyManager
+
+ clientIdentity ethwire.ClientIdentity
}
-func New(db ethutil.Database, keyManager *ethcrypto.KeyManager, caps Caps, usePnp bool) (*Ethereum, error) {
+func New(db ethutil.Database, clientIdentity ethwire.ClientIdentity, keyManager *ethcrypto.KeyManager, caps Caps, usePnp bool) (*Ethereum, error) {
var err error
var nat NAT
@@ -94,14 +96,15 @@ func New(db ethutil.Database, keyManager *ethcrypto.KeyManager, caps Caps, usePn
nonce, _ := ethutil.RandomUint64()
ethereum := &Ethereum{
- shutdownChan: make(chan bool),
- quit: make(chan bool),
- db: db,
- peers: list.New(),
- Nonce: nonce,
- serverCaps: caps,
- nat: nat,
- keyManager: keyManager,
+ shutdownChan: make(chan bool),
+ quit: make(chan bool),
+ db: db,
+ peers: list.New(),
+ Nonce: nonce,
+ serverCaps: caps,
+ nat: nat,
+ keyManager: keyManager,
+ clientIdentity: clientIdentity,
}
ethereum.reactor = ethutil.NewReactorEngine()
@@ -123,6 +126,10 @@ func (s *Ethereum) KeyManager() *ethcrypto.KeyManager {
return s.keyManager
}
+func (s *Ethereum) ClientIdentity() ethwire.ClientIdentity {
+ return s.clientIdentity
+}
+
func (s *Ethereum) BlockChain() *ethchain.BlockChain {
return s.blockChain
}