From b5b53d8b32758fba1ad675c0bd51aa4f83aed268 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Wed, 13 May 2015 01:11:17 +0200 Subject: Fix hex conversion in --unlock and log when successful --- cmd/geth/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 1582953f7..b4d7feed1 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -368,10 +368,11 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, account string) (pass if len(account) == 0 { utils.Fatalf("Invalid account address '%s'", account) } - err = am.Unlock(common.StringToAddress(account), passphrase) + err = am.Unlock(common.HexToAddress(account), passphrase) if err != nil { utils.Fatalf("Unlock account failed '%v'", err) } + fmt.Printf("Account '%s' unlocked.\n", account) return } -- cgit v1.2.3 From e30e9fe97983b41a8755f9d36ba4a3ac43ce77c7 Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Wed, 13 May 2015 12:38:12 +0200 Subject: removed invalid filename characters --- cmd/geth/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') 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) -- cgit v1.2.3 From 5f706cd7f5a97b3354b23de4273009f08586ff04 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 14 May 2015 12:56:37 +0200 Subject: cmd/utils: print messages from package log through glog Some of the dependencies use package log. This change ensures that the log output looks uniform and respects glog flags. --- cmd/utils/flags.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd') 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) -- cgit v1.2.3 From 1fa48bc5e77707d21200c7262f8416f5b3df89c7 Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Thu, 14 May 2015 14:25:48 +0200 Subject: Introduced default unlock duration when an account is unlocked from the console --- cmd/geth/admin.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd') 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() { -- cgit v1.2.3 From 559cc02313a869ece839205b336d637cfb486740 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 14 May 2015 17:51:05 +0200 Subject: cmd/geth: use plain keystore for JS tests This reduces the time it takes to run the tests back to 3 seconds. --- cmd/geth/js_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') 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, -- cgit v1.2.3 From 55d85d60fdad2cbd7947d87b2a81bd8df6a18025 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 15 May 2015 16:47:44 +0200 Subject: eth, cmd/geth: start mining from console respects CLI flag --- cmd/geth/admin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go index 91a336cbb..ebdf3512a 100644 --- a/cmd/geth/admin.go +++ b/cmd/geth/admin.go @@ -288,7 +288,7 @@ func (js *jsre) startMining(call otto.FunctionCall) otto.Value { return otto.FalseValue() } } else { - threads = 4 + threads = int64(js.ethereum.MinerThreads) } err = js.ethereum.StartMining(int(threads)) -- cgit v1.2.3 From 7ea76fcf993f3fecb55233bdcc2409618d9080b9 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 15 May 2015 23:53:41 +0200 Subject: core, cmd/geth, cmd/mist: cleanup. bump version 0.9.21 --- cmd/geth/main.go | 4 +--- cmd/mist/main.go | 2 +- cmd/utils/cmd.go | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'cmd') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 725f04efe..158b08796 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -50,7 +50,7 @@ import _ "net/http/pprof" const ( ClientIdentifier = "Geth" - Version = "0.9.20" + Version = "0.9.21" ) var ( @@ -283,8 +283,6 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso } func main() { - //fmt.Printf("\n 🌞\n\n α΄‘α΄‡ΚŸα΄„α΄α΄α΄‡ ᴛᴏ α΄›Κœα΄‡\n 𝐅 𝐑 𝐎 𝐍 𝐓 𝐈 𝐄 𝐑\n\n🌾 🌡🌾🌾 🐎 🌾 🌡 🌾\n\n") - fmt.Println("\n Welcome to the\n FRONTIER\n") runtime.GOMAXPROCS(runtime.NumCPU()) defer logger.Flush() if err := app.Run(os.Args); err != nil { diff --git a/cmd/mist/main.go b/cmd/mist/main.go index 4b55b3026..8365fcec1 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -37,7 +37,7 @@ import ( const ( ClientIdentifier = "Mist" - Version = "0.9.19" + Version = "0.9.21" ) var ( diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index b21099162..fb55a64af 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -104,7 +104,7 @@ func Fatalf(format string, args ...interface{}) { } func StartEthereum(ethereum *eth.Ethereum) { - glog.V(logger.Info).Infoln("Starting ", ethereum.Name()) + glog.V(logger.Info).Infoln("Starting", ethereum.Name()) if err := ethereum.Start(); err != nil { Fatalf("Error starting Ethereum: %v", err) } -- cgit v1.2.3