eth: set default miner extra to client name
This commit is contained in:
parent
8c0619d29c
commit
72188234aa
|
@ -367,6 +367,13 @@ func New(config *Config) (*Ethereum, error) {
|
||||||
|
|
||||||
eth.miner = miner.New(eth, eth.EventMux(), eth.pow)
|
eth.miner = miner.New(eth, eth.EventMux(), eth.pow)
|
||||||
eth.miner.SetGasPrice(config.GasPrice)
|
eth.miner.SetGasPrice(config.GasPrice)
|
||||||
|
|
||||||
|
extra := config.Name
|
||||||
|
if len(extra) > 1024 {
|
||||||
|
extra = extra[:1024]
|
||||||
|
}
|
||||||
|
eth.miner.SetExtra([]byte(extra))
|
||||||
|
|
||||||
if config.Shh {
|
if config.Shh {
|
||||||
eth.whisper = whisper.New()
|
eth.whisper = whisper.New()
|
||||||
eth.shhVersionId = int(eth.whisper.Version())
|
eth.shhVersionId = int(eth.whisper.Version())
|
||||||
|
|
Loading…
Reference in New Issue