aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bzzup/main.go4
-rw-r--r--cmd/geth/chaincmd.go3
-rw-r--r--cmd/geth/dao_test.go5
-rw-r--r--cmd/geth/main.go5
-rw-r--r--cmd/utils/flags.go37
-rw-r--r--cmd/utils/version.go2
6 files changed, 16 insertions, 40 deletions
diff --git a/cmd/bzzup/main.go b/cmd/bzzup/main.go
index 83d6f9b7f..7d251aadb 100644
--- a/cmd/bzzup/main.go
+++ b/cmd/bzzup/main.go
@@ -106,7 +106,7 @@ func (c *client) uploadFile(file string, fi os.FileInfo) (manifest, error) {
func (c *client) uploadDirectory(dir string) (manifest, error) {
dirm := manifest{}
- prefix := filepath.ToSlash(dir) + "/"
+ prefix := filepath.ToSlash(filepath.Clean(dir)) + "/"
err := filepath.Walk(dir, func(path string, fi os.FileInfo, err error) error {
if err != nil || fi.IsDir() {
return err
@@ -115,7 +115,7 @@ func (c *client) uploadDirectory(dir string) (manifest, error) {
return fmt.Errorf("path %s outside directory %s", path, dir)
}
entry, err := c.uploadFile(path, fi)
- entry.Path = strings.TrimPrefix(filepath.ToSlash(path), prefix)
+ entry.Path = strings.TrimPrefix(filepath.ToSlash(filepath.Clean(path)), prefix)
dirm.Entries = append(dirm.Entries, entry)
return err
})
diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go
index 19e723bfa..1a7a9eb18 100644
--- a/cmd/geth/chaincmd.go
+++ b/cmd/geth/chaincmd.go
@@ -99,9 +99,6 @@ 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)
- }
stack := makeFullNode(ctx)
chain, chainDb := utils.MakeChain(ctx, stack)
defer chainDb.Close()
diff --git a/cmd/geth/dao_test.go b/cmd/geth/dao_test.go
index f90bb182d..06578b612 100644
--- a/cmd/geth/dao_test.go
+++ b/cmd/geth/dao_test.go
@@ -191,14 +191,15 @@ func testDAOForkBlockNewChain(t *testing.T, testnet bool, genesis string, votes
genesisHash := common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
if testnet {
- genesisHash = common.HexToHash("0x0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303")
+ genesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")
}
if genesis != "" {
genesisHash = daoGenesisHash
}
config, err := core.GetChainConfig(db, genesisHash)
if err != nil {
- t.Fatalf("failed to retrieve chain config: %v", err)
+ t.Errorf("failed to retrieve chain config: %v", err)
+ return // we want to return here, the other checks can't make it past this point (nil panic).
}
// Validate the DAO hard-fork block number against the expected value
if config.DAOForkBlock == nil {
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index e1d0b84c8..a275d8aa5 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -34,7 +34,6 @@ import (
"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/internal/debug"
"github.com/ethereum/go-ethereum/logger"
@@ -238,10 +237,6 @@ 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)
- }
-
stack := makeFullNode(ctx)
chaindb := utils.MakeChainDatabase(ctx, stack)
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index e97fcc025..5c09e44ec 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -38,7 +38,6 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/les"
- "github.com/ethereum/go-ethereum/light"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/metrics"
@@ -381,7 +380,7 @@ var (
// ATM the url is left to the user and deployment to
JSpathFlag = cli.StringFlag{
Name: "jspath",
- Usage: "JavaScript root path for `loadScript` and document root for `admin.httpGet`",
+ Usage: "JavaScript root path for `loadScript`",
Value: ".",
}
SolcPathFlag = cli.StringFlag{
@@ -766,11 +765,9 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) {
case ctx.GlobalBool(TestNetFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
- ethConf.NetworkId = 2
+ ethConf.NetworkId = 3
}
- ethConf.Genesis = core.TestNetGenesisBlock()
- state.StartingNonce = 1048576 // (2**20)
- light.StartingNonce = 1048576 // (2**20)
+ ethConf.Genesis = core.DefaultTestnetGenesisBlock()
case ctx.GlobalBool(DevModeFlag.Name):
ethConf.Genesis = core.OlympicGenesisBlock()
@@ -863,34 +860,20 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon
(genesis.Hash() == params.TestNetGenesisHash && ctx.GlobalBool(TestNetFlag.Name))
if defaults {
- // Homestead fork
if ctx.GlobalBool(TestNetFlag.Name) {
- config.HomesteadBlock = params.TestNetHomesteadBlock
+ config = params.TestnetChainConfig
} else {
+ // Homestead fork
config.HomesteadBlock = params.MainNetHomesteadBlock
- }
- // DAO fork
- if ctx.GlobalBool(TestNetFlag.Name) {
- config.DAOForkBlock = params.TestNetDAOForkBlock
- } else {
+ // DAO fork
config.DAOForkBlock = params.MainNetDAOForkBlock
- }
- config.DAOForkSupport = true
+ config.DAOForkSupport = true
- // DoS reprice fork
- if ctx.GlobalBool(TestNetFlag.Name) {
- config.EIP150Block = params.TestNetHomesteadGasRepriceBlock
- config.EIP150Hash = params.TestNetHomesteadGasRepriceHash
- } else {
+ // DoS reprice fork
config.EIP150Block = params.MainNetHomesteadGasRepriceBlock
config.EIP150Hash = params.MainNetHomesteadGasRepriceHash
- }
- // DoS state cleanup fork
- if ctx.GlobalBool(TestNetFlag.Name) {
- config.EIP155Block = params.TestNetSpuriousDragon
- config.EIP158Block = params.TestNetSpuriousDragon
- config.ChainId = params.TestNetChainID
- } else {
+
+ // DoS state cleanup fork
config.EIP155Block = params.MainNetSpuriousDragon
config.EIP158Block = params.MainNetSpuriousDragon
config.ChainId = params.MainNetChainID
diff --git a/cmd/utils/version.go b/cmd/utils/version.go
index 05dd257fc..3070d10b5 100644
--- a/cmd/utils/version.go
+++ b/cmd/utils/version.go
@@ -30,7 +30,7 @@ import (
const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 5 // Minor version component of the current release
- VersionPatch = 3 // Patch version component of the current release
+ VersionPatch = 4 // Patch version component of the current release
VersionMeta = "unstable" // Version metadata to append to the version string
)