diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/geth/admin.go | 5 | ||||
-rw-r--r-- | cmd/geth/js_test.go | 2 | ||||
-rw-r--r-- | cmd/geth/main.go | 2 | ||||
-rw-r--r-- | cmd/utils/flags.go | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go index 15923c366..91a336cbb 100644 --- a/cmd/geth/admin.go +++ b/cmd/geth/admin.go @@ -8,6 +8,7 @@ import ( "strconv" "time" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/compiler" @@ -374,6 +375,10 @@ func (js *jsre) unlock(call otto.FunctionCall) otto.Value { fmt.Println(err) return otto.FalseValue() } + if seconds == 0 { + seconds = accounts.DefaultAccountUnlockDuration + } + arg := call.Argument(1) var passphrase string if arg.IsUndefined() { diff --git a/cmd/geth/js_test.go b/cmd/geth/js_test.go index c2a0e2fe2..e02e8f704 100644 --- a/cmd/geth/js_test.go +++ b/cmd/geth/js_test.go @@ -68,7 +68,7 @@ func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) { // set up mock genesis with balance on the testAddress core.GenesisData = []byte(testGenesis) - ks := crypto.NewKeyStorePassphrase(filepath.Join(tmp, "keystore")) + ks := crypto.NewKeyStorePlain(filepath.Join(tmp, "keystore")) am := accounts.NewManager(ks) ethereum, err := eth.New(ð.Config{ DataDir: tmp, diff --git a/cmd/geth/main.go b/cmd/geth/main.go index b4d7feed1..725f04efe 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -563,7 +563,7 @@ func upgradeDb(ctx *cli.Context) { bcVersion = core.BlockChainVersion } - filename := fmt.Sprintf("blockchain_%d_%s.chain", bcVersion, time.Now().Format("2006-01-02_15:04:05")) + filename := fmt.Sprintf("blockchain_%d_%s.chain", bcVersion, time.Now().Format("20060102_150405")) exportFile := filepath.Join(ctx.GlobalString(utils.DataDirFlag.Name), filename) err = utils.ExportChain(ethereum.ChainManager(), exportFile) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ddbd36b5c..6ec4fdc55 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -277,6 +277,7 @@ func GetNodeKey(ctx *cli.Context) (key *ecdsa.PrivateKey) { func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config { // Set verbosity on glog glog.SetV(ctx.GlobalInt(VerbosityFlag.Name)) + glog.CopyStandardLogTo("INFO") // Set the log type //glog.SetToStderr(ctx.GlobalBool(LogToStdErrFlag.Name)) glog.SetToStderr(true) |