Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
ff9b146
params: release go-ethereum v1.8.9
karalabe May 28, 2018
ccc0deb
VERSION, params: begin 1.8.10 release cycle
karalabe May 28, 2018
a9c6ef6
ethereum: fix a typo in FilterQuery{} (#16827)
mohanson May 29, 2018
40a2c52
eth/fetcher: reuse variables for hash and number (#16819)
Smilenator May 29, 2018
998f656
whisper/shhclient: update call to shh_post to expect string instead o…
gravityblast May 29, 2018
84f8c0c
common: improve documentation comments (#16701)
kielbarry May 29, 2018
d258eee
core/vm: fix typo in comment
abeln May 29, 2018
7677ec1
p2p/discv5: add egress/ingress traffic metrics to discv5 udp transpor…
dshulyak May 29, 2018
426f62f
core: improve test for TransactionPriceNonceSort (#16413)
countvonzero May 29, 2018
d51faee
Merge pull request #16831 from abeln/patch-1
karalabe May 29, 2018
38c7eb0
trie: rename TrieSync to Sync and improve hexToKeybytes (#16804)
jsvisa May 29, 2018
342ec83
core: fix transaction event asynchronicity
karalabe May 30, 2018
ca34e82
Merge pull request #16843 from karalabe/txpool-fix-deadlock
karalabe May 30, 2018
eae63c5
params: release Geth 1.8.10 hotfix
karalabe May 30, 2018
68b0d30
VERSION, params: begin 1.8.11 release cycle
karalabe May 30, 2018
0ad32d3
ethstats: fix last golint warning (#16837)
kielbarry May 30, 2018
af28d12
console: squash golint warnings (#16836)
kielbarry May 31, 2018
c8dcb95
rpc: use HTTP request context as top-level context (#16861)
ryanschneider Jun 2, 2018
3f33a7c
consensus/ethash: reduce keccak hash allocations (#16857)
fjl Jun 4, 2018
143c434
core, eth, trie: streaming GC for the trie cache (#16810)
karalabe Jun 4, 2018
17f80cc
rpc: set timeouts for http server, see #16859
holiman Jun 4, 2018
be2aec0
metrics: expvar support for ResettingTimer (#16878)
nonsense Jun 4, 2018
b659718
Merge pull request #16880 from holiman/http_timeouts
karalabe Jun 4, 2018
a20cc75
cmd/geth: cap cache allowance
rjl493456442 May 25, 2018
ed40767
Merge pull request #16800 from rjl493456442/memory_allowance_warining
karalabe Jun 4, 2018
e3a993d
core: fix typo in comment code
hadv Jun 5, 2018
7a22e89
Merge pull request #16894 from hadv/master
karalabe Jun 5, 2018
a5237a2
les: add Skip overflow check to GetBlockHeadersMsg handler (#16891)
zsfelfoldi Jun 5, 2018
400332b
eth/tracers: fix minor off-by-one error (#16879)
holiman Jun 5, 2018
2ab24a2
core: concurrent background transaction sender ecrecover
karalabe Jun 4, 2018
0029a86
miner: not call commitNewWork if it's a side block (#16751)
markya0616 Jun 5, 2018
4cf2b41
cmd/abigen: support for reading solc output from stdin (#16683)
Shadowfiend Jun 5, 2018
cbfb40b
params: fix golint warnings (#16853)
kielbarry Jun 5, 2018
5bee5d6
vendor: added vendor packages necessary for the swarm-network-rewrite…
acud Jun 5, 2018
e8ea5aa
trie: reduce hasher allocations (#16896)
fjl Jun 5, 2018
01a7e26
Merge pull request #16882 from karalabe/streaming-ecrecover
karalabe Jun 5, 2018
9e4f96a
whisper: re-insert #16757 that has been lost during a merge (#16889)
gballet Jun 5, 2018
90b2277
cmd/puppeth: fixed a typo in a wizard input query (#16910)
Swader Jun 6, 2018
feb6620
core: relax type requirement for bc in ApplyTransaction (#16901)
AlexeyAkhunov Jun 7, 2018
ea06da0
trie: avoid unnecessary slicing on shortnode decoding (#16917)
Jun 7, 2018
13af276
cmd/ethkey: add command to change key passphrase (#16516)
stevenroose Jun 8, 2018
7f0726f
metrics: return an empty snapshot for NilResettingTimer (#16930)
nonsense Jun 11, 2018
2977538
light: new CHTs for mainnet and ropsten (#16926)
zsfelfoldi Jun 11, 2018
69c52bd
ethclient: fix RPC parse error of Parity response (#16924)
stevenroose Jun 11, 2018
eac16f9
core: improve getBadBlocks to return full block rlp (#16902)
holiman Jun 11, 2018
1d666cf
rpc: fix a comment typo (#16929)
xincaosu Jun 11, 2018
99483e8
rpc: support returning nil pointer big.Ints (null)
karalabe Jun 11, 2018
9f7592c
Merge pull request #16942 from karalabe/rpc-nil-reply
karalabe Jun 11, 2018
a3267ed
trie: don't report the root flushlist as an alloc
karalabe Jun 11, 2018
b487bdf
metrics: removed repetitive calculations (#16944)
clayjacobs Jun 11, 2018
43b940e
Merge pull request #16945 from karalabe/triedb-spurious-warning
karalabe Jun 11, 2018
aab7ab0
core/rawdb: wrap db key creations (#16914)
jsvisa Jun 11, 2018
f991995
ethdb: gracefullly handle quit channel (#16794)
rjl493456442 Jun 11, 2018
90829a0
internal/ethapi: reduce pendingTransactions to O(txs+accs) from O(txs…
karalabe Jun 12, 2018
546d421
les: pass server pool to protocol manager (#16947)
zsfelfoldi Jun 12, 2018
3f06da7
metrics: fix gofmt linter warnings
karalabe Jun 12, 2018
9608ccf
Merge pull request #16959 from karalabe/fix-linters
karalabe Jun 12, 2018
85cd64d
Merge pull request #16958 from karalabe/pending-account-fast
karalabe Jun 12, 2018
0255951
crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (…
fjl Jun 12, 2018
049f5b3
core, eth, les: more efficient hash-based header chain retrieval (#16…
zsfelfoldi Jun 12, 2018
2598237
les: fix retriever logic (#16776)
zsfelfoldi Jun 12, 2018
dea1ce0
params: release go-ethereum v1.8.11
karalabe Jun 12, 2018
423d425
VERSION, params: begin v1.8.12 release cycle
karalabe Jun 12, 2018
8c4a7fa
core: change comment to match code more closely (#16963)
jcvernaleo Jun 13, 2018
1fc54d9
internal/web3ext: fix method name for enabling mutex profiling (#16964)
ryanschneider Jun 13, 2018
ea89f40
eth/fetcher: fix annotation (#16969)
jsvisa Jun 13, 2018
f04c0e3
core/asm: correct comments typo (#16975)
caesarchad Jun 14, 2018
e33a5de
console: correct some comments typo (#16971)
caesarchad Jun 14, 2018
591cef1
#15685 made peer_test.go more portable by using random free port ins…
original-brownbear Jun 14, 2018
1836366
all: library changes for swarm-network-rewrite (#16898)
acud Jun 14, 2018
947e0af
core/vm: optimize MSTORE and SLOAD (#16939)
holiman Jun 14, 2018
e75d0a6
eth/filters: make filterLogs func more readable (#16920)
nujeh Jun 14, 2018
3fb5f3a
cmd/utils: fix NetworkId default when -dev is set (#16833)
jeremyschlatter Jun 14, 2018
12735ca
resolved conflicts
nonsense Jun 14, 2018
fec74a7
swarm/pss: replace ToECDSAPub with error-checking func UnmarshalPubkey
nonsense Jun 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.11
1.8.12
2 changes: 1 addition & 1 deletion build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func doLint(cmdline []string) {
configs := []string{
"--vendor",
"--tests",
"--deadline=10m",
"--deadline=2m",
"--disable-all",
"--enable=goimports",
"--enable=varcheck",
Expand Down
32 changes: 26 additions & 6 deletions cmd/abigen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

var (
abiFlag = flag.String("abi", "", "Path to the Ethereum contract ABI json to bind")
abiFlag = flag.String("abi", "", "Path to the Ethereum contract ABI json to bind, - for STDIN")
binFlag = flag.String("bin", "", "Path to the Ethereum contract bytecode (generate deploy method)")
typFlag = flag.String("type", "", "Struct name for the binding (default = package name)")

Expand Down Expand Up @@ -75,16 +75,27 @@ func main() {
bins []string
types []string
)
if *solFlag != "" {
if *solFlag != "" || *abiFlag == "-" {
// Generate the list of types to exclude from binding
exclude := make(map[string]bool)
for _, kind := range strings.Split(*excFlag, ",") {
exclude[strings.ToLower(kind)] = true
}
contracts, err := compiler.CompileSolidity(*solcFlag, *solFlag)
if err != nil {
fmt.Printf("Failed to build Solidity contract: %v\n", err)
os.Exit(-1)

var contracts map[string]*compiler.Contract
var err error
if *solFlag != "" {
contracts, err = compiler.CompileSolidity(*solcFlag, *solFlag)
if err != nil {
fmt.Printf("Failed to build Solidity contract: %v\n", err)
os.Exit(-1)
}
} else {
contracts, err = contractsFromStdin()
if err != nil {
fmt.Printf("Failed to read input ABIs from STDIN: %v\n", err)
os.Exit(-1)
}
}
// Gather all non-excluded contract for binding
for name, contract := range contracts {
Expand Down Expand Up @@ -138,3 +149,12 @@ func main() {
os.Exit(-1)
}
}

func contractsFromStdin() (map[string]*compiler.Contract, error) {
bytes, err := ioutil.ReadAll(os.Stdin)
if err != nil {
return nil, err
}

return compiler.ParseCombinedJSON(bytes, "", "", "", "")
}
72 changes: 72 additions & 0 deletions cmd/ethkey/changepassphrase.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package main

import (
"fmt"
"io/ioutil"
"strings"

"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/cmd/utils"
"gopkg.in/urfave/cli.v1"
)

var newPassphraseFlag = cli.StringFlag{
Name: "newpasswordfile",
Usage: "the file that contains the new passphrase for the keyfile",
}

var commandChangePassphrase = cli.Command{
Name: "changepassphrase",
Usage: "change the passphrase on a keyfile",
ArgsUsage: "<keyfile>",
Description: `
Change the passphrase of a keyfile.`,
Flags: []cli.Flag{
passphraseFlag,
newPassphraseFlag,
},
Action: func(ctx *cli.Context) error {
keyfilepath := ctx.Args().First()

// Read key from file.
keyjson, err := ioutil.ReadFile(keyfilepath)
if err != nil {
utils.Fatalf("Failed to read the keyfile at '%s': %v", keyfilepath, err)
}

// Decrypt key with passphrase.
passphrase := getPassphrase(ctx)
key, err := keystore.DecryptKey(keyjson, passphrase)
if err != nil {
utils.Fatalf("Error decrypting key: %v", err)
}

// Get a new passphrase.
fmt.Println("Please provide a new passphrase")
var newPhrase string
if passFile := ctx.String(newPassphraseFlag.Name); passFile != "" {
content, err := ioutil.ReadFile(passFile)
if err != nil {
utils.Fatalf("Failed to read new passphrase file '%s': %v", passFile, err)
}
newPhrase = strings.TrimRight(string(content), "\r\n")
} else {
newPhrase = promptPassphrase(true)
}

// Encrypt the key with the new passphrase.
newJson, err := keystore.EncryptKey(key, newPhrase, keystore.StandardScryptN, keystore.StandardScryptP)
if err != nil {
utils.Fatalf("Error encrypting with new passphrase: %v", err)
}

// Then write the new keyfile in place of the old one.
if err := ioutil.WriteFile(keyfilepath, newJson, 600); err != nil {
utils.Fatalf("Error writing new keyfile to disk: %v", err)
}

// Don't print anything. Just return successfully,
// producing a positive exit code.
return nil
},
}
2 changes: 1 addition & 1 deletion cmd/ethkey/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ If you want to encrypt an existing private key, it can be specified by setting
}

// Encrypt key with passphrase.
passphrase := getPassPhrase(ctx, true)
passphrase := promptPassphrase(true)
keyjson, err := keystore.EncryptKey(key, passphrase, keystore.StandardScryptN, keystore.StandardScryptP)
if err != nil {
utils.Fatalf("Error encrypting key: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/ethkey/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ make sure to use this feature with great caution!`,
}

// Decrypt key with passphrase.
passphrase := getPassPhrase(ctx, false)
passphrase := getPassphrase(ctx)
key, err := keystore.DecryptKey(keyjson, passphrase)
if err != nil {
utils.Fatalf("Error decrypting key: %v", err)
Expand Down
1 change: 1 addition & 0 deletions cmd/ethkey/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func init() {
app.Commands = []cli.Command{
commandGenerate,
commandInspect,
commandChangePassphrase,
commandSignMessage,
commandVerifyMessage,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/ethkey/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To sign a message contained in a file, use the --msgfile flag.
}

// Decrypt key with passphrase.
passphrase := getPassPhrase(ctx, false)
passphrase := getPassphrase(ctx)
key, err := keystore.DecryptKey(keyjson, passphrase)
if err != nil {
utils.Fatalf("Error decrypting key: %v", err)
Expand Down
40 changes: 24 additions & 16 deletions cmd/ethkey/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,14 @@ import (
"gopkg.in/urfave/cli.v1"
)

// getPassPhrase obtains a passphrase given by the user. It first checks the
// --passphrase command line flag and ultimately prompts the user for a
// passphrase.
func getPassPhrase(ctx *cli.Context, confirmation bool) string {
// Look for the --passphrase flag.
passphraseFile := ctx.String(passphraseFlag.Name)
if passphraseFile != "" {
content, err := ioutil.ReadFile(passphraseFile)
if err != nil {
utils.Fatalf("Failed to read passphrase file '%s': %v",
passphraseFile, err)
}
return strings.TrimRight(string(content), "\r\n")
}

// Otherwise prompt the user for the passphrase.
// promptPassphrase prompts the user for a passphrase. Set confirmation to true
// to require the user to confirm the passphrase.
func promptPassphrase(confirmation bool) string {
passphrase, err := console.Stdin.PromptPassword("Passphrase: ")
if err != nil {
utils.Fatalf("Failed to read passphrase: %v", err)
}

if confirmation {
confirm, err := console.Stdin.PromptPassword("Repeat passphrase: ")
if err != nil {
Expand All @@ -57,9 +45,29 @@ func getPassPhrase(ctx *cli.Context, confirmation bool) string {
utils.Fatalf("Passphrases do not match")
}
}

return passphrase
}

// getPassphrase obtains a passphrase given by the user. It first checks the
// --passfile command line flag and ultimately prompts the user for a
// passphrase.
func getPassphrase(ctx *cli.Context) string {
// Look for the --passwordfile flag.
passphraseFile := ctx.String(passphraseFlag.Name)
if passphraseFile != "" {
content, err := ioutil.ReadFile(passphraseFile)
if err != nil {
utils.Fatalf("Failed to read passphrase file '%s': %v",
passphraseFile, err)
}
return strings.TrimRight(string(content), "\r\n")
}

// Otherwise prompt the user for the passphrase.
return promptPassphrase(false)
}

// signHash is a helper function that calculates a hash for the given message
// that can be safely used to calculate a signature from.
//
Expand Down
2 changes: 1 addition & 1 deletion cmd/faucet/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ func (f *faucet) apiHandler(conn *websocket.Conn) {
amount = new(big.Int).Div(amount, new(big.Int).Exp(big.NewInt(2), big.NewInt(int64(msg.Tier)), nil))

tx := types.NewTransaction(f.nonce+uint64(len(f.reqs)), address, amount, 21000, f.price, nil)
signed, err := f.keystore.SignTx(f.account, tx, f.config.ChainId)
signed, err := f.keystore.SignTx(f.account, tx, f.config.ChainID)
if err != nil {
f.lock.Unlock()
if err = sendError(conn, err); err != nil {
Expand Down
20 changes: 20 additions & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ package main

import (
"fmt"
"math"
"os"
"runtime"
godebug "runtime/debug"
"sort"
"strconv"
"strings"
"time"

"github.com/elastic/gosigar"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/cmd/utils"
Expand Down Expand Up @@ -188,6 +192,22 @@ func init() {
if err := debug.Setup(ctx); err != nil {
return err
}
// Cap the cache allowance and tune the garbage colelctor
var mem gosigar.Mem
if err := mem.Get(); err == nil {
allowance := int(mem.Total / 1024 / 1024 / 3)
if cache := ctx.GlobalInt(utils.CacheFlag.Name); cache > allowance {
log.Warn("Sanitizing cache to Go's GC limits", "provided", cache, "updated", allowance)
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(allowance))
}
}
// Ensure Go's GC ignores the database cache for trigger percentage
cache := ctx.GlobalInt(utils.CacheFlag.Name)
gogc := math.Max(20, math.Min(100, 100/(float64(cache)/1024)))

log.Debug("Sanitizing Go's GC trigger", "percent", int(gogc))
godebug.SetGCPercent(int(gogc))

// Start system runtime metrics collection
go metrics.CollectProcessMetrics(3 * time.Second)

Expand Down
6 changes: 3 additions & 3 deletions cmd/puppeth/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func newCppEthereumGenesisSpec(network string, genesis *core.Genesis) (*cppEther
spec.Params.ByzantiumForkBlock = (hexutil.Uint64)(genesis.Config.ByzantiumBlock.Uint64())
spec.Params.ConstantinopleForkBlock = (hexutil.Uint64)(math.MaxUint64)

spec.Params.NetworkID = (hexutil.Uint64)(genesis.Config.ChainId.Uint64())
spec.Params.ChainID = (hexutil.Uint64)(genesis.Config.ChainId.Uint64())
spec.Params.NetworkID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64())
spec.Params.ChainID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64())

spec.Params.MaximumExtraDataSize = (hexutil.Uint64)(params.MaximumExtraDataSize)
spec.Params.MinGasLimit = (hexutil.Uint64)(params.MinGasLimit)
Expand Down Expand Up @@ -284,7 +284,7 @@ func newParityChainSpec(network string, genesis *core.Genesis, bootnodes []strin
spec.Params.MaximumExtraDataSize = (hexutil.Uint64)(params.MaximumExtraDataSize)
spec.Params.MinGasLimit = (hexutil.Uint64)(params.MinGasLimit)
spec.Params.GasLimitBoundDivisor = (hexutil.Uint64)(params.GasLimitBoundDivisor)
spec.Params.NetworkID = (hexutil.Uint64)(genesis.Config.ChainId.Uint64())
spec.Params.NetworkID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64())
spec.Params.MaxCodeSize = params.MaxCodeSize
spec.Params.EIP155Transition = genesis.Config.EIP155Block.Uint64()
spec.Params.EIP98Transition = math.MaxUint64
Expand Down
2 changes: 1 addition & 1 deletion cmd/puppeth/module_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ func deployDashboard(client *sshClient, network string, conf *config, config *da
}
template.Must(template.New("").Parse(dashboardContent)).Execute(indexfile, map[string]interface{}{
"Network": network,
"NetworkID": conf.Genesis.Config.ChainId,
"NetworkID": conf.Genesis.Config.ChainID,
"NetworkTitle": strings.Title(network),
"EthstatsPage": config.ethstats,
"ExplorerPage": config.explorer,
Expand Down
2 changes: 1 addition & 1 deletion cmd/puppeth/wizard_faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (w *wizard) deployFaucet() {
existed := err == nil

infos.node.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ")
infos.node.network = w.conf.Genesis.Config.ChainId.Int64()
infos.node.network = w.conf.Genesis.Config.ChainID.Int64()

// Figure out which port to listen on
fmt.Println()
Expand Down
2 changes: 1 addition & 1 deletion cmd/puppeth/wizard_genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (w *wizard) makeGenesis() {
// Query the user for some custom extras
fmt.Println()
fmt.Println("Specify your chain/network ID if you want an explicit one (default = random)")
genesis.Config.ChainId = new(big.Int).SetUint64(uint64(w.readDefaultInt(rand.Intn(65536))))
genesis.Config.ChainID = new(big.Int).SetUint64(uint64(w.readDefaultInt(rand.Intn(65536))))

// All done, store the genesis and flush to disk
log.Info("Configured new genesis block")
Expand Down
6 changes: 3 additions & 3 deletions cmd/puppeth/wizard_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (w *wizard) deployNode(boot bool) {
existed := err == nil

infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ")
infos.network = w.conf.Genesis.Config.ChainId.Int64()
infos.network = w.conf.Genesis.Config.ChainID.Int64()

// Figure out where the user wants to store the persistent data
fmt.Println()
Expand Down Expand Up @@ -107,15 +107,15 @@ func (w *wizard) deployNode(boot bool) {
// Ethash based miners only need an etherbase to mine against
fmt.Println()
if infos.etherbase == "" {
fmt.Printf("What address should the miner user?\n")
fmt.Printf("What address should the miner use?\n")
for {
if address := w.readAddress(); address != nil {
infos.etherbase = address.Hex()
break
}
}
} else {
fmt.Printf("What address should the miner user? (default = %s)\n", infos.etherbase)
fmt.Printf("What address should the miner use? (default = %s)\n", infos.etherbase)
infos.etherbase = w.readDefaultAddress(common.HexToAddress(infos.etherbase)).Hex()
}
} else if w.conf.Genesis.Config.Clique != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/puppeth/wizard_wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (w *wizard) deployWallet() {
existed := err == nil

infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ")
infos.network = w.conf.Genesis.Config.ChainId.Int64()
infos.network = w.conf.Genesis.Config.ChainID.Int64()

// Figure out which port to listen on
fmt.Println()
Expand Down
3 changes: 3 additions & 0 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
}
cfg.Genesis = core.DefaultRinkebyGenesisBlock()
case ctx.GlobalBool(DeveloperFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1337
}
// Create new developer account or reuse existing one
var (
developer accounts.Account
Expand Down
Loading