From 3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Sat, 25 Jul 2015 17:33:56 +0200 Subject: eth: set default miner extra to client name --- eth/backend.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'eth/backend.go') 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()) -- cgit v1.2.3