aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth/admin.go')
-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() {