aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r--cmd/geth/main.go30
1 files changed, 29 insertions, 1 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index de679ccca..82eae244d 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -32,7 +32,9 @@ import (
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/console"
+ "github.com/ethereum/go-ethereum/contracts/release"
"github.com/ethereum/go-ethereum/core"
+ "github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/internal/debug"
@@ -41,7 +43,6 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
- "github.com/ethereum/go-ethereum/release"
"github.com/ethereum/go-ethereum/rlp"
"gopkg.in/urfave/cli.v1"
)
@@ -143,6 +144,11 @@ This is a destructive action and changes the network in which you will be
participating.
`,
},
+ {
+ Action: license,
+ Name: "license",
+ Usage: "displays geth's license information",
+ },
}
app.Flags = []cli.Flag{
@@ -261,6 +267,10 @@ func initGenesis(ctx *cli.Context) error {
utils.Fatalf("must supply path to genesis JSON file")
}
+ if ctx.GlobalBool(utils.TestNetFlag.Name) {
+ state.StartingNonce = 1048576 // (2**20)
+ }
+
chainDb, err := ethdb.NewLDBDatabase(filepath.Join(utils.MustMakeDataDir(ctx), "chaindata"), 0, 0)
if err != nil {
utils.Fatalf("could not open database: %v", err)
@@ -408,3 +418,21 @@ func version(c *cli.Context) error {
return nil
}
+
+func license(c *cli.Context) error {
+ fmt.Println(`Geth is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Geth is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with geth. If not, see <http://www.gnu.org/licenses/>.
+`)
+
+ return nil
+}