aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@ziggo.nl>2015-05-14 20:25:48 +0800
committerBas van Kervel <basvankervel@ziggo.nl>2015-05-14 20:25:48 +0800
commit1fa48bc5e77707d21200c7262f8416f5b3df89c7 (patch)
tree0b593ab9bd416b21c4bb8428f702a0ee97c36a14 /cmd
parentbc837619960d46cb4a6f6e8334fd867289e4ecc1 (diff)
downloaddexon-1fa48bc5e77707d21200c7262f8416f5b3df89c7.tar
dexon-1fa48bc5e77707d21200c7262f8416f5b3df89c7.tar.gz
dexon-1fa48bc5e77707d21200c7262f8416f5b3df89c7.tar.bz2
dexon-1fa48bc5e77707d21200c7262f8416f5b3df89c7.tar.lz
dexon-1fa48bc5e77707d21200c7262f8416f5b3df89c7.tar.xz
dexon-1fa48bc5e77707d21200c7262f8416f5b3df89c7.tar.zst
dexon-1fa48bc5e77707d21200c7262f8416f5b3df89c7.zip
Introduced default unlock duration when an account is unlocked from the console
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/admin.go5
1 files changed, 5 insertions, 0 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() {