aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-26 19:04:10 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-26 19:04:10 +0800
commit8a5ea466e4d97021f9c1422e76a5f4665a8a6b08 (patch)
tree462837515c45e940db09129d25cf953b5b755338 /eth
parente86233abc9fefc58f52d8a7d9990ddbf8cfda02d (diff)
parent1e241e84f7a282a3b284851bb7a4790c6c6afe9c (diff)
downloaddexon-8a5ea466e4d97021f9c1422e76a5f4665a8a6b08.tar
dexon-8a5ea466e4d97021f9c1422e76a5f4665a8a6b08.tar.gz
dexon-8a5ea466e4d97021f9c1422e76a5f4665a8a6b08.tar.bz2
dexon-8a5ea466e4d97021f9c1422e76a5f4665a8a6b08.tar.lz
dexon-8a5ea466e4d97021f9c1422e76a5f4665a8a6b08.tar.xz
dexon-8a5ea466e4d97021f9c1422e76a5f4665a8a6b08.tar.zst
dexon-8a5ea466e4d97021f9c1422e76a5f4665a8a6b08.zip
Merge pull request #1528 from obscuren/reduce-extra-data
params: reduce extra data to 32 bytes & target block time
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go
index e2b7fab16..cba1b3939 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -45,6 +45,7 @@ import (
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/p2p/nat"
+ "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/whisper"
)
@@ -370,8 +371,8 @@ func New(config *Config) (*Ethereum, error) {
eth.miner.SetGasPrice(config.GasPrice)
extra := config.Name
- if len(extra) > 1024 {
- extra = extra[:1024]
+ if uint64(len(extra)) > params.MaximumExtraDataSize.Uint64() {
+ extra = extra[:params.MaximumExtraDataSize.Uint64()]
}
eth.miner.SetExtra([]byte(extra))