aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-26 18:24:52 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-26 18:47:57 +0800
commit1e241e84f7a282a3b284851bb7a4790c6c6afe9c (patch)
treeeaf3a03dfc7d45d01908f3e0c3f12085ff74681c /eth
parent73a576c9af5038366f50509136a91a86d203fc6b (diff)
downloadgo-tangerine-1e241e84f7a282a3b284851bb7a4790c6c6afe9c.tar
go-tangerine-1e241e84f7a282a3b284851bb7a4790c6c6afe9c.tar.gz
go-tangerine-1e241e84f7a282a3b284851bb7a4790c6c6afe9c.tar.bz2
go-tangerine-1e241e84f7a282a3b284851bb7a4790c6c6afe9c.tar.lz
go-tangerine-1e241e84f7a282a3b284851bb7a4790c6c6afe9c.tar.xz
go-tangerine-1e241e84f7a282a3b284851bb7a4790c6c6afe9c.tar.zst
go-tangerine-1e241e84f7a282a3b284851bb7a4790c6c6afe9c.zip
params: reduce extra data to 32 bytes
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))