aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
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 /eth/backend.go
parentf6097f4a0abd6d48f55b2f16048fcbb73e170fca (diff)
downloadgo-tangerine-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar
go-tangerine-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.gz
go-tangerine-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.bz2
go-tangerine-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.lz
go-tangerine-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.xz
go-tangerine-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.tar.zst
go-tangerine-3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e.zip
eth: set default miner extra to client name
Diffstat (limited to 'eth/backend.go')
-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())