diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-26 18:24:52 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-26 19:04:56 +0800 |
commit | 8865fda872e9cf5eb7ca1fa89ba226d0d3c19ee6 (patch) | |
tree | b621ed27d3af9a312eaeefabdb13c5d9af13f306 /eth | |
parent | b0df9b164c4b4b0c5cc8ada220c4908b01acafcd (diff) | |
download | go-tangerine-8865fda872e9cf5eb7ca1fa89ba226d0d3c19ee6.tar go-tangerine-8865fda872e9cf5eb7ca1fa89ba226d0d3c19ee6.tar.gz go-tangerine-8865fda872e9cf5eb7ca1fa89ba226d0d3c19ee6.tar.bz2 go-tangerine-8865fda872e9cf5eb7ca1fa89ba226d0d3c19ee6.tar.lz go-tangerine-8865fda872e9cf5eb7ca1fa89ba226d0d3c19ee6.tar.xz go-tangerine-8865fda872e9cf5eb7ca1fa89ba226d0d3c19ee6.tar.zst go-tangerine-8865fda872e9cf5eb7ca1fa89ba226d0d3c19ee6.zip |
params: reduce extra data to 32 bytes
Diffstat (limited to 'eth')
-rw-r--r-- | eth/backend.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go index 64d3ddee6..6f77121c8 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" ) @@ -369,8 +370,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)) |