aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-25 23:33:56 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-25 23:36:56 +0800
commit3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e (patch)
treea07cd51820bc8711addc2b46d7941b0913fe24dc
parentf6097f4a0abd6d48f55b2f16048fcbb73e170fca (diff)
downloaddexon-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar
dexon-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.gz
dexon-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.bz2
dexon-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.lz
dexon-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.xz
dexon-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.zst
dexon-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.zip
eth: set default miner extra to client name
-rw-r--r--eth/backend.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 5e87724b0..e2b7fab16 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -368,6 +368,13 @@ func New(config *Config) (*Ethereum, error) {
eth.miner = miner.New(eth, eth.EventMux(), eth.pow)
eth.miner.SetGasPrice(config.GasPrice)
+
+ extra := config.Name
+ if len(extra) > 1024 {
+ extra = extra[:1024]
+ }
+ eth.miner.SetExtra([]byte(extra))
+
if config.Shh {
eth.whisper = whisper.New()
eth.shhVersionId = int(eth.whisper.Version())