diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-07-25 23:58:08 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-07-25 23:58:08 +0800 |
commit | 73a576c9af5038366f50509136a91a86d203fc6b (patch) | |
tree | 223e2eae2c91a9a22ce2a15710d1516bcc2e139f | |
parent | 665eaff9b9076827d887342bf0a84d0f3ae37697 (diff) | |
parent | 3adaeb1dbc72fba3e9a0d0f83289d994c433cf3e (diff) | |
download | go-tangerine-73a576c9af5038366f50509136a91a86d203fc6b.tar go-tangerine-73a576c9af5038366f50509136a91a86d203fc6b.tar.gz go-tangerine-73a576c9af5038366f50509136a91a86d203fc6b.tar.bz2 go-tangerine-73a576c9af5038366f50509136a91a86d203fc6b.tar.lz go-tangerine-73a576c9af5038366f50509136a91a86d203fc6b.tar.xz go-tangerine-73a576c9af5038366f50509136a91a86d203fc6b.tar.zst go-tangerine-73a576c9af5038366f50509136a91a86d203fc6b.zip |
Merge pull request #1524 from obscuren/default-extra
eth: set default miner extra to client name
-rw-r--r-- | eth/backend.go | 7 |
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()) |