eth: set default miner extra to client name

This commit is contained in:
Jeffrey Wilcke 2015-07-25 17:33:56 +02:00
parent f6097f4a0a
commit 3adaeb1dbc
1 changed files with 7 additions and 0 deletions

View File

@ -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())