aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-14 20:48:31 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-14 20:48:31 +0800
commitff87c241a715833fa09cbed5e4acf0f1dfa9b745 (patch)
tree4b89f9f82fac8e2a76272bcecb9fb308ab06b19e /cmd
parent7fa740996cf01b56a734e579fcfcd9c2e8585ac5 (diff)
parent1fa48bc5e77707d21200c7262f8416f5b3df89c7 (diff)
downloaddexon-ff87c241a715833fa09cbed5e4acf0f1dfa9b745.tar
dexon-ff87c241a715833fa09cbed5e4acf0f1dfa9b745.tar.gz
dexon-ff87c241a715833fa09cbed5e4acf0f1dfa9b745.tar.bz2
dexon-ff87c241a715833fa09cbed5e4acf0f1dfa9b745.tar.lz
dexon-ff87c241a715833fa09cbed5e4acf0f1dfa9b745.tar.xz
dexon-ff87c241a715833fa09cbed5e4acf0f1dfa9b745.tar.zst
dexon-ff87c241a715833fa09cbed5e4acf0f1dfa9b745.zip
Merge pull request #973 from bas-vk/issue972
Introduced default unlock duration when an account is unlocked from t…
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() {