aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/chaincmd.go
diff options
context:
space:
mode:
authorHellsegga <github@agerberg.me>2016-08-23 16:36:40 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-08-23 16:36:40 +0800
commit6bd9008025478f377f08d2d1b7b258e57486c956 (patch)
tree6e2500c6c51624d422ea0e918903625c72cf42d5 /cmd/geth/chaincmd.go
parent7d9c5e0f7d7de6d8bef3b1c1ed8350f5a75c446b (diff)
downloaddexon-6bd9008025478f377f08d2d1b7b258e57486c956.tar.gz
dexon-6bd9008025478f377f08d2d1b7b258e57486c956.tar.zst
dexon-6bd9008025478f377f08d2d1b7b258e57486c956.zip
cmd/geth: set correct initial nonce on testnet for import/init subcommands (#2924)
Diffstat (limited to 'cmd/geth/chaincmd.go')
-rw-r--r--cmd/geth/chaincmd.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go
index 321551ce0..54984d6e0 100644
--- a/cmd/geth/chaincmd.go
+++ b/cmd/geth/chaincmd.go
@@ -76,6 +76,9 @@ func importChain(ctx *cli.Context) error {
if len(ctx.Args()) != 1 {
utils.Fatalf("This command requires an argument.")
}
+ if ctx.GlobalBool(utils.TestNetFlag.Name) {
+ state.StartingNonce = 1048576 // (2**20)
+ }
chain, chainDb := utils.MakeChain(ctx)
start := time.Now()
err := utils.ImportChain(chain, ctx.Args().First())